Changeset 447 for code/branches/objecthierarchy/src/orxonox/core/Iterator.h
- Timestamp:
- Dec 9, 2007, 11:21:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/core/Iterator.h
r365 r447 4 4 5 5 The Iterator of a given class allows to iterate through an ObjectList, containing all objects of that type. 6 This is the only way to access the objects in an ObjectList.6 This is the only way to access the objects stored in an ObjectList. 7 7 8 8 Usage: … … 13 13 } 14 14 15 Warning: Don't delete an objectdirectly through the iterator.15 Warning: Don't delete objects directly through the iterator. 16 16 */ 17 17 … … 27 27 public: 28 28 /** 29 @brief Constructor: Sets the element whereon the iterator pointsto zero.29 @brief Constructor: Sets the element, whereon the iterator points, to zero. 30 30 */ 31 31 Iterator() … … 35 35 36 36 /** 37 @brief Constructor: Sets the element whereon the iterator pointsto a given element.37 @brief Constructor: Sets the element, whereon the iterator points, to a given element. 38 38 @param element The element to start with 39 39 */ … … 44 44 45 45 /** 46 @brief Overloading of the ++it operator: Iterator iterates to the next object in the list.46 @brief Overloading of the ++it operator: Iterator points to the next object in the list. 47 47 @return The Iterator itself 48 48 */ … … 54 54 55 55 /** 56 @brief Overloading of the --it operator: Iterator iterates to the previous object in the list.56 @brief Overloading of the --it operator: Iterator points to the previous object in the list. 57 57 @return The Iterator itself 58 58 */ … … 98 98 bool operator!=(int compare) 99 99 { 100 // Comparing with something except zero makes no sense100 // Comparing with anything except zero makes no sense 101 101 if (compare != 0) 102 102 std::cout << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works.\n"; … … 106 106 107 107 private: 108 ObjectListElement<T>* element_; //!< The element the Iterator points to108 ObjectListElement<T>* element_; //!< The element the Iterator points at 109 109 }; 110 110 }
Note: See TracChangeset
for help on using the changeset viewer.