= ObjectListBase = [[TracNav(TracNav/TOC_Development)]] == Information == 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 [wiki:CoreIncludes]) in the constructor. The list of a given class is located in the [wiki:Identifier] of the class. !ObjectListBase threats all objects as [wiki:OrxonoxClass OrxonoxClasses] and doesn't care about the real class. See [wiki:ObjectList] for a class-specific wrapper to !ObjectListBase. == Deletion safety == '''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 ([wiki:ObjectListIterator] and [wiki:Iterator]). == ObjectListBase::Export == ObjectListBase::Export is a small struct containing a pointer to the list and one list-element. With this you can create an [wiki:Iterator]. The Export struct is somehow a ''link'' to a specific object in a specific list. In STL, iterators have the same function. == Functions == The following functions are used to work with [wiki:Iterator]. They all return an instance of ObjectListBase::Export, but you don't have to care about the internals, just assign it to an [wiki:Iterator]. * '''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 [wiki:Iterator] for more information about the usage of those functions.