Index: /code/branches/objecthierarchie/src/BaseObject.h
===================================================================
--- /code/branches/objecthierarchie/src/BaseObject.h	(revision 196)
+++ /code/branches/objecthierarchie/src/BaseObject.h	(revision 197)
@@ -2,6 +2,5 @@
 #define _BaseObject_H__
 
-#include "ClassHierarchy.h"
-#include "OrxonoxClass.h"
+#include "IdentifierIncludes.h"
 
 namespace orxonox
@@ -26,8 +25,43 @@
                 { this->getIdentifier()->isDirectParentOf(identifier); }
 
-//            Identifier* identifier_;
+            inline bool isA(BaseIdentifier<class B>* identifier)
+                { this->getIdentifier()->isA(identifier->getIdentifier()); }
+            inline bool isDirectlyA(BaseIdentifier<class B>* identifier)
+                { this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
+            inline bool isChildOf(BaseIdentifier<class B>* identifier)
+                { this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
+            inline bool isDirectChildOf(BaseIdentifier<class B>* identifier)
+                { this->getIdentifier()->isDirectChildOf(identifier->getIdentifier()); }
+            inline bool isParentOf(BaseIdentifier<class B>* identifier)
+                { this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
+            inline bool isDirectParentOf(BaseIdentifier<class B>* identifier)
+                { this->getIdentifier()->isDirectParentOf(identifier->getIdentifier()); }
 
-//        protected:
-//            IdentifierList* parents_; // INTERN! Don't touch this!
+            inline bool isA(BaseIdentifier<class B> identifier)
+                { this->getIdentifier()->isA(identifier.getIdentifier()); }
+            inline bool isDirectlyA(BaseIdentifier<class B> identifier)
+                { this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
+            inline bool isChildOf(BaseIdentifier<class B> identifier)
+                { this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
+            inline bool isDirectChildOf(BaseIdentifier<class B> identifier)
+                { this->getIdentifier()->isDirectChildOf(identifier.getIdentifier()); }
+            inline bool isParentOf(BaseIdentifier<class B> identifier)
+                { this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
+            inline bool isDirectParentOf(BaseIdentifier<class B> identifier)
+                { this->getIdentifier()->isDirectParentOf(identifier.getIdentifier()); }
+/*
+            inline bool isA(OrxonoxClass* object)
+                { this->getIdentifier()->isA(object->getIdentifier()); }
+            inline bool isDirectlyA(OrxonoxClass* object)
+                { this->getIdentifier()->isDirectlyA(object->getIdentifier); }
+            inline bool isChildOf(OrxonoxClass* object)
+                { this->getIdentifier()->isChildOf(object->getIdentifier); }
+            inline bool isDirectChildOf(OrxonoxClass* object)
+                { this->getIdentifier()->isDirectChildOf(object->getIdentifier); }
+            inline bool isParentOf(OrxonoxClass* object)
+                { this->getIdentifier()->isParentOf(object->getIdentifier); }
+            inline bool isDirectParentOf(OrxonoxClass* object)
+                { this->getIdentifier()->isDirectParentOf(object->getIdentifier); }
+*/
 
     };
Index: /code/branches/objecthierarchie/src/CMakeLists.txt
===================================================================
--- /code/branches/objecthierarchie/src/CMakeLists.txt	(revision 196)
+++ /code/branches/objecthierarchie/src/CMakeLists.txt	(revision 197)
@@ -2,6 +2,6 @@
 
 # create a few variables to simplify life
-SET(SRC_FILES orxonox.cc ClassHierarchy.cc OrxonoxClass.cc BaseObject.cc)
-SET(INC_FILES ClassHierarchy.h OrxonoxClass.h BaseObject.h Test.h)
+SET(SRC_FILES orxonox.cc IdentifierList.cc ObjectList.cc Identifier.cc ClassHierarchy.cc OrxonoxClass.cc BaseObject.cc test1.cc test2.cc test3.cc)
+SET(INC_FILES ClassHierarchy.h Identifier.h IdentifierList.h ObjectList.h OrxonoxClass.h BaseObject.h Test.h test1.h test2.h test3.h)
 
 #Creates an executable
Index: /code/branches/objecthierarchie/src/ClassHierarchy.cc
===================================================================
--- /code/branches/objecthierarchie/src/ClassHierarchy.cc	(revision 196)
+++ /code/branches/objecthierarchie/src/ClassHierarchy.cc	(revision 197)
@@ -4,304 +4,4 @@
 namespace orxonox
 {
-    // ###############################
-    // ###       Identifier        ###
-    // ###############################
-//    Identifier* Identifier::pointer_ = NULL;
-/*
-    Identifier* Identifier::registerClass(IdentifierList* parents)
-    {
-        if (!pointer_)
-        {
-            pointer_ = new Identifier();
-            pointer_->initialize(parents);
-        }
-
-        return pointer_;
-    }
-*/
-    Identifier::Identifier()
-    {
-        this->bCreatedOneObject_ = false;
-        this->directParents_ = new IdentifierList();
-        this->allParents_ = new IdentifierList();
-        this->directChildren_ = new IdentifierList();
-        this->allChildren_ = new IdentifierList();
-        this->objects_ = new ObjectList();
-    }
-
-    Identifier::~Identifier()
-    {
-        delete this->directParents_;
-        delete this->allParents_;
-        delete this->directChildren_;
-        delete this->allChildren_;
-        delete this->objects_;
-        delete &this->name_;
-    }
-
-    void Identifier::initialize(IdentifierList* parents)
-    {
-        std::cout << "*** Initialize " << this->name_ << "-Singleton.\n";
-        if (parents)
-        {
-            this->bCreatedOneObject_ = true;
-
-            IdentifierListElement* temp1;
-            IdentifierListElement* temp2;
-            IdentifierListElement* temp3;
-
-            temp1 = parents->first_;
-            while (temp1)
-            {
-                temp2 = temp1->identifier_->directParents_->first_;
-                while (temp2)
-                {
-                    temp3 = parents->first_;
-                    while(temp3)
-                    {
-                        if (temp3->identifier_ == temp2->identifier_)
-                            temp3->bDirect_ = false;
-
-                        temp3 = temp3->next_;
-                    }
-
-                    temp2 = temp2->next_;
-                }
-                temp1 = temp1->next_;
-            }
-
-            temp1 = parents->first_;
-            while (temp1)
-            {
-                if (temp1->bDirect_)
-                {
-                    this->directParents_->add(temp1->identifier_);
-                    temp1->identifier_->directChildren_->add(this);
-                }
-
-                this->allParents_->add(temp1->identifier_);
-                temp1->identifier_->allChildren_->add(this);
-
-                temp1 = temp1->next_;
-            }
-        }
-    }
-
-    void Identifier::addObject(OrxonoxClass* object)
-    {
-        std::cout << "*** Added " << this->name_ << " to list.\n";
-        this->objects_->add(object);
-    }
-
-    void Identifier::removeObject(OrxonoxClass* object)
-    {
-        std::cout << "*** Removed " << this->name_ << " from list.\n";
-        this->objects_->remove(object);
-    }
-
-    bool Identifier::isA(Identifier* identifier)
-    {
-        return (identifier == this || this->allParents_->isInList(identifier));
-    }
-
-    bool Identifier::isDirectlyA(Identifier* identifier)
-    {
-        return (identifier == this);
-    }
-
-    bool Identifier::isChildOf(Identifier* identifier)
-    {
-        return this->allParents_->isInList(identifier);
-    }
-
-    bool Identifier::isDirectChildOf(Identifier* identifier)
-    {
-        return this->directParents_->isInList(identifier);
-    }
-
-    bool Identifier::isParentOf(Identifier* identifier)
-    {
-        return this->allChildren_->isInList(identifier);
-    }
-
-    bool Identifier::isDirectParentOf(Identifier* identifier)
-    {
-        return this->directChildren_->isInList(identifier);
-    }
-
-
-    // ###############################
-    // ###     IdentifierList      ###
-    // ###############################
-    IdentifierList::IdentifierList()
-    {
-        this->first_ = NULL;
-    }
-
-    IdentifierList::~IdentifierList()
-    {
-        IdentifierListElement* temp;
-        while (this->first_)
-        {
-            temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-        }
-    }
-
-    void IdentifierList::add(Identifier* identifier)
-    {
-        IdentifierListElement* temp = this->first_;
-        this->first_ = new IdentifierListElement(identifier);
-        this->first_->next_ = temp;
-    }
-
-    void IdentifierList::remove(Identifier* identifier)
-    {
-        if (!identifier)
-            return;
-
-        if (this->first_->identifier_ == identifier)
-        {
-            IdentifierListElement* temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-
-            return;
-        }
-
-        IdentifierListElement* temp = this->first_;
-        while (temp->next_)
-        {
-            if (temp->next_->identifier_ == identifier)
-            {
-                IdentifierListElement* temp2 = temp->next_->next_;
-                delete temp->next_;
-                temp->next_ = temp2;
-
-                return;
-            }
-
-            temp = temp->next_;
-        }
-    }
-
-    bool IdentifierList::isInList(Identifier* identifier)
-    {
-        IdentifierListElement* temp = this->first_;
-        while (temp)
-        {
-            if (temp->identifier_ == identifier)
-                return true;
-
-            temp = temp->next_;
-        }
-
-        return false;
-    }
-
-    std::string IdentifierList::toString()
-    {
-        IdentifierListElement* temp = this->first_;
-        std::string output = "";
-
-        while (temp)
-        {
-            output += temp->identifier_->getName();
-            output += " ";
-
-            temp = temp->next_;
-        }
-
-        return output;
-    }
-
-
-    // ###############################
-    // ###  IdentifierListElement  ###
-    // ###############################
-    IdentifierListElement::IdentifierListElement(Identifier* identifier)
-    {
-        this->identifier_ = identifier;
-        this->next_ = NULL;
-        this->bDirect_ = true;
-    }
-
-    IdentifierListElement::~IdentifierListElement()
-    {
-    }
-
-
-    // ###############################
-    // ###       ObjectList        ###
-    // ###############################
-    ObjectList::ObjectList()
-    {
-        this->first_ = NULL;
-    }
-
-    ObjectList::~ObjectList()
-    {
-        ObjectListElement* temp;
-        while (this->first_)
-        {
-            temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-        }
-    }
-
-    void ObjectList::add(OrxonoxClass* object)
-    {
-        ObjectListElement* temp = this->first_;
-        this->first_ = new ObjectListElement(object);
-        this->first_->next_ = temp;
-    }
-
-    void ObjectList::remove(OrxonoxClass* object)
-    {
-        if (!object)
-            return;
-
-        if (this->first_->object_ == object)
-        {
-            ObjectListElement* temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-
-            return;
-        }
-
-        ObjectListElement* temp = this->first_;
-        while (temp->next_)
-        {
-            if (temp->next_->object_ == object)
-            {
-                ObjectListElement* temp2 = temp->next_->next_;
-                delete temp->next_;
-                temp->next_ = temp2;
-
-                return;
-            }
-
-            temp = temp->next_;
-        }
-    }
-
-
-    // ###############################
-    // ###    ObjectListElement    ###
-    // ###############################
-    ObjectListElement::ObjectListElement(OrxonoxClass* object)
-    {
-        this->object_ = object;
-        this->next_ = NULL;
-    }
-
-    ObjectListElement::~ObjectListElement()
-    {
-    }
-
-
     // ###############################
     // ###     ClassHierarchy      ###
Index: /code/branches/objecthierarchie/src/ClassHierarchy.h
===================================================================
--- /code/branches/objecthierarchie/src/ClassHierarchy.h	(revision 196)
+++ /code/branches/objecthierarchie/src/ClassHierarchy.h	(revision 197)
@@ -10,7 +10,7 @@
 // - insert into class-lists
 // - ClassIdentifier
+// - BaseIdentifier
 
 // IN WORK:
-// - BaseIdentifier
 // - Factory
 
@@ -45,218 +45,4 @@
     };
 
-    // ##### Identifier #####
-    class IdentifierList;
-    class ObjectList;
-    class OrxonoxClass;
-
-    class Identifier
-    {
-        template <class T>
-        friend class ClassIdentifier;
-
-        template <class T>
-        friend class BaseIdentifier;
-
-        public:
-            void addObject(OrxonoxClass* object);
-            void removeObject(OrxonoxClass* object);
-
-            bool isA(Identifier* identifier);
-            bool isDirectlyA(Identifier* identifier);
-            bool isChildOf(Identifier* identifier);
-            bool isDirectChildOf(Identifier* identifier);
-            bool isParentOf(Identifier* identifier);
-            bool isDirectParentOf(Identifier* identifier);
-
-            std::string getName() { return this->name_; }
-            IdentifierList* getDirectParents() { return this->directParents_; }
-            IdentifierList* getAllParents() { return this->allParents_; }
-            IdentifierList* getDirectChildren() { return this->directChildren_; }
-            IdentifierList* getAllChildren() { return this->allChildren_; }
-
-        private:
-            Identifier();
-            Identifier(const Identifier& identifier) {}
-            virtual ~Identifier();
-            void initialize(IdentifierList* parents);
-
-            IdentifierList* directParents_;
-            IdentifierList* allParents_;
-            IdentifierList* directChildren_;
-            IdentifierList* allChildren_;
-
-            ObjectList* objects_;
-            std::string name_;
-
-            bool bCreatedOneObject_;
-    };
-
-
-    // ##### ClassIdentifier #####
-    template <class T>
-    class ClassIdentifier : public Identifier
-    {
-        public:
-            static ClassIdentifier<T>* registerClass(IdentifierList* parents, std::string name, bool bRootClass);
-            static ClassIdentifier<T>* getIdentifier();
-            static T* create();
-
-        private:
-            ClassIdentifier();
-            ClassIdentifier(const ClassIdentifier<T>& identifier) {}
-            ~ClassIdentifier();
-
-            static ClassIdentifier<T>* pointer_;
-
-    };
-
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::pointer_ = NULL;
-
-    template <class T>
-    ClassIdentifier<T>::ClassIdentifier()
-    {
-    }
-
-    template <class T>
-    ClassIdentifier<T>::~ClassIdentifier()
-    {
-        this->pointer_ = NULL;
-    }
-
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(IdentifierList* parents, std::string name, bool bRootClass)
-    {
-        std::cout << "*** Register Class in " << name << "-Singleton.\n";
-        if (!pointer_)
-        {
-            std::cout << "*** Register Class in " << name << "-Singleton -> Create Singleton.\n";
-            if (parents || bRootClass)
-            {
-                pointer_ = new ClassIdentifier();
-                pointer_->name_ = name;
-                pointer_->initialize(parents);
-            }
-            else
-            {
-                pointer_ = getIdentifier();
-            }
-        }
-
-        return pointer_;
-    }
-
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
-    {
-//        std::cout << "*** Get Identifier.\n";
-        if (!pointer_)
-        {
-            std::cout << "*** Get Identifier -> Create Class\n";
-            ClassHierarchy::getSingleton()->startCreatingHierarchy();
-            T* temp = new T();
-            ClassHierarchy::getSingleton()->stopCreatingHierarchy();
-            delete temp;
-        }
-
-        return pointer_;
-    }
-
-    template <class T>
-    T* ClassIdentifier<T>::create()
-    {
-        return new T();
-    }
-
-
-    // ##### BaseIdentifier #####
-    template <class B>
-    class BaseIdentifier// : public Identifier
-    {
-        public:
-            BaseIdentifier();
-
-            template <class T>
-            BaseIdentifier<B>& operator= (ClassIdentifier<T>* identifier)
-            {
-                std::cout << "####### Class(" << identifier->getName() << ")->isA( Class(" << ClassIdentifier<B>::getIdentifier()->getName() << ") ) = " << identifier->isA( ClassIdentifier<B>::getIdentifier() ) << "\n";
-                if (!identifier->isA(ClassIdentifier<B>::getIdentifier()))
-                {
-                    std::cout << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<B>::getIdentifier()->getName() << "!\n";
-                    std::cout << "Error: BaseIdentifier<" << ClassIdentifier<B>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden.\n";
-                    std::cout << "Aborting...\n";
-                    abort();
-                }
-                this->identifier_ = identifier;
-                return *this;
-            }
-
-            operator Identifier()
-            {
-                return this->identifier_;
-            }
-
-        private:
-            Identifier* identifier_;
-    };
-
-    template <class B>
-    BaseIdentifier<B>::BaseIdentifier()
-    {
-        this->identifier_ = ClassIdentifier<B>::getIdentifier();
-    }
-
-
-    // ##### Identifier List #####
-    class IdentifierListElement;
-
-    class IdentifierList
-    {
-        public:
-            IdentifierList();
-            ~IdentifierList();
-            void add(Identifier* identifier);
-            void remove(Identifier* identifier);
-            bool isInList(Identifier* identifier);
-            std::string toString();
-
-            IdentifierListElement* first_;
-    };
-
-    class IdentifierListElement
-    {
-        public:
-            IdentifierListElement(Identifier* identifier);
-            ~IdentifierListElement();
-
-            Identifier* identifier_;
-            IdentifierListElement* next_;
-            bool bDirect_;
-    };
-
-
-    // ##### Object List #####
-    class ObjectListElement;
-
-    class ObjectList
-    {
-        public:
-            ObjectList();
-            ~ObjectList();
-            void add(OrxonoxClass* object);
-            void remove(OrxonoxClass* object);
-
-            ObjectListElement* first_;
-    };
-
-    class ObjectListElement
-    {
-        public:
-            ObjectListElement(OrxonoxClass* object);
-            ~ObjectListElement();
-
-            OrxonoxClass* object_;
-            ObjectListElement* next_;
-    };
 
     // ##### Macros #####
@@ -267,5 +53,16 @@
         if (this->getIdentifier()) \
             this->getIdentifier()->removeObject(this); \
-        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, true)); \
+        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, true, false)); \
+        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
+            this->getParents()->add(this->getIdentifier()); \
+        this->getIdentifier()->addObject(this)
+
+    #define registerAbstractRootObject(ClassName) \
+        std::cout << "*** Register Root-Object: " << #ClassName << "\n"; \
+        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && !this->getParents()) \
+            this->setParents(new IdentifierList()); \
+        if (this->getIdentifier()) \
+            this->getIdentifier()->removeObject(this); \
+        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, true, true)); \
         if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
             this->getParents()->add(this->getIdentifier()); \
