Changeset 9371 in orxonox.OLD for branches/proxy/src/lib/lang
- Timestamp:
- Jul 20, 2006, 11:08:16 PM (19 years ago)
- Location:
- branches/proxy/src/lib/lang
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/lang/base_object.h
r9361 r9371 35 35 void setName (const std::string& newName); 36 36 /** returns the Name of this Object */ 37 inline const char* getName ()const { return this->objectName.c_str(); }; 37 inline const std::string& getName() const { return this->objectName; }; 38 /** returns the Name of this Object as a C-compliant string (const char*) */ 39 inline const char* getCName() const { return this->objectName.c_str(); }; 38 40 /** @returns the XML-Element with whicht this Object was loaded */ 39 41 inline TiXmlNode* getXmlElem() const { return this->xmlElem; }; 40 42 41 43 /** @returns the className of the corresponding Object */ 42 inline const char* getClassName() const { return this->className.c_str(); }; 44 inline const std::string& getClassName() const { return this->className; } 45 /** @returns the className of the corresponding Object as a C-compliant string (const char*) */ 46 inline const char* getClassCName() const { return this->className.c_str(); }; 43 47 /** @returns the classID of the corresponding Object */ 44 48 inline int getClassID() const { return this->classID; }; -
branches/proxy/src/lib/lang/class_list.cc
r9357 r9371 207 207 std::list<BaseObject*>::iterator bo; 208 208 for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++) 209 if ( (*bo)->getName() != NULL &&objectName == (*bo)->getName())209 if (objectName == (*bo)->getName()) 210 210 return (*bo); 211 211 } … … 218 218 std::list<BaseObject*>::iterator bo; 219 219 for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++) 220 if ( (*bo)->getName() != NULL &&objectName == (*bo)->getName())220 if (objectName == (*bo)->getName()) 221 221 return (*bo); 222 222 } … … 241 241 std::list<BaseObject*>::iterator bo; 242 242 for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++) 243 if ( (*bo)->getName() != NULL &&objectName == (*bo)->getName())243 if (objectName == (*bo)->getName()) 244 244 return (*bo); 245 245 } … … 286 286 std::list<BaseObject*>::iterator bo; 287 287 for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++) 288 if ( (*bo)->getName() != NULL &&objectName == (*bo)->getName())288 if (objectName == (*bo)->getName()) 289 289 return true; 290 290 } … … 380 380 for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++) 381 381 { 382 PRINT(0)("| %s::%s::(0x%.8X->%p ", (*bo)->getClass Name(), (*bo)->getName(), (*bo)->getClassID(), (*bo));382 PRINT(0)("| %s::%s::(0x%.8X->%p ", (*bo)->getClassCName(), (*bo)->getCName(), (*bo)->getClassID(), (*bo)); 383 383 if (debugLevel == 3) 384 384 ClassList::whatIs(*bo);
Note: See TracChangeset
for help on using the changeset viewer.