Changeset 7373 for code/branches/doc/src/libraries/core/OrxonoxClass.h
- Timestamp:
- Sep 7, 2010, 11:24:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/core/OrxonoxClass.h
r7372 r7373 63 63 64 64 The BaseObject and Interfaces are derived with @c virtual @c public @c OrxonoxClass from OrxonoxClass. 65 OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the MetaObjectList. 65 OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the 66 MetaObjectList, as well as to provide an interface for SmartPtr and WeakPtr. 66 67 */ 67 68 class _CoreExport OrxonoxClass … … 96 97 bool isDirectParentOf(const Identifier* identifier); 97 98 99 /// Returns true if the object's class is of the given type or a derivative. 98 100 template <class B> inline bool isA(const SubclassIdentifier<B>* identifier) 99 101 { return this->isA(*identifier); } 102 /// Returns true if the object's class is exactly of the given type. 100 103 template <class B> inline bool isExactlyA(const SubclassIdentifier<B>* identifier) 101 104 { return this->isExactlyA(*identifier); } 105 /// Returns true if the object's class is a child of the given type. 102 106 template <class B> inline bool isChildOf(const SubclassIdentifier<B>* identifier) 103 107 { return this->isChildOf(*identifier); } 108 /// Returns true if the object's class is a direct child of the given type. 104 109 template <class B> inline bool isDirectChildOf(const SubclassIdentifier<B>* identifier) 105 110 { return this->isDirectChildOf(*identifier); } 111 /// Returns true if the object's class is a parent of the given type. 106 112 template <class B> inline bool isParentOf(const SubclassIdentifier<B>* identifier) 107 113 { return this->isParentOf(*identifier); } 114 /// Returns true if the object's class is a direct parent of the given type. 108 115 template <class B> inline bool isDirectParentOf(const SubclassIdentifier<B>* identifier) 109 116 { return this->isDirectParentOf(*identifier); } … … 118 125 virtual void clone(OrxonoxClass*& item) {} 119 126 127 /// Returns the number of @ref orxonox::SmartPtr "smart pointers" that point to this object. 120 128 inline unsigned int getReferenceCount() const 121 129 { return this->referenceCount_; } … … 146 154 147 155 protected: 156 /// This virtual function is called if destroy() is called and no SmartPtr points to this object. Used in some cases to create a new SmartPtr to prevent destruction. 148 157 virtual void preDestroy() {} 149 158 … … 169 178 { this->weakPointers_.erase(reinterpret_cast<WeakPtr<OrxonoxClass>*>(pointer)); } 170 179 171 Identifier* identifier_; //!< The Identifier of the object172 std::set<const Identifier*>* parents_; //!< List of all parents of the object173 MetaObjectList* metaList_; //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in174 int referenceCount_; //!< Counts the references from smart pointers to this object175 bool requestedDestruction_; //!< Becomes true after someone called delete on this object176 std::set<WeakPtr<OrxonoxClass>*> weakPointers_; //!< All weak pointers which point to this object (and like to get notified if it dies)180 Identifier* identifier_; //!< The Identifier of the object 181 std::set<const Identifier*>* parents_; //!< List of all parents of the object 182 MetaObjectList* metaList_; //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in 183 int referenceCount_; //!< Counts the references from smart pointers to this object 184 bool requestedDestruction_; //!< Becomes true after someone called delete on this object 185 std::set<WeakPtr<OrxonoxClass>*> weakPointers_; //!< All weak pointers which point to this object (and like to get notified if it dies) 177 186 178 187 /// 'Fast map' that holds this-pointers of all derived types
Note: See TracChangeset
for help on using the changeset viewer.