Changeset 7271 for code/trunk/src/libraries/core/ObjectList.h
- Timestamp:
- Aug 30, 2010, 8:07:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/ObjectList.h
r5738 r7271 61 61 /** @brief Returns an Iterator to the first element in the list. @return The Iterator */ 62 62 inline static ObjectListElement<T>* begin() 63 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->begin().element_); } 63 { 64 ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects(); 65 return static_cast<ObjectListElement<T>*>(list->begin().element_); 66 } 64 67 65 68 /** @brief Returns an Iterator to the element after the last element in the list. @return The Iterator */ 66 69 inline static ObjectListElement<T>* end() 67 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->end().element_); } 70 { 71 ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects(); 72 return static_cast<ObjectListElement<T>*>(list->end().element_); 73 } 68 74 69 75 /** @brief Returns an Iterator to the last element in the list. @return The Iterator */ 70 76 inline static ObjectListElement<T>* rbegin() 71 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->rbegin().element_); } 77 { 78 ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects(); 79 return static_cast<ObjectListElement<T>*>(list->rbegin().element_); 80 } 72 81 73 82 /** @brief Returns an Iterator to the element before the first element in the list. @return The Iterator */ 74 83 inline static ObjectListElement<T>* rend() 75 { return ((ObjectListElement<T>*)ClassIdentifier<T>::getIdentifier()->getObjects()->rend().element_); } 84 { 85 ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects(); 86 return static_cast<ObjectListElement<T>*>(list->rend().element_); 87 } 76 88 }; 77 89 }
Note: See TracChangeset
for help on using the changeset viewer.