Changeset 9664 in orxonox.OLD for trunk/src/lib/lang/new_object_list.h
- Timestamp:
- Aug 20, 2006, 7:50:38 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/new_object_list.h
r9663 r9664 32 32 bool compareName(const NewObjectListBase& more) { return this->_name < more.name(); }; 33 33 bool compareID(const NewObjectListBase& more) { return this->_id < more.id(); }; 34 35 34 36 35 static unsigned int classCount() { return _idCounter; }; … … 75 74 typedef typename list::iterator iterator; 76 75 77 78 76 public: 79 77 NewObjectList(const std::string& name); … … 83 81 inline const list& objects() const { return _objects; }; 84 82 83 void registerObject(T* object); 84 void unregisterObject(T* object); 85 85 86 86 private: … … 112 112 } 113 113 114 template <class T> 115 void NewObjectList<T>::registerObject(T* object) 116 { 117 this->_objects.push_back(object); 118 } 119 120 template <class T> 121 void NewObjectList<T>::unregisterObject(T* object) 122 { 123 _objects.erase(std::find(_objects.begin(), _objects.end(), object)); 124 } 125 126 114 127 #endif /* _NEW_OBJECT_LIST_H */
Note: See TracChangeset
for help on using the changeset viewer.