Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 25, 2006, 11:20:21 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: new safer concept for NewClassID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/lang/new_object_list.h

    r9698 r9701  
    5151
    5252public:
    53   inline const NewClassID& identity() const { return _identity; };
    54   inline int id() const { return _identity.id(); };
    55   inline const std::string& name() const { return _identity.name(); };
    56   bool operator==(int id) const { return _identity == id; };
    57   bool operator==(const NewClassID& id) const { return _identity == id; };
    58   bool operator==(const std::string& name) const { return _identity == name; };
     53  inline const NewClassID& identity() const { return _identity; }
     54  inline int id() const { return _id; };
     55  inline const std::string& name() const { return _name; };
     56  bool operator==(int id) const { return _id == id; };
     57  bool operator==(const NewClassID& id) const { return id == _id; };
     58  bool operator==(const std::string& name) const { return _name == name; };
     59
     60  void acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
    5961
    6062  virtual void debug() const = 0;
     
    130132  typedef std::map<std::string, NewObjectListBase*> classNameMap; //!< The Generic Map.
    131133
    132   NewClassID                    _identity;          //!< The Identity of the Class (ID and Name).
     134  int                           _id;
     135  const std::string             _name;              //!< The Name of the Class.
     136  NewClassID                    _identity;          //!< The Identity of the Class. (equal to _id and _name)
    133137
    134138private:
Note: See TracChangeset for help on using the changeset viewer.