= !ObjectList = [[ArchivePage]] The !ObjectList is a generic container for Classes that are derived from [wiki:archive/BaseObject BaseObject]. Every object, that spcifies the registerObject-function is automatically registered to the !ObjectList, and stored within it. (also see [wiki:archive/BaseObject BaseObject] about this) The fancy thing about the !ObjectList is: 1. One can get a list of all Objects of any type (as long as it is derived from [wiki:archive/BaseObject BaseObject]) 1. One can check if an Object exists within a List. 1. One can check if all allocated data is deleted again, or if it is just floting around somewhere. == Usage == * Iterating through a List: (note that the iterator is a std::list::const_iterator and can be used like any other stl-iterator.) {{{ #!cpp ObjectList::const_iterator it; for (it = PNode::objectList().begin(); it != PNode::objectList().end(); ++it) (*it)->debug(); }}} * get an Object with some name {{{ #!cpp /// some class ObjectListBase::getBaseObject("PNode", "Player"); // returns a BaseObject* to the first object of a class named PNode and an Object named Player. /// defined class: much faster, and way more powerfull! PNode::objectList().getObject("Player"); // returns a PNode* to an Object named Player }}}