Changeset 4874 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Jul 15, 2005, 1:01:10 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/lang
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/lang/base_object.cc
r4837 r4874 63 63 // name setup 64 64 LoadParam<BaseObject>(root, "name", this, &BaseObject::setName) 65 .describe("the name of the Object at hand");65 .describe("the name of the Object at hand"); 66 66 } 67 67 … … 148 148 if (this->isA(CL_STORY_ENTITY)) 149 149 PRINT(0)(" =StoryEntity="); 150 if (this->isA(CL_ELEMENT_2D)) 151 PRINT(0)(" =Element2D="); 150 152 PRINT(0)("\n"); 151 153 } -
orxonox/trunk/src/lib/lang/class_list.cc
r4873 r4874 124 124 } 125 125 return NULL; 126 127 126 } 128 127 … … 175 174 * @todo: speed this up!! 176 175 */ 177 bool ClassList::exists( BaseObject* object, long classID)176 bool ClassList::exists(const BaseObject* object, long classID) 178 177 { 179 178 if(unlikely(ClassList::first == NULL)) … … 206 205 } 207 206 207 208 /** 209 * prints out a string of all the types this Object matches 210 * @param object a Pointer to the object to analyze 211 */ 212 void ClassList::whatIs(const BaseObject* object) 213 { 214 ClassList* tmp = ClassList::first; 215 while (likely(tmp != NULL)) 216 { 217 if (object->isA(tmp->classID)) 218 { 219 PRINT(0)("=%s=-", tmp->className); 220 } 221 tmp = tmp->next; 222 } 223 } 224 208 225 /** 209 226 * Print out some very nice debug information … … 246 263 PRINT(0)("| (class %s): NAME(%s)->%p ", enumBO->getClassName(), enumBO->getName(), enumBO); 247 264 if (debugLevel == 3) 248 enumBO->whatIs(); 249 else 250 { 251 PRINT(0)("\n"); 252 } 265 ClassList::whatIs(enumBO); 266 PRINT(0)("\n"); 253 267 enumBO = iterator->nextElement(); 254 268 } -
orxonox/trunk/src/lib/lang/class_list.h
r4871 r4874 40 40 static tList<BaseObject>* getList(long classID = CL_NULL); 41 41 static BaseObject* getObject(const char* name, long classID = CL_NULL); 42 static bool exists( BaseObject* object, long classID = CL_NULL);42 static bool exists(const BaseObject* object, long classID = CL_NULL); 43 43 44 static void whatIs(const BaseObject* object); 44 45 static void debug(unsigned int debugLevel = 0, long classID = CL_NULL); 45 46
Note: See TracChangeset
for help on using the changeset viewer.