csObject Class Reference
A generic csObject class. More...
#include <csobject.h>
Inheritance diagram for csObject:

Public Methods | |
csObject (iBase *pParent=0) | |
Initialize the csObject. | |
csObject (csObject &o) | |
Copy constructor. | |
virtual | ~csObject () |
Destroy this object and the associated children. | |
virtual void | SetName (const char *iName) |
Set object name. | |
virtual const char * | GetName () const |
Query object name. | |
virtual CS_ID | GetID () const |
Get the unique ID associated with this object. | |
virtual void | SetObjectParent (iObject *) |
Set the parent csObject. | |
virtual iObject * | GetObjectParent () const |
Returns the parent iObject. | |
virtual void | ObjAdd (iObject *obj) |
Attach a new iObject to the tree. | |
virtual void | ObjRemove (iObject *obj) |
Deletes the given object, removing it from the object tree. | |
virtual void | ObjRemoveAll () |
Deletes all objects, removing them from the object tree. | |
virtual void | ObjAddChildren (iObject *Parent) |
Add all child objects of the given object. | |
virtual void * | GetChild (int iInterfaceID, int iVersion, const char *Name=0, bool FirstName=false) const |
Look for a child object that implements the given interface. | |
virtual iObject * | GetChild (const char *Name) const |
Return the first child object with the given name. | |
virtual csPtr< iObjectIterator > | GetIterator () |
Return an iterator for all child objects. | |
Protected Methods | |
void | InitializeObject () |
private initialization function | |
Protected Attributes | |
CS_ID | csid |
Each object has a unique ID associated with it. | |
csObjectContainer * | Children |
The array of child nodes. | |
char * | Name |
Object's name or 0 if unnamed. | |
iObject * | ParentObject |
Parent object. |
Detailed Description
A generic csObject class.Any csObject can have any number of iObject children attached to it. You can use SCF_QUERY_INTERFACE to get interfaces from the child objects.
Definition at line 35 of file csobject.h.
Constructor & Destructor Documentation
|
Initialize the csObject.
|
|
Copy constructor. The copied object contains all children of the original object, but has a new ID and is not automatically added to the original object's parent. |
|
Destroy this object and the associated children.
|
Member Function Documentation
|
Return the first child object with the given name.
Implements 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. Implements iObject. |
|
Get the unique ID associated with this object.
Implements iObject. |
|
Return an iterator for all child objects. Note that you should not remove child objects while iterating. Implements iObject. |
|
Query object name.
Implements iObject. |
|
Returns the parent iObject.
Implements iObject. |
|
private initialization function
|
|
Attach a new iObject to the tree.
Implements iObject. |
|
Add all child objects of the given object.
Implements iObject. |
|
Deletes the given object, removing it from the object tree.
Implements iObject. |
|
Deletes all objects, removing them from the object tree.
Implements iObject. |
|
Set object name.
Implements iObject. |
|
Set the parent csObject.
Implements iObject. |
Member Data Documentation
|
The array of child nodes.
Definition at line 43 of file csobject.h. |
|
Each object has a unique ID associated with it.
Definition at line 40 of file csobject.h. |
|
Object's name or 0 if unnamed.
Definition at line 46 of file csobject.h. |
|
Parent object.
Definition at line 49 of file csobject.h. |
The documentation for this class was generated from the following file:
- csutil/csobject.h
Generated for Crystal Space by doxygen 1.2.18