Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4320 in orxonox.OLD for orxonox/trunk/src/lib/lang


Ignore:
Timestamp:
May 27, 2005, 1:13:42 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: now string name of a class works parallel to the int id representation and is only used for documentation purposes

Location:
orxonox/trunk/src/lib/lang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/lang/base_object.cc

    r4318 r4320  
    4242}
    4343
     44void BaseObject::setClassID(int id, const char* className)
     45{
     46  this->id = id;
     47  this->className = className;
     48}
     49
    4450
    4551void BaseObject::setClassID (int id)
     
    4854}
    4955
     56void BaseObject::setClassName(const char* className)
     57{
     58  this->className = className;
     59}
    5060
    5161
  • orxonox/trunk/src/lib/lang/base_object.h

    r4318 r4320  
    1717  virtual ~BaseObject ();
    1818
    19   //void setClassName (const char* className);
    2019  void setClassID(int id);
     20  void setClassName(const char* className);
     21  void setClassID(int id, const char* className);
    2122
    22   inline const char* getClassName(void) const { return "";};
     23  inline const char* getClassName(void) const { return this->className;};
    2324  inline int getClassID(void) const { return this->id; }
    2425  bool isA (char* className);
Note: See TracChangeset for help on using the changeset viewer.