@@ -275,5 +72,13 @@
         std::cout << "*** Register Object: " << #ClassName << "\n"; \
         this->getIdentifier()->removeObject(this); \
-        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, false)); \
+        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, false, false)); \
+        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
+            this->getParents()->add(this->getIdentifier()); \
+        this->getIdentifier()->addObject(this)
+
+    #define registerAbstractObject(ClassName) \
+        std::cout << "*** Register Object: " << #ClassName << "\n"; \
+        this->getIdentifier()->removeObject(this); \
+        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, false, true)); \
         if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
             this->getParents()->add(this->getIdentifier()); \
Index: /code/branches/objecthierarchie/src/Identifier.cc
===================================================================
--- /code/branches/objecthierarchie/src/Identifier.cc	(revision 197)
+++ /code/branches/objecthierarchie/src/Identifier.cc	(revision 197)
@@ -0,0 +1,117 @@
+#include "Identifier.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###       Identifier        ###
+    // ###############################
+    Identifier::Identifier()
+    {
+        this->bCreatedOneObject_ = false;
+        this->directParents_ = new IdentifierList();
+        this->allParents_ = new IdentifierList();
+        this->directChildren_ = new IdentifierList();
+        this->allChildren_ = new IdentifierList();
+        this->objects_ = new ObjectList();
+    }
+
+    Identifier::~Identifier()
+    {
+        delete this->directParents_;
+        delete this->allParents_;
+        delete this->directChildren_;
+        delete this->allChildren_;
+        delete this->objects_;
+        delete &this->name_;
+    }
+
+    void Identifier::initialize(IdentifierList* parents)
+    {
+        std::cout << "*** Initialize " << this->name_ << "-Singleton.\n";
+        if (parents)
+        {
+            this->bCreatedOneObject_ = true;
+
+            IdentifierListElement* temp1;
+            IdentifierListElement* temp2;
+            IdentifierListElement* temp3;
+
+            temp1 = parents->first_;
+            while (temp1)
+            {
+                temp2 = temp1->identifier_->directParents_->first_;
+                while (temp2)
+                {
+                    temp3 = parents->first_;
+                    while(temp3)
+                    {
+                        if (temp3->identifier_ == temp2->identifier_)
+                            temp3->bDirect_ = false;
+
+                        temp3 = temp3->next_;
+                    }
+
+                    temp2 = temp2->next_;
+                }
+                temp1 = temp1->next_;
+            }
+
+            temp1 = parents->first_;
+            while (temp1)
+            {
+                if (temp1->bDirect_)
+                {
+                    this->directParents_->add(temp1->identifier_);
+                    temp1->identifier_->directChildren_->add(this);
+                }
+
+                this->allParents_->add(temp1->identifier_);
+                temp1->identifier_->allChildren_->add(this);
+
+                temp1 = temp1->next_;
+            }
+        }
+    }
+
+    void Identifier::addObject(OrxonoxClass* object)
+    {
+        std::cout << "*** Added " << this->name_ << " to list.\n";
+        this->objects_->add(object);
+    }
+
+    void Identifier::removeObject(OrxonoxClass* object)
+    {
+        std::cout << "*** Removed " << this->name_ << " from list.\n";
+        this->objects_->remove(object);
+    }
+
+    bool Identifier::isA(Identifier* identifier)
+    {
+        return (identifier == this || this->allParents_->isInList(identifier));
+    }
+
+    bool Identifier::isDirectlyA(Identifier* identifier)
+    {
+        return (identifier == this);
+    }
+
+    bool Identifier::isChildOf(Identifier* identifier)
+    {
+        return this->allParents_->isInList(identifier);
+    }
+
+    bool Identifier::isDirectChildOf(Identifier* identifier)
+    {
+        return this->directParents_->isInList(identifier);
+    }
+
+    bool Identifier::isParentOf(Identifier* identifier)
+    {
+        return this->allChildren_->isInList(identifier);
+    }
+
+    bool Identifier::isDirectParentOf(Identifier* identifier)
+    {
+        return this->directChildren_->isInList(identifier);
+    }
+}
Index: /code/branches/objecthierarchie/src/Identifier.h
===================================================================
--- /code/branches/objecthierarchie/src/Identifier.h	(revision 197)
+++ /code/branches/objecthierarchie/src/Identifier.h	(revision 197)
@@ -0,0 +1,173 @@
+#ifndef _Identifier_H__
+#define _Identifier_H__
+
+#include "ClassHierarchy.h"
+#include "IdentifierList.h"
+#include "ObjectList.h"
+#include "OrxonoxClass.h"
+
+namespace orxonox
+{
+    // ##### Identifier #####
+    class Identifier
+    {
+        template <class T>
+        friend class ClassIdentifier;
+
+        template <class T>
+        friend class BaseIdentifier;
+
+        public:
+            void addObject(OrxonoxClass* object);
+            void removeObject(OrxonoxClass* object);
+
+            bool isA(Identifier* identifier);
+            bool isDirectlyA(Identifier* identifier);
+            bool isChildOf(Identifier* identifier);
+            bool isDirectChildOf(Identifier* identifier);
+            bool isParentOf(Identifier* identifier);
+            bool isDirectParentOf(Identifier* identifier);
+
+            std::string getName() { return this->name_; }
+            IdentifierList* getDirectParents() { return this->directParents_; }
+            IdentifierList* getAllParents() { return this->allParents_; }
+            IdentifierList* getDirectChildren() { return this->directChildren_; }
+            IdentifierList* getAllChildren() { return this->allChildren_; }
+
+        private:
+            Identifier();
+            Identifier(const Identifier& identifier) {}
+            virtual ~Identifier();
+            void initialize(IdentifierList* parents);
+
+            IdentifierList* directParents_;
+            IdentifierList* allParents_;
+            IdentifierList* directChildren_;
+            IdentifierList* allChildren_;
+
+            ObjectList* objects_;
+            std::string name_;
+
+            bool bIsAbstractClass_;
+            bool bCreatedOneObject_;
+    };
+
+
+    // ##### ClassIdentifier #####
+    template <class T>
+    class ClassIdentifier : public Identifier
+    {
+        public:
+            static ClassIdentifier<T>* registerClass(IdentifierList* parents, std::string name, bool bRootClass, bool bIsAbstractClass);
+            static ClassIdentifier<T>* getIdentifier();
+
+        private:
+            ClassIdentifier();
+            ClassIdentifier(const ClassIdentifier<T>& identifier) {}
+            ~ClassIdentifier();
+
+            static ClassIdentifier<T>* pointer_;
+
+    };
+
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::pointer_ = NULL;
+
+    template <class T>
+    ClassIdentifier<T>::ClassIdentifier()
+    {
+    }
+
+    template <class T>
+    ClassIdentifier<T>::~ClassIdentifier()
+    {
+        this->pointer_ = NULL;
+    }
+
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(IdentifierList* parents, std::string name, bool bRootClass, bool bIsAbstractClass)
+    {
+        std::cout << "*** Register Class in " << name << "-Singleton.\n";
+        if (!pointer_)
+        {
+            std::cout << "*** Register Class in " << name << "-Singleton -> Create Singleton.\n";
+            if (parents || bRootClass)
+            {
+                pointer_ = new ClassIdentifier();
+                pointer_->name_ = name;
+                pointer_->bIsAbstractClass_ = bIsAbstractClass;
+                pointer_->initialize(parents);
+            }
+            else
+            {
+                pointer_ = getIdentifier();
+            }
+        }
+
+        return pointer_;
+    }
+
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
+    {
+//        std::cout << "*** Get Identifier.\n";
+        if (!pointer_)
+        {
+            std::cout << "*** Get Identifier -> Create Class\n";
+            ClassHierarchy::getSingleton()->startCreatingHierarchy();
+            T* temp = new T();
+            ClassHierarchy::getSingleton()->stopCreatingHierarchy();
+            delete temp;
+        }
+
+        return pointer_;
+    }
+
+
+    // ##### BaseIdentifier #####
+    template <class B>
+    class BaseIdentifier// : public Identifier
+    {
+        public:
+            BaseIdentifier();
+
+            //template <class T>
+            BaseIdentifier<B>& operator= (/*Class*/Identifier/*<T>*/* identifier)
+            {
+                if (!identifier->isA(ClassIdentifier<B>::getIdentifier()))
+                {
+                    std::cout << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<B>::getIdentifier()->getName() << "!\n";
+                    std::cout << "Error: BaseIdentifier<" << ClassIdentifier<B>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden.\n";
+                    std::cout << "Aborting...\n";
+                    abort();
+                }
+                this->identifier_ = identifier;
+                return *this;
+            }
+            inline Identifier* getIdentifier()
+                { return this->identifier_; }
+            inline bool isA(Identifier* identifier)
+                { return this->identifier_->isA(identifier); }
+            inline bool isDirectlyA(Identifier* identifier)
+                { return this->identifier_->isDirectlyA(identifier); }
+            inline bool isChildOf(Identifier* identifier)
+                { return this->identifier_->isChildOf(identifier); }
+            inline bool isDirectChildOf(Identifier* identifier)
+                { return this->identifier_->isDirectChildOf(identifier); }
+            inline bool isParentOf(Identifier* identifier)
+                { return this->identifier_->isParentOf(identifier); }
+            inline bool isDirectParentOf(Identifier* identifier)
+                { return this->identifier_->isDirectParentOf(identifier); }
+
+        private:
+            Identifier* identifier_;
+    };
+
+    template <class B>
+    BaseIdentifier<B>::BaseIdentifier()
+    {
+        this->identifier_ = ClassIdentifier<B>::getIdentifier();
+    }
+}
+
+#endif
Index: /code/branches/objecthierarchie/src/IdentifierIncludes.h
===================================================================
--- /code/branches/objecthierarchie/src/IdentifierIncludes.h	(revision 197)
+++ /code/branches/objecthierarchie/src/IdentifierIncludes.h	(revision 197)
@@ -0,0 +1,5 @@
+#include "ClassHierarchy.h"
+#include "Identifier.h"
+#include "IdentifierList.h"
+#include "ObjectList.h"
+#include "OrxonoxClass.h"
Index: /code/branches/objecthierarchie/src/IdentifierList.cc
===================================================================
--- /code/branches/objecthierarchie/src/IdentifierList.cc	(revision 197)
+++ /code/branches/objecthierarchie/src/IdentifierList.cc	(revision 197)
@@ -0,0 +1,106 @@
+#include "IdentifierList.h"
+#include "Identifier.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###     IdentifierList      ###
+    // ###############################
+    IdentifierList::IdentifierList()
+    {
+        this->first_ = 0;
+    }
+
+    IdentifierList::~IdentifierList()
+    {
+        IdentifierListElement* temp;
+        while (this->first_)
+        {
+            temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+        }
+    }
+
+    void IdentifierList::add(Identifier* identifier)
+    {
+        IdentifierListElement* temp = this->first_;
+        this->first_ = new IdentifierListElement(identifier);
+        this->first_->next_ = temp;
+    }
+
+    void IdentifierList::remove(Identifier* identifier)
+    {
+        if (!identifier)
+            return;
+
+        if (this->first_->identifier_ == identifier)
+        {
+            IdentifierListElement* temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+
+            return;
+        }
+
+        IdentifierListElement* temp = this->first_;
+        while (temp->next_)
+        {
+            if (temp->next_->identifier_ == identifier)
+            {
+                IdentifierListElement* temp2 = temp->next_->next_;
+                delete temp->next_;
+                temp->next_ = temp2;
+
+                return;
+            }
+
+            temp = temp->next_;
+        }
+    }
+
+    bool IdentifierList::isInList(Identifier* identifier)
+    {
+        IdentifierListElement* temp = this->first_;
+        while (temp)
+        {
+            if (temp->identifier_ == identifier)
+                return true;
+
+            temp = temp->next_;
+        }
+
+        return false;
+    }
+
+    std::string IdentifierList::toString()
+    {
+        IdentifierListElement* temp = this->first_;
+        std::string output = "";
+
+        while (temp)
+        {
+            output += temp->identifier_->getName();
+            output += " ";
+
+            temp = temp->next_;
+        }
+
+        return output;
+    }
+
+
+    // ###############################
+    // ###  IdentifierListElement  ###
+    // ###############################
+    IdentifierListElement::IdentifierListElement(Identifier* identifier)
+    {
+        this->identifier_ = identifier;
+        this->next_ = 0;
+        this->bDirect_ = true;
+    }
+
+    IdentifierListElement::~IdentifierListElement()
+    {
+    }
+}
Index: /code/branches/objecthierarchie/src/IdentifierList.h
===================================================================
--- /code/branches/objecthierarchie/src/IdentifierList.h	(revision 197)
+++ /code/branches/objecthierarchie/src/IdentifierList.h	(revision 197)
@@ -0,0 +1,35 @@
+#ifndef _IdentifierList_H__
+#define _IdentifierList_H__
+
+#include <string>
+
+namespace orxonox
+{
+    class Identifier;
+
+    class IdentifierListElement
+    {
+        public:
+            IdentifierListElement(Identifier* identifier);
+            ~IdentifierListElement();
+
+            Identifier* identifier_;
+            IdentifierListElement* next_;
+            bool bDirect_;
+    };
+
+    class IdentifierList
+    {
+        public:
+            IdentifierList();
+            ~IdentifierList();
+            void add(Identifier* identifier);
+            void remove(Identifier* identifier);
+            bool isInList(Identifier* identifier);
+            std::string toString();
+
+            IdentifierListElement* first_;
+    };
+}
+
+#endif
Index: /code/branches/objecthierarchie/src/ObjectList.cc
===================================================================
--- /code/branches/objecthierarchie/src/ObjectList.cc	(revision 197)
+++ /code/branches/objecthierarchie/src/ObjectList.cc	(revision 197)
@@ -0,0 +1,74 @@
+#include "ObjectList.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###       ObjectList        ###
+    // ###############################
+    ObjectList::ObjectList()
+    {
+        this->first_ = 0;
+    }
+
+    ObjectList::~ObjectList()
+    {
+        ObjectListElement* temp;
+        while (this->first_)
+        {
+            temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+        }
+    }
+
+    void ObjectList::add(OrxonoxClass* object)
+    {
+        ObjectListElement* temp = this->first_;
+        this->first_ = new ObjectListElement(object);
+        this->first_->next_ = temp;
+    }
+
+    void ObjectList::remove(OrxonoxClass* object)
+    {
+        if (!object)
+            return;
+
+        if (this->first_->object_ == object)
+        {
+            ObjectListElement* temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+
+            return;
+        }
+
+        ObjectListElement* temp = this->first_;
+        while (temp->next_)
+        {
+            if (temp->next_->object_ == object)
+            {
+                ObjectListElement* temp2 = temp->next_->next_;
+                delete temp->next_;
+                temp->next_ = temp2;
+
+                return;
+            }
+
+            temp = temp->next_;
+        }
+    }
+
+
+    // ###############################
+    // ###    ObjectListElement    ###
+    // ###############################
+    ObjectListElement::ObjectListElement(OrxonoxClass* object)
+    {
+        this->object_ = object;
+        this->next_ = 0;
+    }
+
+    ObjectListElement::~ObjectListElement()
+    {
+    }
+}
Index: /code/branches/objecthierarchie/src/ObjectList.h
===================================================================
--- /code/branches/objecthierarchie/src/ObjectList.h	(revision 197)
+++ /code/branches/objecthierarchie/src/ObjectList.h	(revision 197)
@@ -0,0 +1,30 @@
+#ifndef _ObjectList_H__
+#define _ObjectList_H__
+
+namespace orxonox
+{
+    class OrxonoxClass;
+
+    class ObjectListElement
+    {
+        public:
+            ObjectListElement(OrxonoxClass* object);
+            ~ObjectListElement();
+
+            OrxonoxClass* object_;
+            ObjectListElement* next_;
+    };
+
+    class ObjectList
+    {
+        public:
+            ObjectList();
+            ~ObjectList();
+            void add(OrxonoxClass* object);
+            void remove(OrxonoxClass* object);
+
+            ObjectListElement* first_;
+    };
+}
+
+#endif
Index: /code/branches/objecthierarchie/src/OrxonoxClass.cc
===================================================================
--- /code/branches/objecthierarchie/src/OrxonoxClass.cc	(revision 196)
+++ /code/branches/objecthierarchie/src/OrxonoxClass.cc	(revision 197)
@@ -1,4 +1,4 @@
+#include "ClassHierarchy.h"
 #include "OrxonoxClass.h"
