com.jme3.scene.plugins.blender.file
Class Pointer

java.lang.Object
  extended by com.jme3.scene.plugins.blender.file.Pointer

public class Pointer
extends java.lang.Object

A class that represents a pointer of any level that can be stored in the file.


Field Summary
 boolean function
          This variable indicates if the field is a function pointer.
 
Constructor Summary
Pointer(int pointerLevel, boolean function, BlenderContext blenderContext)
          Constructr.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<Structure> fetchData(BlenderInputStream inputStream)
          This method fetches the data stored under the given address.
 void fill(BlenderInputStream inputStream)
          This method fills the pointer with its address value (it doesn't get the actual data yet.
 long getOldMemoryAddress()
          This method returns the old memory address of the structure pointed by the pointer.
 int hashCode()
           
 boolean isFunction()
          This method indicates if this pointer points to a function.
 boolean isNotNull()
          This method indicates if this is a null-pointer or not.
 boolean isNull()
          This method indicates if this is a null-pointer or not.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

function

public boolean function
This variable indicates if the field is a function pointer.

Constructor Detail

Pointer

public Pointer(int pointerLevel,
               boolean function,
               BlenderContext blenderContext)
Constructr. Stores the basic data about the pointer.

Parameters:
pointerLevel - the level of the pointer
function - this variable indicates if the field is a function pointer
blenderContext - the repository f data; used in fetching the value that the pointer points
Method Detail

fill

public void fill(BlenderInputStream inputStream)
This method fills the pointer with its address value (it doesn't get the actual data yet. Use the 'fetch' method for this.

Parameters:
inputStream - the stream we read the pointer value from

fetchData

public java.util.List<Structure> fetchData(BlenderInputStream inputStream)
                                    throws BlenderFileException
This method fetches the data stored under the given address.

Parameters:
inputStream - the stream we read data from
Returns:
the data read from the file
Throws:
BlenderFileException - this exception is thrown when the blend file structure is somehow invalid or corrupted

isFunction

public boolean isFunction()
This method indicates if this pointer points to a function.

Returns:
true if this is a function pointer and false otherwise

isNull

public boolean isNull()
This method indicates if this is a null-pointer or not.

Returns:
true if the pointer is null and false otherwise

isNotNull

public boolean isNotNull()
This method indicates if this is a null-pointer or not.

Returns:
true if the pointer is not null and false otherwise

getOldMemoryAddress

public long getOldMemoryAddress()
This method returns the old memory address of the structure pointed by the pointer.

Returns:
the old memory address of the structure pointed by the pointer

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object