[Orxonox-commit 1052] r5772 - code/branches/core5/src/libraries/core

landauf at orxonox.net landauf at orxonox.net
Wed Sep 23 22:48:10 CEST 2009


Author: landauf
Date: 2009-09-23 22:48:09 +0200 (Wed, 23 Sep 2009)
New Revision: 5772

Modified:
   code/branches/core5/src/libraries/core/OrxonoxClass.cc
   code/branches/core5/src/libraries/core/OrxonoxClass.h
Log:
fixed an issue with SubclassIdentifier comparisons in OrxonoxClass

Modified: code/branches/core5/src/libraries/core/OrxonoxClass.cc
===================================================================
--- code/branches/core5/src/libraries/core/OrxonoxClass.cc	2009-09-23 19:59:07 UTC (rev 5771)
+++ code/branches/core5/src/libraries/core/OrxonoxClass.cc	2009-09-23 20:48:09 UTC (rev 5772)
@@ -77,46 +77,6 @@
 
 
     /** @brief Returns true if the objects class is of the given type or a derivative. */
-    template <class B> bool OrxonoxClass::isA(const SubclassIdentifier<B>* identifier)
-        { return this->getIdentifier()->isA(identifier->getIdentifier()); }
-    /** @brief Returns true if the objects class is exactly of the given type. */
-    template <class B> bool OrxonoxClass::isExactlyA(const SubclassIdentifier<B>* identifier)
-        { return this->getIdentifier()->isExactlyA(identifier->getIdentifier()); }
-    /** @brief Returns true if the objects class is a child of the given type. */
-    template <class B> bool OrxonoxClass::isChildOf(const SubclassIdentifier<B>* identifier)
-        { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
-    /** @brief Returns true if the objects class is a direct child of the given type. */
-    template <class B> bool OrxonoxClass::isDirectChildOf(const SubclassIdentifier<B>* identifier)
-        { return this->getIdentifier()->isDirectChildOf(identifier->getIdentifier()); }
-    /** @brief Returns true if the objects class is a parent of the given type. */
-    template <class B> bool OrxonoxClass::isParentOf(const SubclassIdentifier<B>* identifier)
-        { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
-    /** @brief Returns true if the objects class is a direct parent of the given type. */
-    template <class B> bool OrxonoxClass::isDirectParentOf(const SubclassIdentifier<B>* identifier)
-        { return this->getIdentifier()->isDirectParentOf(identifier->getIdentifier()); }
-
-
-    /** @brief Returns true if the objects class is of the given type or a derivative. */
-    template <class B> bool OrxonoxClass::isA(const SubclassIdentifier<B> identifier)
-        { return this->getIdentifier()->isA(identifier.getIdentifier()); }
-    /** @brief Returns true if the objects class is exactly of the given type. */
-    template <class B> bool OrxonoxClass::isExactlyA(const SubclassIdentifier<B> identifier)
-        { return this->getIdentifier()->isExactlyA(identifier.getIdentifier()); }
-    /** @brief Returns true if the objects class is a child of the given type. */
-    template <class B> bool OrxonoxClass::isChildOf(const SubclassIdentifier<B> identifier)
-        { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
-    /** @brief Returns true if the objects class is a direct child of the given type. */
-    template <class B> bool OrxonoxClass::isDirectChildOf(const SubclassIdentifier<B> identifier)
-        { return this->getIdentifier()->isDirectChildOf(identifier.getIdentifier()); }
-    /** @brief Returns true if the objects class is a parent of the given type. */
-    template <class B> bool OrxonoxClass::isParentOf(const SubclassIdentifier<B> identifier)
-        { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
-    /** @brief Returns true if the objects class is a direct parent of the given type. */
-    template <class B> bool OrxonoxClass::isDirectParentOf(const SubclassIdentifier<B> identifier)
-        { return this->getIdentifier()->isDirectParentOf(identifier.getIdentifier()); }
-
-
-    /** @brief Returns true if the objects class is of the given type or a derivative. */
     bool OrxonoxClass::isA(const OrxonoxClass* object)
         { return this->getIdentifier()->isA(object->getIdentifier()); }
     /** @brief Returns true if the objects class is exactly of the given type. */

Modified: code/branches/core5/src/libraries/core/OrxonoxClass.h
===================================================================
--- code/branches/core5/src/libraries/core/OrxonoxClass.h	2009-09-23 19:59:07 UTC (rev 5771)
+++ code/branches/core5/src/libraries/core/OrxonoxClass.h	2009-09-23 20:48:09 UTC (rev 5772)
@@ -71,20 +71,19 @@
             bool isParentOf(const Identifier* identifier);
             bool isDirectParentOf(const Identifier* identifier);
 
-            template <class B> bool isA(const SubclassIdentifier<B>* identifier);
-            template <class B> bool isExactlyA(const SubclassIdentifier<B>* identifier);
-            template <class B> bool isChildOf(const SubclassIdentifier<B>* identifier);
-            template <class B> bool isDirectChildOf(const SubclassIdentifier<B>* identifier);
-            template <class B> bool isParentOf(const SubclassIdentifier<B>* identifier);
-            template <class B> bool isDirectParentOf(const SubclassIdentifier<B>* identifier);
+            template <class B> inline bool isA(const SubclassIdentifier<B>* identifier)
+                { return this->isA(*identifier); }
+            template <class B> inline bool isExactlyA(const SubclassIdentifier<B>* identifier)
+                { return this->isExactlyA(*identifier); }
+            template <class B> inline bool isChildOf(const SubclassIdentifier<B>* identifier)
+                { return this->isChildOf(*identifier); }
+            template <class B> inline bool isDirectChildOf(const SubclassIdentifier<B>* identifier)
+                { return this->isDirectChildOf(*identifier); }
+            template <class B> inline bool isParentOf(const SubclassIdentifier<B>* identifier)
+                { return this->isParentOf(*identifier); }
+            template <class B> inline bool isDirectParentOf(const SubclassIdentifier<B>* identifier)
+                { return this->isDirectParentOf(*identifier); }
 
-            template <class B> bool isA(const SubclassIdentifier<B> identifier);
-            template <class B> bool isExactlyA(const SubclassIdentifier<B> identifier);
-            template <class B> bool isChildOf(const SubclassIdentifier<B> identifier);
-            template <class B> bool isDirectChildOf(const SubclassIdentifier<B> identifier);
-            template <class B> bool isParentOf(const SubclassIdentifier<B> identifier);
-            template <class B> bool isDirectParentOf(const SubclassIdentifier<B> identifier);
-
             bool isA(const OrxonoxClass* object);
             bool isExactlyA(const OrxonoxClass* object);
             bool isChildOf(const OrxonoxClass* object);




More information about the Orxonox-commit mailing list