Changeset 7271 for code/trunk/src/libraries/core/Iterator.h
- Timestamp:
- Aug 30, 2010, 8:07:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/Iterator.h
r7268 r7271 32 32 33 33 The Iterator of a given class allows to iterate through an ObjectList. Objects in 34 this list are cast edto the template argument of the Iterator.34 this list are cast to the template argument of the Iterator. 35 35 36 36 Usage: … … 95 95 inline Iterator(ObjectListElement<O>* element) 96 96 { 97 this->element_ = (element) ? static_cast<ObjectListBaseElement*>(element) : 0;97 this->element_ = element; 98 98 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 99 99 this->list_->registerIterator(this); … … 107 107 inline Iterator(const ObjectListIterator<O>& other) 108 108 { 109 this->element_ = (other.element_) ? static_cast<ObjectListBaseElement*>(other.element_) : 0;109 this->element_ = other.element_; 110 110 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 111 111 this->list_->registerIterator(this); … … 162 162 this->list_->unregisterIterator(this); 163 163 164 this->element_ = (element) ? static_cast<ObjectListBaseElement*>(element) : 0;164 this->element_ = element; 165 165 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 166 166 this->list_->registerIterator(this); … … 179 179 this->list_->unregisterIterator(this); 180 180 181 this->element_ = (other.element_) ? static_cast<ObjectListBaseElement*>(other.element_) : 0;181 this->element_ = other.element_; 182 182 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects(); 183 183 this->list_->registerIterator(this);
Note: See TracChangeset
for help on using the changeset viewer.