Changeset 1591 for code/branches/core3/src/core/ObjectList.h
- Timestamp:
- Jun 12, 2008, 2:00:15 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/core/ObjectList.h
r1574 r1591 41 41 42 42 #include "Identifier.h" 43 #include " Iterator.h"43 #include "ObjectListIterator.h" 44 44 45 45 namespace orxonox … … 51 51 /** 52 52 Wraps the ObjectListBase of the corresponding Identifier. 53 Use Iterator<class> to iterate through all objects in the list.53 Use ObjectListIterator<class> to iterate through all objects in the list. 54 54 */ 55 55 template <class T> … … 57 57 { 58 58 public: 59 typedef ObjectListIterator<T> iterator; 60 59 61 /** @brief Returns an Iterator to the first element in the list. @return The Iterator */ 60 inline static Iterator<T>begin()61 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->begin()); }62 inline static ObjectListElement<T>* begin() 63 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->begin().element_); } 62 64 63 65 /** @brief Returns an Iterator to the element after the last element in the list. @return The Iterator */ 64 inline static Iterator<T>end()65 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->end()); }66 inline static ObjectListElement<T>* end() 67 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->end().element_); } 66 68 67 69 /** @brief Returns an Iterator to the last element in the list. @return The Iterator */ 68 inline static Iterator<T>rbegin()69 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->rbegin()); }70 inline static ObjectListElement<T>* rbegin() 71 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->rbegin().element_); } 70 72 71 73 /** @brief Returns an Iterator to the element before the first element in the list. @return The Iterator */ 72 inline static Iterator<T>rend()73 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->rend()); }74 inline static ObjectListElement<T>* rend() 75 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->rend().element_); } 74 76 }; 75 77 }
Note: See TracChangeset
for help on using the changeset viewer.