Index: code/branches/objecthierarchy/src/orxonox/core/Factory.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Factory.cc	(revision 361)
+++ code/branches/objecthierarchy/src/orxonox/core/Factory.cc	(revision 362)
@@ -11,5 +11,13 @@
             pointer_s = new Factory;
 
-        return pointer_s->identifierMap_[name];
+        return pointer_s->identifierStringMap_[name];
+    }
+
+    Identifier* Factory::getIdentifier(const unsigned int id)
+    {
+        if (!pointer_s)
+            pointer_s = new Factory;
+
+        return pointer_s->identifierNetworkIDMap_[id];
     }
 
@@ -19,5 +27,12 @@
             pointer_s = new Factory;
 
-        pointer_s->identifierMap_[name] = identifier;
+        pointer_s->identifierStringMap_[name] = identifier;
+        pointer_s->identifierNetworkIDMap_[identifier->getNetworkID()] = identifier;
+    }
+
+    void Factory::changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID)
+    {
+        pointer_s->identifierNetworkIDMap_.erase(oldID);
+        pointer_s->identifierNetworkIDMap_[newID] = identifier;
     }
 }
Index: code/branches/objecthierarchy/src/orxonox/core/Factory.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Factory.h	(revision 361)
+++ code/branches/objecthierarchy/src/orxonox/core/Factory.h	(revision 362)
@@ -17,5 +17,7 @@
         public:
             static Identifier* getIdentifier(const std::string& name);
+            static Identifier* getIdentifier(const unsigned int id);
             static void add(const std::string& name, Identifier* identifier);
+            static void changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID);
 
         private:
@@ -25,5 +27,6 @@
 
             static Factory* pointer_s;
-            std::map<std::string, Identifier*> identifierMap_;
+            std::map<std::string, Identifier*> identifierStringMap_;
+            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;
     };
 
Index: code/branches/objecthierarchy/src/orxonox/core/Identifier.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Identifier.cc	(revision 361)
+++ code/branches/objecthierarchy/src/orxonox/core/Identifier.cc	(revision 362)
@@ -7,4 +7,5 @@
     // ###############################
     int Identifier::hierarchyCreatingCounter_s = 0;
+    unsigned int Identifier::classIDcounter_s = 0;
 
     Identifier::Identifier()
@@ -14,4 +15,5 @@
 
         this->children_ = new IdentifierList;
+        this->classID_ = Identifier::classIDcounter_s++;
     }
 
@@ -57,4 +59,10 @@
     }
 
+    void Identifier::setNetworkID(unsigned int id)
+    {
+        Factory::changeNetworkID(this, this->classID_, id);
+        this->classID_ = id;
+    }
+
     bool Identifier::isA(const Identifier* identifier) const
     {
Index: code/branches/objecthierarchy/src/orxonox/core/Identifier.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/Identifier.h	(revision 361)
+++ code/branches/objecthierarchy/src/orxonox/core/Identifier.h	(revision 362)
@@ -43,4 +43,7 @@
 
             inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
+
+            inline const unsigned int getNetworkID() const { return this->classID_; }
+            void setNetworkID(unsigned int id);
 
         private:
@@ -74,4 +77,6 @@
             bool bCreatedOneObject_;
             static int hierarchyCreatingCounter_s;
+            static unsigned int classIDcounter_s;
+            unsigned int classID_;
     };
 
Index: code/branches/objecthierarchy/src/orxonox/core/IdentifierIncludes.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/core/IdentifierIncludes.h	(revision 361)
+++ code/branches/objecthierarchy/src/orxonox/core/IdentifierIncludes.h	(revision 362)
@@ -41,4 +41,4 @@
     bool bCreated##ClassName##Factory = ClassFactory<ClassName>::create()
 
-#define ID(Name) \
-    Factory::getIdentifier(Name)
+#define ID(NameOrID) \
+    Factory::getIdentifier(NameOrID)
Index: code/branches/objecthierarchy/src/orxonox/orxonox.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/orxonox.cc	(revision 361)
+++ code/branches/objecthierarchy/src/orxonox/orxonox.cc	(revision 362)
@@ -148,5 +148,5 @@
         test4 = new A3();
 */
-/*
+
         std::cout << "Test 5\n";
         A1* test5_01 = new A1();
@@ -193,8 +193,30 @@
 
           std::cout << "\n";
-          std::cout << test5->getIdentifier()->getName() << ": parents:     " << test5->getIdentifier()->getParents().toString() << "\n";
-          std::cout << test5->getIdentifier()->getName() << ": children:    " << test5->getIdentifier()->getChildren().toString() << "\n";
+          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): parents:     " << test5->getIdentifier()->getParents().toString() << "\n";
+          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): children:    " << test5->getIdentifier()->getChildren().toString() << "\n";
         }
-*/
+
+        std::cout << "Class with ID 0: " << ID(0) << " " << ID(0)->getName() << "\n";
+        std::cout << "Class with ID 1: " << ID(1) << " " << ID(1)->getName() << "\n";
+        std::cout << "Class with ID 2: " << ID(2) << " " << ID(2)->getName() << "\n";
+        std::cout << "Class with ID 3: " << ID(3) << " " << ID(3)->getName() << "\n";
+        std::cout << "Class with ID 4: " << ID(4) << " " << ID(4)->getName() << "\n";
+        std::cout << "Class with ID 100: " << ID(100) << "\n";
+        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
+
+        std::cout << "\nChange ID of BaseObject to 100\n";
+        Class(BaseObject)->setNetworkID(100);
+        std::cout << "Class with ID 100: " << ID(100) << "\n";
+        std::cout << "Class with ID 1: " << ID(1) << "\n";
+        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
+
+        std::cout << "\nChange ID of BaseObject to 3\n";
+        Class(BaseObject)->setNetworkID(3);
+        std::cout << "Class with ID 100: " << ID(100) << "\n";
+        std::cout << "Class with ID 1: " << ID(1) << "\n";
+        std::cout << "Class with ID 3: " << ID(3) << "\n";
+        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
+        std::cout << "ID of Test1: " << Class(Test1)->getNetworkID() << "\n";
+
 /*
         std::cout << "\n";
@@ -452,5 +474,5 @@
         delete test9_06;
 */
-
+/*
         std::cout << "Test 10\n";
         Identifier* test10_01 = Class(A1B2);
@@ -582,5 +604,5 @@
 
         std::cout << "13\n";
-
+*/
       }
 
