Changeset 7401 for code/trunk/src/libraries/core/ObjectListBase.h
- Timestamp:
- Sep 11, 2010, 12:34:00 AM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/doc (added) merged: 7290-7292,7296-7300,7302-7304,7306-7312,7315-7318,7323,7325,7327,7331-7332,7334-7335,7345-7347,7352-7353,7356-7357,7361,7363-7367,7371-7375,7388
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/ObjectListBase.h
r5738 r7401 29 29 /** 30 30 @file 31 @brief Definition of the ObjectListBase class. 31 @ingroup Object ObjectList 32 @brief Declaration of the ObjectListBase class which stores all objects of each class. 32 33 33 The ObjectListBase is a double-linked list, used by Identifiers to store all objects of a given class. 34 Newly created objects are added through the RegisterObject-macro in its constructor. 34 orxonox::ObjectListBase is a double-linked list, used by @ref orxonox::Identifier "Identifiers" 35 to store all objects of a given class. Newly created objects are added to the list through the 36 @c RegisterObject() macro in the constructor. 35 37 */ 36 38 … … 48 50 // ### ObjectListBaseElement ### 49 51 // ############################### 50 // !The list-element of the ObjectListBase52 /// The list-element of the ObjectListBase 51 53 class _CoreExport ObjectListBaseElement 52 54 { … … 54 56 /** 55 57 @brief Constructor: Creates the list-element with an object. 56 @param object The object to store58 @param objectBase The object to store 57 59 */ 58 60 ObjectListBaseElement(OrxonoxClass* objectBase) : next_(0), prev_(0), objectBase_(objectBase) {} … … 67 69 // ### ObjectListElement ### 68 70 // ############################### 69 // !The list-element that actually contains the object71 /// The list-element that actually contains the object 70 72 template <class T> 71 73 class ObjectListElement : public ObjectListBaseElement … … 80 82 // ### ObjectListBase ### 81 83 // ############################### 82 //! The ObjectListBase contains all objects of a given class.83 84 /** 84 The ObjectListBase is used by Identifiers to store all objects of their given class. 85 Use ObjectList<T> to get the list of all T's and Iterator<T> to iterate through them. 85 @brief The ObjectListBase contains all objects of a given class. 86 87 The ObjectListBase is used by Identifiers to store all objects of their class. 88 You can use Identifier::getObjects() to get the object-list from an Identifier. 89 Use @ref Iterator "Iterator<T>" to iterate through them. 90 91 Alternatively you can also use the static helper class @ref orxonox::ObjectList "ObjectList<T>" 92 to get the list of all objects of type @a T. Use @ref ObjectListIterator "ObjectListIterator<T>" 93 or @ref Iterator "Iterator<T>" to iterate through them. 86 94 */ 87 95 class _CoreExport ObjectListBase … … 95 103 ObjectListBaseElement* add(ObjectListBaseElement* element); 96 104 105 /// Helper struct, used to export an element and the list to an instance of Iterator. 97 106 struct Export 98 107 { … … 102 111 }; 103 112 104 / ** @brief Returns a pointer to the first element in the list. @return The element */113 /// Returns a pointer to the first element in the list. Works only with Iterator. 105 114 inline Export begin() { return ObjectListBase::Export(this, this->first_); } 106 / ** @brief Returns a pointer to the element after the last element in the list. @return The element */115 /// Returns a pointer to the element after the last element in the list. Works only with Iterator. 107 116 inline Export end() { return ObjectListBase::Export(this, 0); } 108 / ** @brief Returns a pointer to the last element in the list. @return The element */117 /// Returns a pointer to the last element in the list. Works only with Iterator. 109 118 inline Export rbegin() { return ObjectListBase::Export(this, this->last_); } 110 / ** @brief Returns a pointer to the element in front of the first element in the list. @return The element */119 /// Returns a pointer to the element in front of the first element in the list. Works only with Iterator. 111 120 inline Export rend() { return ObjectListBase::Export(this, 0); } 112 121
Note: See TracChangeset
for help on using the changeset viewer.