Changeset 7218 in orxonox.OLD for branches/std/src/lib/lang/base_object.h
- Timestamp:
- Mar 12, 2006, 3:00:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/lang/base_object.h
r7214 r7218 38 38 39 39 /** @returns the className of the corresponding Object */ 40 inline const char* getClassName() const { return this->className ; };40 inline const char* getClassName() const { return this->className.c_str(); }; 41 41 /** @returns the classID of the corresponding Object */ 42 42 inline int getClassID() const { return this->classID; }; … … 44 44 45 45 bool isA (ClassID classID) const; 46 bool isA (const char*className) const;46 bool isA (const std::string& className) const; 47 47 void whatIs() const; 48 48 49 bool operator==(const char*objectName);49 bool operator==(const std::string& objectName); 50 50 /** @param classID comparer for a ClassID @returns true on match, false otherwise */ 51 51 bool operator==(ClassID classID) { return this->isA(classID); }; … … 55 55 56 56 protected: 57 void setClassID(ClassID classID, const char*className);57 void setClassID(ClassID classID, const std::string& className); 58 58 59 59 private: 60 const char*className; //!< the name of the class60 std::string className; //!< the name of the class 61 61 long classID; //!< this is the id from the class_id.h enumeration 62 62 std::string objectName; //!< The name of this object
Note: See TracChangeset
for help on using the changeset viewer.