![]() |
VR-Forces Developer's Guide
|
Class Description: DtSimComponentList.
Instances of DtSimComponentList build and manage a hashlist of DtSimComponents, hashed by name. It can also provide the list of components in sequential form (thanks to a little help from the base sim component itself...)

Public Types | |
| typedef std::vector < DtSimComponent * > | ComponentListType |
| typedef ComponentListType::iterator | iterator |
| typedef ComponentListType::const_iterator | const_iterator |
Public Member Functions | |
| DtSimComponentList (const DtString &name, DtReaderWriterRegistry *const parentRegistry=0) | |
| virtual | ~DtSimComponentList () |
| virtual void | tick (bool hostEntityDestroyed) |
| virtual DtSimComponent * | lookupComponent (const DtString &name) |
| virtual std::list < DtSimComponent * > | lookupComponentsByType (const DtString &typeString) |
| template<typename T_ComponentType > | |
| std::list< DtSimComponent * > | lookupComponentsByDynamicCast () const |
| virtual void | addComponent (DtSimComponent *component) |
| virtual void | removeComponent (DtSimComponent *component) |
| virtual iterator | begin () |
| virtual iterator | end () |
| virtual size_t | count () const |
Protected Types | |
| typedef std::map< DtString, DtSimComponent * > | DtSimComponentMap |
Protected Member Functions | |
| DtSimComponentList () | |
| virtual void | emptyList () |
Protected Attributes | |
| ComponentListType | myComponentList |
| DtSimComponentMap | myIndex |
| typedef std::vector<DtSimComponent*> DtSimComponentList::ComponentListType |
| typedef ComponentListType::iterator DtSimComponentList::iterator |
| typedef ComponentListType::const_iterator DtSimComponentList::const_iterator |
|
protected |
| DtSimComponentList::DtSimComponentList | ( | const DtString & | name, |
| DtReaderWriterRegistry *const | parentRegistry = 0 |
||
| ) |
constructor
|
virtual |
destructor
|
protected |
default constructor
|
virtual |
Ticks each component on the list. If the host entity is destroyed, only components with tickWhileDestroyed() returning true are ticked.
|
virtual |
|
virtual |
|
inline |
Returns a list of DtSimComponents that can cast to the particular component type.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
Used by the destructor. It removes and DELETES all components on the component list.
|
protected |
|
protected |