Changeset 1502 for code/trunk/src/core/OrxonoxClass.cc
- Timestamp:
- Jun 1, 2008, 3:54:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/OrxonoxClass.cc
r1293 r1502 33 33 34 34 #include "OrxonoxClass.h" 35 #include "MetaObjectList.h" 36 #include "Identifier.h" 35 37 36 38 namespace orxonox … … 41 43 parents_(0) 42 44 { 45 this->metaList_ = new MetaObjectList(); 46 43 47 this->setConfigValues(); 44 48 } … … 47 51 OrxonoxClass::~OrxonoxClass() 48 52 { 53 delete this->metaList_; 54 49 55 // parents_ exists only if isCreatingHierarchy() of the associated Identifier returned true while creating the class 50 56 if (this->parents_) 51 57 delete this->parents_; 52 58 } 59 60 /** @brief Returns true if the objects class is of the given type or a derivative. */ 61 bool OrxonoxClass::isA(const Identifier* identifier) 62 { return this->getIdentifier()->isA(identifier); } 63 /** @brief Returns true if the objects class is exactly of the given type. */ 64 bool OrxonoxClass::isExactlyA(const Identifier* identifier) 65 { return this->getIdentifier()->isExactlyA(identifier); } 66 /** @brief Returns true if the objects class is a child of the given type. */ 67 bool OrxonoxClass::isChildOf(const Identifier* identifier) 68 { return this->getIdentifier()->isChildOf(identifier); } 69 /** @brief Returns true if the objects class is a direct child of the given type. */ 70 bool OrxonoxClass::isDirectChildOf(const Identifier* identifier) 71 { return this->getIdentifier()->isDirectChildOf(identifier); } 72 /** @brief Returns true if the objects class is a parent of the given type. */ 73 bool OrxonoxClass::isParentOf(const Identifier* identifier) 74 { return this->getIdentifier()->isParentOf(identifier); } 75 /** @brief Returns true if the objects class is a direct parent of the given type. */ 76 bool OrxonoxClass::isDirectParentOf(const Identifier* identifier) 77 { return this->getIdentifier()->isDirectParentOf(identifier); } 78 79 80 /** @brief Returns true if the objects class is of the given type or a derivative. */ 81 bool OrxonoxClass::isA(const SubclassIdentifier<class B>* identifier) 82 { return this->getIdentifier()->isA(identifier->getIdentifier()); } 83 /** @brief Returns true if the objects class is exactly of the given type. */ 84 bool OrxonoxClass::isExactlyA(const SubclassIdentifier<class B>* identifier) 85 { return this->getIdentifier()->isExactlyA(identifier->getIdentifier()); } 86 /** @brief Returns true if the objects class is a child of the given type. */ 87 bool OrxonoxClass::isChildOf(const SubclassIdentifier<class B>* identifier) 88 { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); } 89 /** @brief Returns true if the objects class is a direct child of the given type. */ 90 bool OrxonoxClass::isDirectChildOf(const SubclassIdentifier<class B>* identifier) 91 { return this->getIdentifier()->isDirectChildOf(identifier->getIdentifier()); } 92 /** @brief Returns true if the objects class is a parent of the given type. */ 93 bool OrxonoxClass::isParentOf(const SubclassIdentifier<class B>* identifier) 94 { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); } 95 /** @brief Returns true if the objects class is a direct parent of the given type. */ 96 bool OrxonoxClass::isDirectParentOf(const SubclassIdentifier<class B>* identifier) 97 { return this->getIdentifier()->isDirectParentOf(identifier->getIdentifier()); } 98 99 100 /** @brief Returns true if the objects class is of the given type or a derivative. */ 101 bool OrxonoxClass::isA(const SubclassIdentifier<class B> identifier) 102 { return this->getIdentifier()->isA(identifier.getIdentifier()); } 103 /** @brief Returns true if the objects class is exactly of the given type. */ 104 bool OrxonoxClass::isExactlyA(const SubclassIdentifier<class B> identifier) 105 { return this->getIdentifier()->isExactlyA(identifier.getIdentifier()); } 106 /** @brief Returns true if the objects class is a child of the given type. */ 107 bool OrxonoxClass::isChildOf(const SubclassIdentifier<class B> identifier) 108 { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); } 109 /** @brief Returns true if the objects class is a direct child of the given type. */ 110 bool OrxonoxClass::isDirectChildOf(const SubclassIdentifier<class B> identifier) 111 { return this->getIdentifier()->isDirectChildOf(identifier.getIdentifier()); } 112 /** @brief Returns true if the objects class is a parent of the given type. */ 113 bool OrxonoxClass::isParentOf(const SubclassIdentifier<class B> identifier) 114 { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); } 115 /** @brief Returns true if the objects class is a direct parent of the given type. */ 116 bool OrxonoxClass::isDirectParentOf(const SubclassIdentifier<class B> identifier) 117 { return this->getIdentifier()->isDirectParentOf(identifier.getIdentifier()); } 118 119 120 /** @brief Returns true if the objects class is of the given type or a derivative. */ 121 bool OrxonoxClass::isA(const OrxonoxClass* object) 122 { return this->getIdentifier()->isA(object->getIdentifier()); } 123 /** @brief Returns true if the objects class is exactly of the given type. */ 124 bool OrxonoxClass::isExactlyA(const OrxonoxClass* object) 125 { return this->getIdentifier()->isExactlyA(object->getIdentifier()); } 126 /** @brief Returns true if the objects class is a child of the given type. */ 127 bool OrxonoxClass::isChildOf(const OrxonoxClass* object) 128 { return this->getIdentifier()->isChildOf(object->getIdentifier()); } 129 /** @brief Returns true if the objects class is a direct child of the given type. */ 130 bool OrxonoxClass::isDirectChildOf(const OrxonoxClass* object) 131 { return this->getIdentifier()->isDirectChildOf(object->getIdentifier()); } 132 /** @brief Returns true if the objects class is a parent of the given type. */ 133 bool OrxonoxClass::isParentOf(const OrxonoxClass* object) 134 { return this->getIdentifier()->isParentOf(object->getIdentifier()); } 135 /** @brief Returns true if the objects class is a direct child of the given type. */ 136 bool OrxonoxClass::isDirectParentOf(const OrxonoxClass* object) 137 { return this->getIdentifier()->isDirectParentOf(object->getIdentifier()); } 53 138 }
Note: See TracChangeset
for help on using the changeset viewer.