iObject Struct Reference
[Utilities]
This interface is an SCF interface for encapsulating csObject.
More...
#include <iutil/object.h>
Inheritance diagram for iObject:
![Inheritance graph](structiObject__inherit__graph.png)
Public Member Functions | |
virtual void | AddNameChangeListener (iObjectNameChangeListener *listener)=0 |
Add a name change listener. | |
virtual iObject * | GetChild (const char *Name) const =0 |
Return the first child object with the given name. | |
virtual iObject * | GetChild (int iInterfaceID, int iVersion, const char *Name=0, bool FirstName=false) const =0 |
Look for a child object that implements the given interface. | |
virtual uint | GetID () const =0 |
Get the unique ID associated with this object. | |
virtual csPtr< iObjectIterator > | GetIterator ()=0 |
Return an iterator for all child objects. | |
virtual const char * | GetName () const =0 |
Query object name. | |
virtual iObject * | GetObjectParent () const =0 |
Returns the parent iObject. | |
virtual void | ObjAdd (iObject *obj)=0 |
Attach a new iObject to the tree. | |
virtual void | ObjAddChildren (iObject *Parent)=0 |
Add all child objects of the given object. | |
virtual void | ObjReleaseOld (iObject *obj)=0 |
virtual void | ObjRemove (iObject *obj)=0 |
Remove an iObject from the tree. | |
virtual void | ObjRemoveAll ()=0 |
Remove all child objects. | |
virtual void | RemoveNameChangeListener (iObjectNameChangeListener *listener)=0 |
Remove a name change listener. | |
virtual void | SetName (const char *iName)=0 |
Set object name. | |
virtual void | SetObjectParent (iObject *obj)=0 |
Set the parent iObject. |
Detailed Description
This interface is an SCF interface for encapsulating csObject.Main creators of instances implementing this interface:
- Many objects implement this (especially objects in the 3D engine like meshes, lights, sectors, materials, ...)
Main ways to get pointers to this interface:
- Many objects have a QueryObject() method that you can use.
- scfQueryInterface() on the object.
- iObject::GetObjectParent()
- iObject::GetChild()
- iObjectIterator::Next()
- iObjectIterator::GetParentObj()
Definition at line 92 of file object.h.
Member Function Documentation
virtual void iObject::AddNameChangeListener | ( | iObjectNameChangeListener * | listener | ) | [pure virtual] |
virtual iObject* iObject::GetChild | ( | const char * | Name | ) | const [pure virtual] |
virtual iObject* iObject::GetChild | ( | int | iInterfaceID, | |
int | iVersion, | |||
const char * | Name = 0 , |
|||
bool | FirstName = false | |||
) | const [pure virtual] |
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 must still be queried for the requested type.
Note that the returned object will be IncRef'ed.
Implemented in csObject.
virtual uint iObject::GetID | ( | ) | const [pure virtual] |
virtual csPtr<iObjectIterator> iObject::GetIterator | ( | ) | [pure virtual] |
Return an iterator for all child objects.
Note that you should not remove child objects while iterating.
Implemented in csObject.
Referenced by csTypedObjectIterator< T >::csTypedObjectIterator().
virtual const char* iObject::GetName | ( | ) | const [pure virtual] |
virtual iObject* iObject::GetObjectParent | ( | ) | const [pure virtual] |
virtual void iObject::ObjAdd | ( | iObject * | obj | ) | [pure virtual] |
virtual void iObject::ObjAddChildren | ( | iObject * | Parent | ) | [pure virtual] |
virtual void iObject::ObjReleaseOld | ( | iObject * | obj | ) | [pure virtual] |
virtual void iObject::ObjRemove | ( | iObject * | obj | ) | [pure virtual] |
virtual void iObject::ObjRemoveAll | ( | ) | [pure virtual] |
virtual void iObject::RemoveNameChangeListener | ( | iObjectNameChangeListener * | listener | ) | [pure virtual] |
virtual void iObject::SetName | ( | const char * | iName | ) | [pure virtual] |
virtual void iObject::SetObjectParent | ( | iObject * | obj | ) | [pure virtual] |
The documentation for this struct was generated from the following file:
- iutil/object.h
Generated for Crystal Space by doxygen 1.4.7