The ObjectListBase contains all existing objects of a given class. An object is listed in the lists of its class and all parent classes. A newly created object gets added to the lists by calling RegisterObject? (see CoreIncludes) in the constructor.
The list of a given class is located in the Identifier of the class.
Important: The ObjectListBase is deletion-save. This means you can delete as many objects and linked objects while iterating through any list as you like without running into trouble. This feature is achieved by using our own iterators (ObjectListIterator and Iterator).
ObjectListBase::Export is a small struct containing a pointer to the list and one list-element. With this you can create an Iterator. The Export struct is somehow a link to a specific object in a specific list. In STL, iterators have the same function.
- begin(): Returns an Export link to the first object in the list
- end(): Returns an Export link to the list-element after the last object in the list
- rbegin(): Returns an Export link to the last object in the list
- rend(): Returns an Export link to the list-element before the first object in the list
See Iterator for more information about the usage of those functions.
The illustration shows how the elements of the list are connected and to which elements the four functions of ObjectListBase redirect.