Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7218 in orxonox.OLD for branches/std/src/lib/lang/base_object.h


Ignore:
Timestamp:
Mar 12, 2006, 3:00:04 PM (18 years ago)
Author:
bensch
Message:

orxonox/std:: more strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/lang/base_object.h

    r7214 r7218  
    3838
    3939  /** @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(); };
    4141  /** @returns the classID of the corresponding Object */
    4242  inline int getClassID() const { return this->classID; };
     
    4444
    4545  bool isA (ClassID classID) const;
    46   bool isA (const char* className) const;
     46  bool isA (const std::string& className) const;
    4747  void whatIs() const;
    4848
    49   bool operator==(const char* objectName);
     49  bool operator==(const std::string& objectName);
    5050  /** @param classID comparer for a ClassID @returns true on match, false otherwise */
    5151  bool operator==(ClassID classID) { return this->isA(classID); };
     
    5555
    5656 protected:
    57   void setClassID(ClassID classID, const char* className);
     57   void setClassID(ClassID classID, const std::string& className);
    5858
    5959 private:
    60     const char*        className;        //!< the name of the class
     60    std::string        className;        //!< the name of the class
    6161    long               classID;          //!< this is the id from the class_id.h enumeration
    6262    std::string        objectName;       //!< The name of this object
Note: See TracChangeset for help on using the changeset viewer.