Changeset 2908 for code/branches/questsystem5/src/core/Iterator.h
- Timestamp:
- Apr 8, 2009, 12:58:47 AM (16 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/core/Iterator.h
r2907 r2908 75 75 this->element_ = exp.element_; 76 76 this->list_ = exp.list_; 77 this-> list_->registerIterator(this);77 this->iterator_ = this->list_->registerIterator(this); 78 78 } 79 79 … … 86 86 this->element_ = other.element_; 87 87 this->list_ = other.list_; 88 this-> list_->registerIterator(this);88 this->iterator_ = this->list_->registerIterator(this); 89 89 } 90 90 … … 98 98 this->element_ = (element) ? static_cast<ObjectListBaseElement*>(element) : 0; 99 99 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 100 this-> list_->registerIterator(this);100 this->iterator_ = this->list_->registerIterator(this); 101 101 } 102 102 … … 110 110 this->element_ = (other.element_) ? static_cast<ObjectListBaseElement*>(other.element_) : 0; 111 111 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 112 this-> list_->registerIterator(this);112 this->iterator_ = this->list_->registerIterator(this); 113 113 } 114 114 … … 118 118 inline ~Iterator() 119 119 { 120 this->list_->unregisterIterator(this );120 this->list_->unregisterIterator(this->iterator_); 121 121 } 122 122 … … 128 128 { 129 129 if (this->list_) 130 this->list_->unregisterIterator(this );130 this->list_->unregisterIterator(this->iterator_); 131 131 132 132 this->element_ = exp.element_; 133 133 this->list_ = exp.list_; 134 this-> list_->registerIterator(this);134 this->iterator_ = this->list_->registerIterator(this); 135 135 136 136 return (*this); … … 144 144 { 145 145 if (this->list_) 146 this->list_->unregisterIterator(this );146 this->list_->unregisterIterator(this->iterator_); 147 147 148 148 this->element_ = other.element_; 149 149 this->list_ = other.list_; 150 this-> list_->registerIterator(this);150 this->iterator_ = this->list_->registerIterator(this); 151 151 152 152 return (*this); … … 161 161 { 162 162 if (this->list_) 163 this->list_->unregisterIterator(this );163 this->list_->unregisterIterator(this->iterator_); 164 164 165 165 this->element_ = (element) ? static_cast<ObjectListBaseElement*>(element) : 0; 166 166 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 167 this-> list_->registerIterator(this);167 this->iterator_ = this->list_->registerIterator(this); 168 168 169 169 return (*this); … … 179 179 { 180 180 if (this->list_) 181 this->list_->unregisterIterator(this );182 183 this->element_ = (other.element_) ? static_cast<ObjectListBaseElement*>(other.element_): 0;181 this->list_->unregisterIterator(this->iterator_); 182 183 this->element_ = (other.element_) ? (ObjectListBaseElement*)other.element_ : 0; 184 184 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 185 this-> list_->registerIterator(this);185 this->iterator_ = this->list_->registerIterator(this); 186 186 187 187 return (*this); … … 300 300 ObjectListBaseElement* element_; //!< The element the Iterator points at 301 301 ObjectListBase* list_; //!< The list wherein the element is 302 std::list<void*>::iterator iterator_; //!< The iterator in the notifying list of the ObjectList 302 303 }; 303 304
Note: See TracChangeset
for help on using the changeset viewer.