Changeset 9573 for code/branches/core6/src/libraries/core
- Timestamp:
- Mar 24, 2013, 10:43:27 PM (12 years ago)
- Location:
- code/branches/core6/src/libraries/core/object
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/src/libraries/core/object/Iterator.h
r9563 r9573 69 69 @see See @ref IteratorExample "Iterator.h" for more information an example. 70 70 */ 71 template <class T = OrxonoxClass>71 template <class T> 72 72 class Iterator 73 73 { … … 295 295 @param object The object to compare with 296 296 */ 297 inline void incrementIfEqual( OrxonoxClass* object)297 inline void incrementIfEqual(Listable* object) 298 298 { 299 299 if (this->element_ && this->element_->objectBase_ == object) … … 305 305 ObjectListBase* list_; //!< The list wherein the element is 306 306 }; 307 308 typedef Iterator<OrxonoxClass> BaseIterator;309 307 } 310 308 -
code/branches/core6/src/libraries/core/object/ObjectListBase.cc
r9557 r9573 68 68 @param object The object that gets removed 69 69 */ 70 void ObjectListBase::notifyIterators( OrxonoxClass* object) const70 void ObjectListBase::notifyIterators(Listable* object) const 71 71 { 72 72 for (std::vector<void*>::const_iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it) 73 ((Iterator< OrxonoxClass>*)(*it))->incrementIfEqual(object);73 ((Iterator<Listable>*)(*it))->incrementIfEqual(object); 74 74 for (std::vector<void*>::const_iterator it = this->objectListIterators_.begin(); it != this->objectListIterators_.end(); ++it) 75 ((ObjectListIterator< OrxonoxClass>*)(*it))->incrementIfEqual(object);75 ((ObjectListIterator<Listable>*)(*it))->incrementIfEqual(object); 76 76 } 77 77 -
code/branches/core6/src/libraries/core/object/ObjectListBase.h
r9557 r9573 56 56 @param objectBase The object to store 57 57 */ 58 ObjectListBaseElement( OrxonoxClass* objectBase) : next_(0), prev_(0), objectBase_(objectBase) {}58 ObjectListBaseElement(Listable* objectBase) : next_(0), prev_(0), objectBase_(objectBase) {} 59 59 60 60 ObjectListBaseElement* next_; //!< The next element in the list 61 61 ObjectListBaseElement* prev_; //!< The previous element in the list 62 OrxonoxClass* objectBase_;62 Listable* objectBase_; 63 63 }; 64 64 … … 72 72 { 73 73 public: 74 ObjectListElement(T* object) : ObjectListBaseElement(static_cast< OrxonoxClass*>(object)), object_(object) {}74 ObjectListElement(T* object) : ObjectListBaseElement(static_cast<Listable*>(object)), object_(object) {} 75 75 T* object_; //!< The object 76 76 }; … … 142 142 } 143 143 } 144 void notifyIterators( OrxonoxClass* object) const;144 void notifyIterators(Listable* object) const; 145 145 146 146 inline Identifier* getIdentifier() const { return this->identifier_; } -
code/branches/core6/src/libraries/core/object/ObjectListIterator.h
r9563 r9573 223 223 @param object The object to compare with 224 224 */ 225 inline void incrementIfEqual( OrxonoxClass* object)225 inline void incrementIfEqual(Listable* object) 226 226 { 227 227 if (this->element_ && this->element_->objectBase_ == object)
Note: See TracChangeset
for help on using the changeset viewer.