-#include "ClassHierarchy.h"
 
 namespace orxonox
Index: /code/branches/objecthierarchie/src/OrxonoxClass.h
===================================================================
--- /code/branches/objecthierarchie/src/OrxonoxClass.h	(revision 196)
+++ /code/branches/objecthierarchie/src/OrxonoxClass.h	(revision 197)
@@ -2,9 +2,9 @@
 #define _OrxonoxClass_H__
 
+#include "IdentifierList.h"
+#include "Identifier.h"
+
 namespace orxonox
 {
-    class Identifier;
-    class IdentifierList;
-
     class OrxonoxClass
     {
Index: /code/branches/objecthierarchie/src/Test.h
===================================================================
--- /code/branches/objecthierarchie/src/Test.h	(revision 196)
+++ /code/branches/objecthierarchie/src/Test.h	(revision 197)
@@ -2,8 +2,5 @@
 #define _Test_H__
 
-
-#include "BaseObject.h"
-#include "ClassHierarchy.h"
-#include "OrxonoxClass.h"
+#include "IdentifierIncludes.h"
 
 namespace orxonox
Index: /code/branches/objecthierarchie/src/orxonox.cc
===================================================================
--- /code/branches/objecthierarchie/src/orxonox.cc	(revision 196)
+++ /code/branches/objecthierarchie/src/orxonox.cc	(revision 197)
@@ -33,4 +33,7 @@
 #include "BaseObject.h"
 #include "Test.h"
+#include "test1.h"
+#include "test2.h"
+#include "test3.h"
 
 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
@@ -123,5 +126,5 @@
         test4 = new A3();
 */
-
+/*
         std::cout << "Test 5\n";
         A1* test5_01 = new A1();
@@ -143,5 +146,5 @@
         A3B2C1* test5_17 = new A3B2C1();
         A3B2C2* test5_18 = new A3B2C2();
-
+*/
 /*
         OrxonoxClass* test5;
@@ -175,9 +178,9 @@
         }
 */
-/*
+
         #define testandcout(code) \
           std::cout << #code << " " << code << "\n"
 
-
+/*
         std::cout << "\n";
         std::cout << "isA(XYZ)-Test:\n";
@@ -434,5 +437,5 @@
         std::cout << "A2 parent of A2B1C1: " << Class(A2)->isParentOf(Class(A2B1C1)) << "\n";
 */
-
+/*
         std::cout << "Test 7\n";
         std::cout << "1\n";
@@ -443,7 +446,10 @@
         test7_02 = Class(A1B1);
 
-//        std::cout << Identifier(test7_02).getName() << "\n";
-
-/*
+        std::cout << test7_01.getIdentifier()->getName() << "\n";
+        std::cout << test7_02.getIdentifier()->getName() << "\n";
+*/
+/*
+        std::cout << "2\n";
+
         BaseIdentifier<A1B1> test7_03;
         test7_03 = Class(A1);
@@ -455,5 +461,41 @@
         test7_05 = Class(A2);
 */
+
+        std::cout << "Test 8\n";
+
+        std::cout << "1\n";
+        Test1* test8_01 = new Test1;
+        Test3* test8_03 = new Test3;
+        test8_03->usefullClassesIsATest(test8_01);
+
         std::cout << "2\n";
+        Test2* test8_02 = new Test2;
+        test8_03->usefullClassesIsATest(test8_02);
+
+        std::cout << "3\n";
+        test8_01->setUsefullClass1(Class(Test1));
+        test8_01->setUsefullClass1(test8_02->getIdentifier());
+        test8_01->setUsefullClass2(Class(Test2));
+        test8_01->setUsefullClassOfTypeTest3(Class(Test3));
+        test8_01->setUsefullClassOfTypeTest3(test8_03->getIdentifier());
+
+
+        testandcout(test8_01->isA(Class(Test1)));
+        testandcout(test8_01->isA(Class(Test2)));
+        testandcout(test8_01->isA(Class(Test3)));
+
+        Test2* test8_04 = new Test2;
+        testandcout(test8_02->isA(Class(Test1)));
+        testandcout(test8_02->isA(Class(Test2)));
+        testandcout(test8_02->isA(Class(Test3)));
+
+        Test3* test8_05 = new Test3;
+        testandcout(test8_03->isA(Class(Test1)));
+        testandcout(test8_03->isA(Class(Test2)));
+        testandcout(test8_03->isA(Class(Test3)));
+
+        delete test8_01;
+        delete test8_02;
+        delete test8_03;
 
 
Index: /code/branches/objecthierarchie/src/test1.cc
===================================================================
--- /code/branches/objecthierarchie/src/test1.cc	(revision 197)
+++ /code/branches/objecthierarchie/src/test1.cc	(revision 197)
@@ -0,0 +1,61 @@
+#include "test1.h"
+#include "test2.h"
+#include "test3.h"
+
+namespace orxonox
+{
+    Test1::Test1()
+    {
+        registerObject(Test1);
+
+        this->usefullClass1_ = Class(Test1);
+        this->usefullClass2_ = Class(Test2);
+        this->usefullClass3_ = Class(Test3);
+    }
+
+    Test1::~Test1()
+    {
+    }
+
+    bool Test1::usefullClass1isA(Identifier* identifier)
+    {
+        return this->usefullClass1_->isA(identifier);
+    }
+
+    bool Test1::usefullClass2isA(Identifier* identifier)
+    {
+        return this->usefullClass2_->isA(identifier);
+    }
+
+    bool Test1::usefullClass3isA(Identifier* identifier)
+    {
+        return this->usefullClass3_.isA(identifier);
+    }
+
+    void Test1::setUsefullClass1(Identifier* identifier)
+    {
+        std::cout << "\n";
+        std::cout << "Test1: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
+        std::cout << "Test1: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
+        std::cout << "Test1: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        this->usefullClass1_ = identifier;
+    }
+
+    void Test1::setUsefullClass2(Identifier* identifier)
+    {
+        std::cout << "\n";
+        std::cout << "Test1: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
+        std::cout << "Test1: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
+        std::cout << "Test1: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        this->usefullClass2_ = identifier;
+    }
+
+    void Test1::setUsefullClassOfTypeTest3(Identifier* identifier)
+    {
+        std::cout << "\n";
+        std::cout << "Test1: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
+        std::cout << "Test1: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
+        std::cout << "Test1: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        this->usefullClass3_ = identifier;
+    }
+}
Index: /code/branches/objecthierarchie/src/test1.h
===================================================================
--- /code/branches/objecthierarchie/src/test1.h	(revision 197)
+++ /code/branches/objecthierarchie/src/test1.h	(revision 197)
@@ -0,0 +1,30 @@
+#ifndef _Test1_H__
+#define _Test1_H__
+
+#include "BaseObject.h"
+#include "test3.h"
+
+namespace orxonox
+{
+    class Test1 : public BaseObject
+    {
+        public:
+            Test1();
+            virtual ~Test1();
+
+            bool usefullClass1isA(Identifier* identifier);
+            bool usefullClass2isA(Identifier* identifier);
+            bool usefullClass3isA(Identifier* identifier);
+            void setUsefullClass1(Identifier* identifier);
+            void setUsefullClass2(Identifier* identifier);
+            void setUsefullClassOfTypeTest3(Identifier* identifier);
+
+        private:
+            Identifier* usefullClass1_;
+            Identifier* usefullClass2_;
+            BaseIdentifier<Test3> usefullClass3_;
+
+    };
+}
+
+#endif
Index: /code/branches/objecthierarchie/src/test2.cc
===================================================================
--- /code/branches/objecthierarchie/src/test2.cc	(revision 197)
+++ /code/branches/objecthierarchie/src/test2.cc	(revision 197)
@@ -0,0 +1,61 @@
+#include "test1.h"
+#include "test2.h"
+#include "test3.h"
+
+namespace orxonox
+{
+    Test2::Test2()
+    {
+        registerObject(Test2);
+
+        this->usefullClass1_ = Class(Test1);
+        this->usefullClass2_ = Class(Test2);
+        this->usefullClass3_ = Class(Test3);
+    }
+
+    Test2::~Test2()
+    {
+    }
+
+    bool Test2::usefullClass1isA(Identifier* identifier)
+    {
+        return this->usefullClass1_->isA(identifier);
+    }
+
+    bool Test2::usefullClass2isA(Identifier* identifier)
+    {
+        return this->usefullClass2_->isA(identifier);
+    }
+
+    bool Test2::usefullClass3isA(Identifier* identifier)
+    {
+        return this->usefullClass3_.isA(identifier);
+    }
+
+    void Test2::setUsefullClass1(Identifier* identifier)
+    {
+        std::cout << "\n";
+        std::cout << "Test2: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
+        std::cout << "Test2: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
+        std::cout << "Test2: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        this->usefullClass1_ = identifier;
+    }
+
+    void Test2::setUsefullClass2(Identifier* identifier)
+    {
+        std::cout << "\n";
+        std::cout << "Test2: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
+        std::cout << "Test2: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
+        std::cout << "Test2: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        this->usefullClass2_ = identifier;
+    }
+
+    void Test2::setUsefullClassOfTypeTest3(Identifier* identifier)
+    {
+        std::cout << "\n";
+        std::cout << "Test2: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
+        std::cout << "Test2: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
+        std::cout << "Test2: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        this->usefullClass3_ = identifier;
+    }
+}
Index: /code/branches/objecthierarchie/src/test2.h
===================================================================
--- /code/branches/objecthierarchie/src/test2.h	(revision 197)
+++ /code/branches/objecthierarchie/src/test2.h	(revision 197)
@@ -0,0 +1,31 @@
+#ifndef _Test2_H__
+#define _Test2_H__
+
+#include "BaseObject.h"
+
+namespace orxonox
+{
+    class Test3;
+
+    class Test2 : public BaseObject
+    {
+        public:
+            Test2();
+            virtual ~Test2();
+
+            bool usefullClass1isA(Identifier* identifier);
+            bool usefullClass2isA(Identifier* identifier);
+            bool usefullClass3isA(Identifier* identifier);
+            void setUsefullClass1(Identifier* identifier);
+            void setUsefullClass2(Identifier* identifier);
+            void setUsefullClassOfTypeTest3(Identifier* identifier);
+
+        private:
+            Identifier* usefullClass1_;
+            Identifier* usefullClass2_;
+            BaseIdentifier<Test3> usefullClass3_;
+
+    };
+}
+
+#endif
Index: /code/branches/objecthierarchie/src/test3.cc
===================================================================
--- /code/branches/objecthierarchie/src/test3.cc	(revision 197)
+++ /code/branches/objecthierarchie/src/test3.cc	(revision 197)
@@ -0,0 +1,51 @@
+#include "test1.h"
+#include "test2.h"
+#include "test3.h"
+
+namespace orxonox
+{
+    Test3::Test3()
+    {
+        registerObject(Test3);
+    }
+
+    Test3::~Test3()
+    {
+    }
+        #define testandcout(code) \
+          std::cout << #code << " " << code << "\n"
+
+    bool Test3::usefullClassesIsATest(Test1* test1)
+    {
+        std::cout << "\n";
+        std::cout << "Test1:\n";
+        testandcout(test1->usefullClass1isA(Class(Test1)));
+        testandcout(test1->usefullClass1isA(Class(Test2)));
+        testandcout(test1->usefullClass1isA(Class(Test3)));
+        std::cout << "\n";
+        testandcout(test1->usefullClass2isA(Class(Test1)));
+        testandcout(test1->usefullClass2isA(Class(Test2)));
+        testandcout(test1->usefullClass2isA(Class(Test3)));
+        std::cout << "\n";
+        testandcout(test1->usefullClass3isA(Class(Test1)));
+        testandcout(test1->usefullClass3isA(Class(Test2)));
+        testandcout(test1->usefullClass3isA(Class(Test3)));
+    }
+
+    bool Test3::usefullClassesIsATest(Test2* test2)
+    {
+        std::cout << "\n";
+        std::cout << "Test2:\n";
+        testandcout(test2->usefullClass1isA(Class(Test1)));
+        testandcout(test2->usefullClass1isA(Class(Test2)));
+        testandcout(test2->usefullClass1isA(Class(Test3)));
+        std::cout << "\n";
+        testandcout(test2->usefullClass2isA(Class(Test1)));
+        testandcout(test2->usefullClass2isA(Class(Test2)));
+        testandcout(test2->usefullClass2isA(Class(Test3)));
+        std::cout << "\n";
+        testandcout(test2->usefullClass3isA(Class(Test1)));
+        testandcout(test2->usefullClass3isA(Class(Test2)));
+        testandcout(test2->usefullClass3isA(Class(Test3)));
+    }
+}
Index: /code/branches/objecthierarchie/src/test3.h
===================================================================
--- /code/branches/objecthierarchie/src/test3.h	(revision 197)
+++ /code/branches/objecthierarchie/src/test3.h	(revision 197)
@@ -0,0 +1,22 @@
+#ifndef _Test3_H__
+#define _Test3_H__
+
+#include "BaseObject.h"
+
+namespace orxonox
+{
+    class Test1;
+    class Test2;
+
+    class Test3 : public BaseObject
+    {
+        public:
+            Test3();
+            virtual ~Test3();
+
+            bool usefullClassesIsATest(Test1* test1);
+            bool usefullClassesIsATest(Test2* test2);
+    };
+}
+
+#endif
