Changeset 4257 in orxonox.OLD for orxonox/branches/levelLoader/src/lib
- Timestamp:
- May 22, 2005, 2:39:59 AM (20 years ago)
- Location:
- orxonox/branches/levelLoader/src/lib/lang
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelLoader/src/lib/lang/base_object.cc
r3651 r4257 39 39 BaseObject::~BaseObject () 40 40 { 41 delete []this->className;41 // delete []this->className; 42 42 } 43 43 44 void BaseObject::setClassName (c har* className)44 void BaseObject::setClassName (const char* className) 45 45 { 46 this->className = new char[strlen(className)+1]; 47 strcpy(this->className, className); 48 } 49 50 char* BaseObject::getClassName(void) const 51 { 52 return className; 46 this->className = className; 53 47 } 54 48 -
orxonox/branches/levelLoader/src/lib/lang/base_object.h
r3651 r4257 17 17 virtual ~BaseObject (); 18 18 19 void setClassName (c har* className);20 char* getClassName(void) const;19 void setClassName (const char* className); 20 inline const char* getClassName(void) const { return this->className;}; 21 21 bool isA (char* className); 22 22 … … 25 25 26 26 private: 27 c har* className;27 const char* className; 28 28 bool finalized; 29 29 };
Note: See TracChangeset
for help on using the changeset viewer.