crystalspace.jbind.impl.csutil.object
Class csObject

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csutil.object.csObject
All Implemented Interfaces:
iBase, iObject, iPointer

public class csObject
extends csBase
implements iObject

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csObject(iPointer nPointer)
           
 
Method Summary
 iPointer getChild(int iInterfaceID, int iVersion)
          Look for a child object that implements the given interface.
 iPointer getChild(int iInterfaceID, int iVersion, java.lang.String Name)
          Look for a child object that implements the given interface.
 iPointer getChild(int iInterfaceID, int iVersion, java.lang.String Name, boolean FirstName)
          Look for a child object that implements the given interface.
 iObject getChild(java.lang.String Name)
          Return the first child object with the given name.
 int getID()
          Get the unique ID associated with this object.
 iObjectIterator getIterator()
          Return an iterator for all child objects.
 java.lang.String getName()
          Query object name.
 iObject getObjectParent()
          Returns the parent iObject.
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 void objAdd(iObject obj)
          Attach a new iObject to the tree.
 void objAddChildren(iObject Parent)
          Add all child objects of the given object.
 void objRemove(iObject obj)
          Remove an iObject from the tree.
 void objRemoveAll()
          Remove all child objects.
 void setName(java.lang.String iName)
          Set object name.
 void setObjectParent(iObject obj)
          Set the parent iObject.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csObject

public csObject(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iObject
Query object name. Implemented in csObject.

Specified by:
getName in interface iObject
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

getChild

public iObject getChild(java.lang.String Name)
Description copied from interface: iObject
Return the first child object with the given name. Implemented in csObject.

Specified by:
getChild in interface iObject
Parameters:
Name -
Returns:
See Also:
iObject.getChild(java.lang.String)

getChild

public iPointer getChild(int iInterfaceID,
                         int iVersion)
Description copied from interface: iObject
Look for a child object that implements the given interface. You can optionally pass a name to look for. If FirstName is true then the method will stop at the first object with the requested name, even if it did not implement the requested type. Note that the returned object may only be cast to the requested type, no other type, not even iObject! Note that the returned object will be IncRef'ed. Implemented in csObject.

Specified by:
getChild in interface iObject
Parameters:
iInterfaceID -
iVersion -
Returns:
See Also:
iObject.getChild(int, int)

getChild

public iPointer getChild(int iInterfaceID,
                         int iVersion,
                         java.lang.String Name)
Description copied from interface: iObject
Look for a child object that implements the given interface. You can optionally pass a name to look for. If FirstName is true then the method will stop at the first object with the requested name, even if it did not implement the requested type. Note that the returned object may only be cast to the requested type, no other type, not even iObject! Note that the returned object will be IncRef'ed. Implemented in csObject.

Specified by:
getChild in interface iObject
Parameters:
iInterfaceID -
iVersion -
Name -
Returns:
See Also:
iObject.getChild(int, int, java.lang.String)

getChild

public iPointer getChild(int iInterfaceID,
                         int iVersion,
                         java.lang.String Name,
                         boolean FirstName)
Description copied from interface: iObject
Look for a child object that implements the given interface. You can optionally pass a name to look for. If FirstName is true then the method will stop at the first object with the requested name, even if it did not implement the requested type. Note that the returned object may only be cast to the requested type, no other type, not even iObject! Note that the returned object will be IncRef'ed. Implemented in csObject.

Specified by:
getChild in interface iObject
Parameters:
iInterfaceID -
iVersion -
Name -
FirstName -
Returns:
See Also:
iObject.getChild(int, int, java.lang.String, boolean)

getID

public int getID()
Description copied from interface: iObject
Get the unique ID associated with this object. Implemented in csObject.

Specified by:
getID in interface iObject
Returns:
See Also:
iObject.getID()

getIterator

public iObjectIterator getIterator()
Description copied from interface: iObject
Return an iterator for all child objects. Note that you should not remove child objects while iterating. Implemented in csObject.

Specified by:
getIterator in interface iObject
Returns:
See Also:
iObject.getIterator()

getObjectParent

public iObject getObjectParent()
Description copied from interface: iObject
Returns the parent iObject. Implemented in csObject.

Specified by:
getObjectParent in interface iObject
Returns:
See Also:
iObject.getObjectParent()

objAdd

public void objAdd(iObject obj)
Description copied from interface: iObject
Attach a new iObject to the tree. Implemented in csObject.

Specified by:
objAdd in interface iObject
Parameters:
obj -
See Also:
iObject.objAdd(crystalspace.jbind.interfaces.iutil.object.iObject)

objAddChildren

public void objAddChildren(iObject Parent)
Description copied from interface: iObject
Add all child objects of the given object. Implemented in csObject.

Specified by:
objAddChildren in interface iObject
Parameters:
Parent -
See Also:
iObject.objAddChildren(crystalspace.jbind.interfaces.iutil.object.iObject)

objRemove

public void objRemove(iObject obj)
Description copied from interface: iObject
Remove an iObject from the tree. Implemented in csObject.

Specified by:
objRemove in interface iObject
Parameters:
obj -
See Also:
iObject.objRemove(crystalspace.jbind.interfaces.iutil.object.iObject)

objRemoveAll

public void objRemoveAll()
Description copied from interface: iObject
Remove all child objects. Implemented in csObject.

Specified by:
objRemoveAll in interface iObject
See Also:
iObject.objRemoveAll()

setName

public void setName(java.lang.String iName)
Description copied from interface: iObject
Set object name. Implemented in csObject.

Specified by:
setName in interface iObject
Parameters:
iName -
See Also:
iObject.setName(java.lang.String)

setObjectParent

public void setObjectParent(iObject obj)
Description copied from interface: iObject
Set the parent iObject. Note that this only sets the 'parent' pointer but does not add the object as a child object. Implemented in csObject.

Specified by:
setObjectParent in interface iObject
Parameters:
obj -
See Also:
iObject.setObjectParent(crystalspace.jbind.interfaces.iutil.object.iObject)