Changeset 9678 in orxonox.OLD for trunk/src/lib/lang/new_class_id.cc
- Timestamp:
- Aug 21, 2006, 11:59:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/new_class_id.cc
r9674 r9678 18 18 #include "new_class_id.h" 19 19 #include <cassert> 20 #include "debug.h" 20 21 21 22 /////////////////////////////////////////////////////////// … … 45 46 46 47 48 /** 49 * @brief Seeks in the Inheritance if it matches objectList. 50 * @param objectList The ObjectList this should be a member of (by Pointer-comparison). 51 * @return True if found, false if not. 52 */ 53 bool NewClassID::isA(const NewObjectListBase& objectList) const 54 { 55 ClassList::const_iterator it; 56 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 57 if ((*it)._objectList == &objectList) 58 return true; 59 return false; 60 } 61 62 /** 63 * @brief Seeks in the Inheritance if it matches objectList. 64 * @param classID The ClassID of the class this should be a member of. 65 * @return True if found, false if not. 66 */ 67 bool NewClassID::isA(int classID) const 68 { 69 ClassList::const_iterator it; 70 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 71 if (*(*it)._objectList == classID) 72 return true; 73 return false; 74 } 75 76 /** 77 * @brief Seeks in the Inheritance if it matches objectList. 78 * @param className The ClassName of the class this should be a member of. 79 * @return True if found, false if not. 80 */ 81 bool NewClassID::isA(const std::string& className) const 82 { 83 ClassList::const_iterator it; 84 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 85 if (*(*it)._objectList == className) 86 return true; 87 return false; 88 } 89 90 91 void NewClassID::listInheritance() const 92 { 93 PRINT(0)("Listing inheritance diagram for ....: "); 94 ClassList::const_iterator it; 95 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 96 PRINT(0)(" -> %s", (*it)._objectList->name().c_str()); 97 PRINT(0)("\n"); 98 99 }
Note: See TracChangeset
for help on using the changeset viewer.