Changeset 9691 in orxonox.OLD for branches/new_class_id/src/lib/lang/base_object.h
- Timestamp:
- Aug 22, 2006, 11:45:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/lang/base_object.h
r9686 r9691 26 26 class BaseObject : public sigslot::has_slots<> 27 27 { 28 28 NewObjectListDeclaration(BaseObject); 29 29 public: 30 30 BaseObject (const std::string& objectName = ""); … … 49 49 50 50 /** @returns the ID of the Topmost object of the ClassStack */ 51 inline int getLeafClassID() const { return _classes.front()._objectList->id(); }51 inline const int& getLeafClassID() const { return _leafClassID->id(); } 52 52 53 53 bool isA(const NewObjectListBase& objectList) const; … … 88 88 std::string className; //!< the name of the class 89 89 ClassList _classes; //!< All Classes this object is part of. 90 90 const NewClassID* _leafClassID; //!< Topmost ClassID. 91 91 }; 92 92 … … 104 104 inline void BaseObject::registerObject(T* object, NewObjectList<T>& objectList) 105 105 { 106 this->_leafClassID = &objectList.identity(); 106 107 this->_classes.push_front(ClassEntry(&objectList, objectList.registerObject(object))); 107 108 }
Note: See TracChangeset
for help on using the changeset viewer.