Changeset 7401 for code/trunk/src/libraries/core/Iterator.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/Iterator.h
r7271 r7401 29 29 /** 30 30 @file 31 @brief Definition and implementation of the Iterator class. 32 33 The Iterator of a given class allows to iterate through an ObjectList. Objects in 34 this list are cast to the template argument of the Iterator. 31 @ingroup Object ObjectList 32 @brief Definition of the Iterator class, used to iterate through object-lists. 33 34 @anchor IteratorExample 35 36 @ref orxonox::Iterator "Iterator" allows to iterate through an @ref orxonox::ObjectListBase 37 "ObjectListBase". Objects in this list are cast to the template argument @a T of Iterator<T> using 38 @c dynamic_cast. In contrast to @ref orxonox::ObjectListIterator "ObjectListIterator<T>", 39 @ref orxonox::Iterator "Iterator<T>" can iterate through every object-list. In practice though it 40 is limited to objects of type @a T and its subclasses. Because of the @c dynamic_cast, this iterator 41 is much slower than ObjectListIterator. 35 42 36 43 Usage: 44 @code 37 45 for (Iterator<myClass> it = anyidentifier->getObjects()->begin(); it != anyidentifier->getObjects()->end(); ++it) 38 46 { … … 40 48 myClass* myObject = *it; 41 49 } 50 @endcode 42 51 */ 43 52 … … 52 61 namespace orxonox 53 62 { 54 //! The Iterator allows to iterate through a given ObjectList 63 /** 64 @brief The Iterator allows to iterate through a given ObjectList. 65 66 Independent of the object-list's type, the objects in the list are always casted 67 to @a T using @c dynamic_cast. 68 69 @see See @ref IteratorExample "Iterator.h" for more information an example. 70 */ 55 71 template <class T = OrxonoxClass> 56 72 class Iterator … … 200 216 @return The Iterator itself 201 217 */ 202 inline Iterator<T> operator++(int i)218 inline Iterator<T> operator++(int) 203 219 { 204 220 Iterator<T> copy = *this;
Note: See TracChangeset
for help on using the changeset viewer.