- Timestamp:
- Mar 27, 2013, 11:17:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/src/libraries/core/object/ObjectListBase.cc
r9573 r9593 36 36 #include <set> 37 37 #include "Iterator.h" 38 #include "Listable.h" 38 39 #include "ObjectListIterator.h" 39 40 … … 43 44 @brief Constructor: Sets default values. 44 45 */ 45 ObjectListBase::ObjectListBase( Identifier* identifier)46 ObjectListBase::ObjectListBase() 46 47 { 47 this->identifier_ = identifier;48 48 this->first_ = 0; 49 49 this->last_ = 0; … … 81 81 @return The pointer to the new ObjectListBaseElement, needed by the MetaObjectList of the added object 82 82 */ 83 ObjectListBaseElement* ObjectListBase::add (ObjectListBaseElement* element)83 ObjectListBaseElement* ObjectListBase::addElement(ObjectListBaseElement* element) 84 84 { 85 85 if (!this->last_) … … 100 100 return this->last_; 101 101 } 102 103 void ObjectListBase::removeElement(ObjectListBaseElement* element) 104 { 105 orxout(verbose, context::object_list) << "Removing Object from " << element->objectBase_->getIdentifier()->getName() << "-list." << endl; 106 this->notifyIterators(element->objectBase_); 107 108 if (element->next_) 109 element->next_->prev_ = element->prev_; 110 else 111 this->last_ = element->prev_; // If there is no next_, we deleted the last object and have to update the last_ pointer of the list 112 113 if (element->prev_) 114 element->prev_->next_ = element->next_; 115 else 116 this->first_ = element->next_; // If there is no prev_, we deleted the first object and have to update the first_ pointer of the list 117 } 102 118 }
Note: See TracChangeset
for help on using the changeset viewer.