Changeset 9685 in orxonox.OLD for branches/new_class_id/src/lib/lang/new_object_list.h
- Timestamp:
- Aug 22, 2006, 1:16:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/lang/new_object_list.h
r9684 r9685 8 8 #define _NEW_OBJECT_LIST_H 9 9 10 #include " type_info.h"10 #include "new_class_id.h" 11 11 #include <map> 12 12 #include <list> … … 40 40 41 41 public: 42 inline int id() const { return _id ; };43 inline const std::string& name() const { return _ name; };44 bool operator==(int id) const { return _id == id; };45 bool operator==(const std::string& name) const { return _ name== name; };42 inline int id() const { return _identity.id(); }; 43 inline const std::string& name() const { return _identity.name(); }; 44 bool operator==(int id) const { return _identity == id; }; 45 bool operator==(const std::string& name) const { return _identity == name; }; 46 46 47 47 virtual void debug() const = 0; … … 69 69 typedef std::map<std::string, NewObjectListBase*> classNameMap;//!< The Generic Map. 70 70 71 int _id; //!< The ID of the class. 72 std::string _name; //!< The Name of the Class. 71 NewClassID _identity; //!< The Identity of the Class (ID and Name). 73 72 74 73 private: … … 114 113 inline const list& objects() const { return _objects; }; 115 114 115 inline iterator begin() { return _objects.begin(); }; 116 inline const_iterator begin() const { return _objects.begin(); }; 117 inline iterator end() { return _objects.end(); }; 118 inline const_iterator end() const { return _objects.end(); }; 119 120 inline bool empty() const { return _objects.empty(); }; 121 inline int size() const { return _objects.size(); }; 122 inline T* front() const { return _objects.front(); }; 123 inline T* back() const { return _objects.back(); }; 124 116 125 NewObjectListBase::IteratorBase* registerObject(T* object); 117 126 void unregisterObject(IteratorBase* iterator);
Note: See TracChangeset
for help on using the changeset viewer.