Generic object class. More...
Inherited by World_Object.
Can represent any entity in the program, and is not tied to any environment. An Object is "tree-like" in that it may contain subobjects (children). All world objects should be subclasses of this one.
Construct an object.
[virtual]
Destroys an object.
[virtual]
Returns the object's ID.
[virtual]
Get the object's parent.
[virtual]
Set a new parent.
If current parent is not NULL, the object is also removed from it.
[virtual]
Add a child object to this parent.
Object must be dynamically allocated method returns the object's ID.
Reimplemented in World_Object and World.
[virtual]
Remove a child from this object.
2nd version removes the Nth child. Note that removal does NOT delete the child. Use scheduleDelete for this task. Returns 0 if successful (O is a a son of this, or index is valid).
[virtual]
Returns non zero if object has son objects.
[virtual]
return the Nth son of this object.
[virtual]
Returns a current enumeration of all son objects.
Delete this object.
Deletions are postponed until doDeletions() is called. doDeletions does the actual work of deleting the Object. Note: that deletion is NOT recursive. Child Objects must be explicitly deleted if desired.
[static]
This method gets an object anywhere in the system by its ID number (Use O->getID() to retrieve number).
This is useful, instead of keeping pointers to objects, since objects may be deleted and then pointers are invalid. Return NULL if no Object with the given ID exists.
[static]
doDeletions() does the actual work of deleting objects.
It should be called once per frame at the end of the processiong for that frame to carry out any postponed deletions.