Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 4 (modified by landauf, 12 years ago) (diff)

ObjectList

TracNav(TracNav/TOC_Documentation)?

Description

The ObjectList is a double-linked list used to store all objects of a given class. It's nothing special, we might use std::list as well, but it ensures a very fast deletion of objects. Just think of the list of all BaseObjects: There might be at least 10'000 objects. If deleting means: "Iterate through the list until you find the stored object" this could result in up to (10'0002 / 2 = 50 mio) iterations.

The ObjectList allows you to delete an entry by simply connecting the previous and the following entry. The associated entries and the related ObjectLists of each object are stored in a MetaObjectList. The list gets provided by OrxonoxClass.

List-elements can be assigned to an Iterator. This allows you to easily iterate through all objects in an ObjectList. Read the related Wiki-page for more informations.

Functions

  • begin()/start(): Returns the first list-element of the list
  • end(): Returns the last list-element of the list

Attachments (1)

Download all attachments as: .zip