Changeset 1591 for code/branches/core3/src/core/ObjectListBase.cc
- Timestamp:
- Jun 12, 2008, 2:00:15 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/core/ObjectListBase.cc
r1574 r1591 41 41 #include "ObjectListBase.h" 42 42 #include "Identifier.h" 43 #include "Iterator Base.h"43 #include "Iterator.h" 44 44 45 45 namespace orxonox … … 73 73 @param element The element that gets removed 74 74 */ 75 void ObjectListBase::notifyIterators(O bjectListBaseElement* element)75 void ObjectListBase::notifyIterators(OrxonoxClass* object) const 76 76 { 77 for (std::set<IteratorBase*>::iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it) 78 if ((*(*(*it))) == element->object_) 79 ++(*(*it)); 77 for (std::list<void*>::const_iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it) 78 ((Iterator<OrxonoxClass>*)(*it))->incrementIfEqual(object); 79 for (std::list<void*>::const_iterator it = this->objectListIterators_.begin(); it != this->objectListIterators_.end(); ++it) 80 ((ObjectListIterator<OrxonoxClass>*)(*it))->incrementIfEqual(object); 80 81 } 81 82 … … 85 86 @return The pointer to the new ObjectListBaseElement, needed by the MetaObjectList of the added object 86 87 */ 87 ObjectListBaseElement* ObjectListBase::add(O rxonoxClass* object)88 ObjectListBaseElement* ObjectListBase::add(ObjectListBaseElement* element) 88 89 { 89 90 if (!this->last_) 90 91 { 91 92 // If the list is empty 92 this->last_ = new ObjectListBaseElement(object);93 this->last_ = element; 93 94 this->first_ = this->last_; // There's only one object in the list now 94 95 } … … 97 98 // If the list isn't empty 98 99 ObjectListBaseElement* temp = this->last_; 99 this->last_ = new ObjectListBaseElement(object);100 this->last_ = element; 100 101 this->last_->prev_ = temp; 101 102 temp->next_ = this->last_;
Note: See TracChangeset
for help on using the changeset viewer.