#include <src/core/MetaObjectList.h>
Public Member Functions | |
void | add (ObjectListBase *list, ObjectListBaseElement *element) |
Adds an ObjectList and an element of that list to the MetaObjectList. | |
MetaObjectList () | |
Constructor: Sets first_ to zero. | |
~MetaObjectList () | |
Destructor: Removes all elements from the list, causing them to remove the stored ObjectListElement from the ObjectList. | |
Public Attributes | |
MetaObjectListElement * | first_ |
The first element in the list. |
The MetaObjectList is a single-linked list, containing all list-elements and their lists wherein the object that owns the MetaObjectList is registered. This allows much faster deletion of objects because no iteration is needed.
orxonox::MetaObjectList::MetaObjectList | ( | ) |
orxonox::MetaObjectList::~MetaObjectList | ( | ) |
Destructor: Removes all elements from the list, causing them to remove the stored ObjectListElement from the ObjectList.
References first_, and orxonox::MetaObjectListElement::next_.
void orxonox::MetaObjectList::add | ( | ObjectListBase * | list, | |
ObjectListBaseElement * | element | |||
) |
Adds an ObjectList and an element of that list to the MetaObjectList.
list | The ObjectList wherein the element is | |
element | The element wherein the object is |
References first_, and orxonox::MetaObjectListElement::next_.