Changeset 7401 for code/trunk/src/libraries/core/ObjectListIterator.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/ObjectListIterator.h
r7268 r7401 29 29 /** 30 30 @file 31 @brief Definition and implementation of the Iterator class. 32 33 The ObjectListIterator of a given class allows to iterate through the 34 ObjectList of this class, containing all objects of that type. 35 This is the only way to access the objects stored in an ObjectList. 31 @ingroup Object ObjectList 32 @brief Definition of the ObjectListIterator class, used to iterate through object-lists. 33 34 @anchor ObjectListIteratorExample 35 36 @ref orxonox::ObjectListIterator "ObjectListIterator<T>" allows to iterate through 37 @ref orxonox::ObjectList "ObjectList<T>", containing all objects of type @a T. In contrast to 38 @ref orxonox::Iterator "Iterator<T>", this iterator is limited to the object-list of type @a T. 39 It is, however, much faster as it doesn't need a @c dynamic_cast. 36 40 37 41 Usage: 42 @code 38 43 for (ObjectListIterator<myClass> it = ObjectList<myClass>::begin(); it != ObjectList<myClass>::end(); ++it) 39 44 { … … 41 46 myClass* myObject = *it; 42 47 } 48 @endcode 49 50 @note @ref orxonox::ObjectList::iterator "ObjectList<T>::iterator" is identical to 51 @ref orxonox::ObjectListIterator "ObjectListIterator<T>" (it's just a typedef). 43 52 */ 44 53 … … 52 61 namespace orxonox 53 62 { 54 //! The Iterator allows to iterate through the ObjectList of a given class. 63 /** 64 @brief ObjectListIterator<T> allows to iterate through the ObjectList of class @a T. 65 66 @see See @ref ObjectListIteratorExample "ObjectListIterator.h" for more information an example. 67 */ 55 68 template <class T> 56 69 class ObjectListIterator … … 109 122 /** 110 123 @brief Assigns the element of another ObjectListIterator. 111 @param elementThe other ObjectListIterator124 @param other The other ObjectListIterator 112 125 */ 113 126 inline ObjectListIterator<T>& operator=(const ObjectListIterator<T>& other) … … 131 144 @return The ObjectListIterator itself 132 145 */ 133 inline ObjectListIterator<T> operator++(int i)146 inline ObjectListIterator<T> operator++(int) 134 147 { 135 148 ObjectListIterator<T> copy = *this; … … 217 230 218 231 private: 219 ObjectListElement<T>* element_; //!< The element the Iterator points at232 ObjectListElement<T>* element_; //!< The element the iterator points at 220 233 }; 221 234 }
Note: See TracChangeset
for help on using the changeset viewer.