Changeset 9678 in orxonox.OLD for trunk/src/lib/lang/new_class_id.h
- Timestamp:
- Aug 21, 2006, 11:59:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/new_class_id.h
r9673 r9678 24 24 25 25 26 int leafClassID() const { return _classes.front()._objectList->id(); } 27 26 28 template<class T> void registerObject(T* object, NewObjectList<T>& list); 27 29 bool isA(const NewObjectListBase& objectList) const; 28 bool isA(int id) const;30 bool isA(int classID) const; 29 31 bool isA(const std::string& className) const; 30 32 33 void listInheritance() const; 34 31 35 private: 32 33 36 ////////////////////////////// 34 37 //// Type Definition Part //// 35 38 ////////////////////////////// 36 39 //! A ClassEntry so we can store Classes inside of Objects 37 struct ClassEntry{ 40 struct ClassEntry 41 { 38 42 /** Simple Constuctor @param objectList the NewObjectList, @param iterator the (intrusive) Iterator inside of the ObjectList */ 39 43 inline ClassEntry (NewObjectListBase* objectList, NewObjectListBase::IteratorBase* iterator) : _objectList(objectList), _iterator(iterator) {} … … 42 46 }; 43 47 typedef std::list<ClassEntry> ClassList; //!< Type definition for the List. 48 44 49 ClassList _classes; //!< All Classes this object is part of. 45 50 }; … … 56 61 */ 57 62 template<class T> 58 63 inline void NewClassID::registerObject(T* object, NewObjectList<T>& objectList) 59 64 { 60 this->_classes.push_ back(ClassEntry(&objectList, objectList.registerObject(object)));65 this->_classes.push_front(ClassEntry(&objectList, objectList.registerObject(object))); 61 66 } 62 67
Note: See TracChangeset
for help on using the changeset viewer.