Changeset 9807 in orxonox.OLD for branches/new_class_id/src/lib/lang/base_object.cc
- Timestamp:
- Sep 24, 2006, 11:26:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/lang/base_object.cc
r9806 r9807 32 32 this->objectName = objectName; 33 33 this->xmlElem = NULL; 34 this->registerObject(this, BaseObject::_objectList); 34 35 } 35 36 … … 40 41 { 41 42 /// Remove from the ObjectLists 42 ClassList::iterator it; 43 ClassEntries::iterator it; 44 printf("Deleting Object of type %s::%s\n", this->getClassCName(), getCName()); 43 45 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 44 46 { 47 assert((*it)._objectList->checkIteratorInList((*it)._iterator) || (*it)._objectList->checkObjectInList(this)); 45 48 (*it)._objectList->unregisterObject((*it)._iterator); 46 49 delete (*it)._iterator; … … 87 90 bool BaseObject::isA(const ObjectListBase& objectList) const 88 91 { 89 Class List::const_iterator it;92 ClassEntries::const_iterator it; 90 93 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 91 94 if ((*it)._objectList == &objectList) … … 102 105 bool BaseObject::isA(const ClassID& classID) const 103 106 { 104 Class List::const_iterator it;107 ClassEntries::const_iterator it; 105 108 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 106 109 if (*(*it)._objectList == classID) … … 116 119 bool BaseObject::isA(int classID) const 117 120 { 118 Class List::const_iterator it;121 ClassEntries::const_iterator it; 119 122 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 120 123 if (*(*it)._objectList == classID) 124 121 125 return true; 122 126 return false; … … 130 134 bool BaseObject::isA(const std::string& className) const 131 135 { 132 Class List::const_iterator it;136 ClassEntries::const_iterator it; 133 137 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 134 138 if (*(*it)._objectList == className) … … 146 150 { 147 151 PRINT(0)("Listing inheritance diagram for %s::%s: ", getClassCName(), getCName()); 148 Class List::const_iterator it;152 ClassEntries::const_iterator it; 149 153 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 150 154 PRINT(0)(" -> %s(id:%d)", (*it)._objectList->name().c_str(), (*it)._objectList->id());
Note: See TracChangeset
for help on using the changeset viewer.