Changeset 7372 for code/branches/doc/src/libraries/core/Iterator.h
- Timestamp:
- Sep 7, 2010, 12:58:52 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/core/Iterator.h
r7363 r7372 30 30 @file 31 31 @ingroup Object ObjectList 32 @brief Definition and implementation of the Iterator class. 33 34 The Iterator of a given class allows to iterate through an ObjectList. Objects in 35 this list are cast to the template argument of the Iterator. 32 @brief Definition of the Iterator class. 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. 36 42 37 43 Usage: 44 @code 38 45 for (Iterator<myClass> it = anyidentifier->getObjects()->begin(); it != anyidentifier->getObjects()->end(); ++it) 39 46 { … … 41 48 myClass* myObject = *it; 42 49 } 50 @endcode 43 51 */ 44 52 … … 53 61 namespace orxonox 54 62 { 55 //! 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 */ 56 71 template <class T = OrxonoxClass> 57 72 class Iterator
Note: See TracChangeset
for help on using the changeset viewer.