Changeset 9715 in orxonox.OLD for branches/new_class_id/src/lib/lang/base_object.h
- Timestamp:
- Sep 1, 2006, 8:06:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/lang/base_object.h
r9709 r9715 26 26 class BaseObject : public sigslot::has_slots<> 27 27 { 28 NewObjectListDeclaration(BaseObject);28 ObjectListDeclaration(BaseObject); 29 29 public: 30 30 BaseObject (const std::string& objectName = ""); … … 48 48 inline const std::string& getClassName() const { return _classes.front()._objectList->name(); }; 49 49 50 inline const NewClassID& getClassID() const { return *_leafClassID; }50 inline const ClassID& getClassID() const { return *_leafClassID; } 51 51 /** @returns the ID of the Topmost object of the ClassStack */ 52 52 inline const int& getLeafClassID() const { return _leafClassID->id(); } 53 53 54 bool isA(const NewObjectListBase& objectList) const;55 bool isA(const NewClassID& classID) const;54 bool isA(const ObjectListBase& objectList) const; 55 bool isA(const ClassID& classID) const; 56 56 bool isA(int classID) const; 57 57 bool isA(const std::string& className) const; … … 65 65 66 66 protected: 67 template<class T> void registerObject(T* object, NewObjectList<T>& list);67 template<class T> void registerObject(T* object, ObjectList<T>& list); 68 68 69 69 protected: … … 80 80 struct ClassEntry 81 81 { 82 /** Simple Constuctor @param objectList the NewObjectList, @param iterator the (intrusive) Iterator inside of the ObjectList */83 inline ClassEntry ( NewObjectListBase* objectList, NewObjectListBase::IteratorBase* iterator) : _objectList(objectList), _iterator(iterator) {}84 NewObjectListBase* _objectList; //!< A ObjectList this Object is part of85 NewObjectListBase::IteratorBase* _iterator; //!< An iterator pointing to the position of the Object inside of the List.82 /** Simple Constuctor @param objectList the ObjectList, @param iterator the (intrusive) Iterator inside of the ObjectList */ 83 inline ClassEntry (ObjectListBase* objectList, ObjectListBase::IteratorBase* iterator) : _objectList(objectList), _iterator(iterator) {} 84 ObjectListBase* _objectList; //!< A ObjectList this Object is part of 85 ObjectListBase::IteratorBase* _iterator; //!< An iterator pointing to the position of the Object inside of the List. 86 86 }; 87 87 typedef std::list<ClassEntry> ClassList; //!< Type definition for the List. … … 89 89 std::string className; //!< the name of the class 90 90 ClassList _classes; //!< All Classes this object is part of. 91 const NewClassID* _leafClassID; //!< Topmost ClassID.91 const ClassID* _leafClassID; //!< Topmost ClassID. 92 92 }; 93 93 … … 103 103 */ 104 104 template<class T> 105 inline void BaseObject::registerObject(T* object, NewObjectList<T>& objectList)105 inline void BaseObject::registerObject(T* object, ObjectList<T>& objectList) 106 106 { 107 107 this->_leafClassID = &objectList.identity();
Note: See TracChangeset
for help on using the changeset viewer.