Changeset 813 for code/branches/core/src/orxonox/core/OrxonoxClass.h
- Timestamp:
- Feb 15, 2008, 4:31:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/core/OrxonoxClass.h
r792 r813 26 26 */ 27 27 28 /* !28 /** 29 29 @file OrxonoxClass.h 30 30 @brief Definition of the OrxonoxClass Class. … … 37 37 #define _OrxonoxClass_H__ 38 38 39 #include <list> 39 40 #include <string> 40 41 … … 59 60 void setConfigValues() {}; 60 61 61 /** @ returns the Identifier of the object*/62 /** @brief Returns the Identifier of the object. @return The Identifier */ 62 63 inline Identifier* getIdentifier() const { return this->identifier_; } 63 64 … … 65 66 inline void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; } 66 67 67 /** @ returns the list of all parents of the object */68 inline IdentifierList* getParents() const { return this->parents_; }68 /** @brief Returns the list of all parents of the object. @return The list */ 69 inline std::list<const Identifier*>* getParents() const { return this->parents_; } 69 70 70 /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */71 inline void setParents(IdentifierList* parents) { this->parents_ = parents; }71 /** @brief Creates the parents-list. */ 72 inline void createParents() { this->parents_ = new std::list<const Identifier*>(); } 72 73 73 /** @returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. */ 74 // /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */ 75 // inline void setParents(std::list<const Identifier*>* parents) { this->parents_ = parents; } 76 77 /** @brief Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. @return The list */ 74 78 inline MetaObjectList& getMetaList() { return this->metaList_; } 75 79 76 80 77 /** @ returns true if the objects class is of the given type or a derivative. */81 /** @brief Returns true if the objects class is of the given type or a derivative. */ 78 82 inline bool isA(const Identifier* identifier) 79 83 { return this->getIdentifier()->isA(identifier); } 80 /** @ returns true if the objects class is exactly of the given type. */84 /** @brief Returns true if the objects class is exactly of the given type. */ 81 85 inline bool isDirectlyA(const Identifier* identifier) 82 86 { return this->getIdentifier()->isDirectlyA(identifier); } 83 /** @ returns true if the objects class is a child of the given type. */87 /** @brief Returns true if the objects class is a child of the given type. */ 84 88 inline bool isChildOf(const Identifier* identifier) 85 89 { return this->getIdentifier()->isChildOf(identifier); } 86 /** @ returns true if the objects class is a parent of the given type. */90 /** @brief Returns true if the objects class is a parent of the given type. */ 87 91 inline bool isParentOf(const Identifier* identifier) 88 92 { return this->getIdentifier()->isParentOf(identifier); } 89 93 90 94 91 /** @ returns true if the objects class is of the given type or a derivative. */95 /** @brief Returns true if the objects class is of the given type or a derivative. */ 92 96 inline bool isA(const SubclassIdentifier<class B>* identifier) 93 97 { return this->getIdentifier()->isA(identifier->getIdentifier()); } 94 /** @ returns true if the objects class is exactly of the given type. */98 /** @brief Returns true if the objects class is exactly of the given type. */ 95 99 inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier) 96 100 { return this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); } 97 /** @ returns true if the objects class is a child of the given type. */101 /** @brief Returns true if the objects class is a child of the given type. */ 98 102 inline bool isChildOf(const SubclassIdentifier<class B>* identifier) 99 103 { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); } 100 /** @ returns true if the objects class is a parent of the given type. */104 /** @brief Returns true if the objects class is a parent of the given type. */ 101 105 inline bool isParentOf(const SubclassIdentifier<class B>* identifier) 102 106 { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); } 103 107 104 108 105 /** @ returns true if the objects class is of the given type or a derivative. */109 /** @brief Returns true if the objects class is of the given type or a derivative. */ 106 110 inline bool isA(const SubclassIdentifier<class B> identifier) 107 111 { return this->getIdentifier()->isA(identifier.getIdentifier()); } 108 /** @ returns true if the objects class is exactly of the given type. */112 /** @brief Returns true if the objects class is exactly of the given type. */ 109 113 inline bool isDirectlyA(const SubclassIdentifier<class B> identifier) 110 114 { return this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); } 111 /** @ returns true if the objects class is a child of the given type. */115 /** @brief Returns true if the objects class is a child of the given type. */ 112 116 inline bool isChildOf(const SubclassIdentifier<class B> identifier) 113 117 { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); } 114 /** @ returns true if the objects class is a parent of the given type. */118 /** @brief Returns true if the objects class is a parent of the given type. */ 115 119 inline bool isParentOf(const SubclassIdentifier<class B> identifier) 116 120 { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); } 117 121 118 122 119 /** @ returns true if the objects class is of the given type or a derivative. */123 /** @brief Returns true if the objects class is of the given type or a derivative. */ 120 124 inline bool isA(const OrxonoxClass* object) 121 125 { return this->getIdentifier()->isA(object->getIdentifier()); } 122 /** @ returns true if the objects class is exactly of the given type. */126 /** @brief Returns true if the objects class is exactly of the given type. */ 123 127 inline bool isDirectlyA(const OrxonoxClass* object) 124 128 { return this->getIdentifier()->isDirectlyA(object->getIdentifier()); } 125 /** @ returns true if the objects class is a child of the given type. */129 /** @brief Returns true if the objects class is a child of the given type. */ 126 130 inline bool isChildOf(const OrxonoxClass* object) 127 131 { return this->getIdentifier()->isChildOf(object->getIdentifier()); } 128 /** @ returns true if the objects class is a parent of the given type. */132 /** @brief Returns true if the objects class is a parent of the given type. */ 129 133 inline bool isParentOf(const OrxonoxClass* object) 130 134 { return this->getIdentifier()->isParentOf(object->getIdentifier()); } … … 134 138 inline virtual void setName(const std::string& name) { this->name_ = name; } 135 139 136 /** @ returns the name of the object.*/140 /** @brief Returns the name of the object. @return The name */ 137 141 inline const std::string& getName() const { return this->name_; } 138 142 … … 140 144 inline virtual void setActive(bool bActive) { this->bActive_ = bActive; } 141 145 142 /** @ returns the state of the objects activity.*/146 /** @brief Returns the state of the objects activity. @return The state of the activity */ 143 147 inline const bool isActive() const { return this->bActive_; } 144 148 … … 146 150 inline virtual void setVisible(bool bVisible) { this->bVisible_ = bVisible; } 147 151 148 /** @ returns the state of the objects visibility.*/152 /** @brief Returns the state of the objects visibility. @return The state of the visibility */ 149 153 inline const bool isVisible() const { return this->bVisible_; } 150 154 151 155 private: 152 Identifier* identifier_; //!< The Identifier of the object153 IdentifierList* parents_;//!< List of all parents of the object154 MetaObjectList metaList_; //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in156 Identifier* identifier_; //!< The Identifier of the object 157 std::list<const Identifier*>* parents_; //!< List of all parents of the object 158 MetaObjectList metaList_; //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in 155 159 156 std::string name_; //!< The name of the object157 bool bActive_; //!< True = the object is active158 bool bVisible_; //!< True = the object is visible160 std::string name_; //!< The name of the object 161 bool bActive_; //!< True = the object is active 162 bool bVisible_; //!< True = the object is visible 159 163 }; 160 164 template class _CoreExport orxonox::ClassIdentifier<OrxonoxClass>;
Note: See TracChangeset
for help on using the changeset viewer.