|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.scenegraph.io.retained.SymbolTable
public class SymbolTable
SymbolTable class for SceneGraph I/O.
Constructor Summary | |
---|---|
SymbolTable(Controller control)
Creates new SymbolTable |
Method Summary | |
---|---|
int |
addBranchGraphReference(javax.media.j3d.SceneGraphObject node,
int branchGraphID)
Add a refernce to the BranchGraph root Also returns the nodes id Used to associate graphs with a locale without storing the graph at the current time. |
void |
addNamedObject(java.lang.String name,
javax.media.j3d.SceneGraphObject object)
Associate the name with the scene graph object |
void |
addNamedObjects(java.util.HashMap map)
Add all the named objects in map |
int |
addReference(javax.media.j3d.SceneGraphObject node)
Add a refernce to the specified node Also returns the nodes id |
int |
addReference(SymbolTableData symbol)
Add a refernce to the specified node Also returns the nodes id |
boolean |
branchGraphHasDependencies(int graphID)
Return true if the graph is dependent on nodes in other graphs Only Nodes (not node components) cause dependencies |
void |
clear()
Clear all elements from the symbol table |
void |
clearUnshared()
Clear all the Symbols that are not shared with other Graphs in the file Remove all Symbols from all structures with referenceCounts=1 |
SymbolTableData |
createSymbol(javax.media.j3d.SceneGraphObject node)
Create a new symbol and provide a new nodeID This is used during the save process |
SymbolTableData |
createSymbol(SceneGraphObjectState state,
javax.media.j3d.SceneGraphObject node,
int nodeID)
Create a new symbol using the specified nodeID This is used during the load process. |
void |
endUnsavedNodeComponentFrame()
|
int |
getBranchGraphCount()
|
int[] |
getBranchGraphDependencies(int graphID)
Return an array of each BranchGraph on which graphID is dependent for closure of the graph Only Nodes (not node components) cause dependencies If there are no dependencies int[0] is returned |
long |
getBranchGraphFilePosition(int graphID)
|
SymbolTableData |
getBranchGraphRoot(int graphID)
|
javax.media.j3d.SceneGraphObject |
getJ3dNode(int nodeID)
Return the Java3D node associated with the nodeID. |
javax.media.j3d.SceneGraphObject |
getNamedObject(java.lang.String name)
Return the SceneGraphObject associated with the name |
void |
getNamedObjectMap(java.util.HashMap map)
Add the namedObject mappings to map |
java.lang.String[] |
getNames()
Get all the names of the named objects |
SymbolTableData |
getSharedGroup(int nodeID)
Get the symbol for the shared group If the sharedgroup has not been loaded then load it before returning (if we are using RandomAccessFileControl |
SymbolTableData |
getSymbol(int nodeID)
Return the node with the give ID |
SymbolTableData |
getSymbol(javax.media.j3d.SceneGraphObject node)
Get the table entry for node |
java.util.ListIterator |
getUnsavedNodeComponents()
|
int |
getUnsavedNodeComponentsSize()
|
void |
incNodeComponentRefCount(int nodeID)
Update the reference count for the node component. |
boolean |
isLoaded(int nodeID)
Return true if this node has already been loaded |
void |
readTable(java.io.DataInput in,
boolean streamRead)
Read and store the entire symbol table |
javax.media.j3d.SceneGraphObject |
resolveReference(int nodeID)
Given a nodeID return the corresponding scene graph object. |
void |
setBranchGraphID(SymbolTableData symbol)
Set the branchGraphID in the symbol to the current branch graph ID |
void |
setBranchGraphRoot(SymbolTableData symbol,
long filePointer)
Mark the node referenced by this Symbol as a branch graph root The filePointer is the position of the BranchGraph in the file, this is not the same as the BranchGroups position due to the extra data stored for a graph. |
void |
setFilePosition(long ptr,
SceneGraphObjectState state)
Set the position of the object referenced by state |
void |
startUnsavedNodeComponentFrame()
|
java.lang.String |
toString()
|
void |
writeTable(java.io.DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SymbolTable(Controller control)
Method Detail |
---|
public void writeTable(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public void readTable(java.io.DataInput in, boolean streamRead) throws java.io.IOException
streamRead
- - true if reading from a Stream in which case only the
branchGraphs and named objects are read.
java.io.IOException
public void setBranchGraphRoot(SymbolTableData symbol, long filePointer)
public SymbolTableData getBranchGraphRoot(int graphID)
public void setBranchGraphID(SymbolTableData symbol)
public int[] getBranchGraphDependencies(int graphID)
public boolean branchGraphHasDependencies(int graphID)
public int getBranchGraphCount()
public long getBranchGraphFilePosition(int graphID)
public SymbolTableData createSymbol(javax.media.j3d.SceneGraphObject node)
public SymbolTableData createSymbol(SceneGraphObjectState state, javax.media.j3d.SceneGraphObject node, int nodeID)
public int getUnsavedNodeComponentsSize()
public java.util.ListIterator getUnsavedNodeComponents()
public void startUnsavedNodeComponentFrame()
public void endUnsavedNodeComponentFrame()
public void incNodeComponentRefCount(int nodeID)
public int addReference(javax.media.j3d.SceneGraphObject node)
addReference
in interface SceneGraphObjectReferenceControl
public int addReference(SymbolTableData symbol)
public int addBranchGraphReference(javax.media.j3d.SceneGraphObject node, int branchGraphID)
public boolean isLoaded(int nodeID)
public javax.media.j3d.SceneGraphObject getJ3dNode(int nodeID)
public SymbolTableData getSymbol(javax.media.j3d.SceneGraphObject node)
public SymbolTableData getSymbol(int nodeID)
public SymbolTableData getSharedGroup(int nodeID)
public void setFilePosition(long ptr, SceneGraphObjectState state)
public void addNamedObject(java.lang.String name, javax.media.j3d.SceneGraphObject object)
public void addNamedObjects(java.util.HashMap map)
map
public javax.media.j3d.SceneGraphObject getNamedObject(java.lang.String name) throws NamedObjectException, ObjectNotLoadedException
NamedObjectException
ObjectNotLoadedException
public java.lang.String[] getNames()
public void getNamedObjectMap(java.util.HashMap map)
map
public java.lang.String toString()
toString
in class java.lang.Object
public void clear()
public void clearUnshared()
public javax.media.j3d.SceneGraphObject resolveReference(int nodeID)
resolveReference
in interface SceneGraphObjectReferenceControl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |