Index: /code/branches/core7/src/libraries/core/CoreIncludes.h
===================================================================
--- /code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10394)
+++ /code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10395)
@@ -134,5 +134,5 @@
 */
 #define RegisterObject(ClassName) \
-    if (ClassIdentifier<ClassName>::getIdentifier(#ClassName)->initializeObject(this)) \
+    if (ClassIdentifier<ClassName>::getIdentifier()->initializeObject(this)) \
         return; \
     else \
@@ -168,7 +168,6 @@
     {
         orxout(verbose, context::misc::factory) << "Create entry for " << name << " in Factory." << endl;
-        Identifier* identifier = ClassIdentifier<T>::getIdentifier(name);
-        identifier->setFactory(factory);
-        identifier->setLoadable(bLoadable);
+        Identifier* identifier = new ClassIdentifier<T>(name, factory, bLoadable);
+        IdentifierManager::getInstance().addIdentifier(identifier);
         return identifier;
     }
Index: /code/branches/core7/src/libraries/core/class/Identifier.cc
===================================================================
--- /code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10394)
+++ /code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10395)
@@ -50,10 +50,11 @@
         @brief Constructor: No factory, no object created, new ObjectList and a unique networkID.
     */
-    Identifier::Identifier()
+    Identifier::Identifier(const std::string& name, Factory* factory, bool bLoadable)
         : classID_(IdentifierManager::getInstance().getUniqueClassId())
     {
-        this->factory_ = 0;
+        this->name_ = name;
+        this->factory_ = factory;
+        this->bLoadable_ = bLoadable;
         this->bInitialized_ = false;
-        this->bLoadable_ = false;
         this->bIsVirtualBase_ = false;
 
@@ -78,24 +79,4 @@
         for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it)
             delete (it->second);
-    }
-
-    /**
-        @brief Sets the name of the class.
-    */
-    void Identifier::setName(const std::string& name)
-    {
-        if (name != this->name_)
-        {
-            this->name_ = name;
-            IdentifierManager::getInstance().addIdentifierToLookupMaps(this);
-        }
-    }
-
-    void Identifier::setFactory(Factory* factory)
-    {
-        if (this->factory_)
-            delete this->factory_;
-
-        this->factory_ = factory;
     }
 
@@ -127,5 +108,5 @@
     {
         this->networkID_ = id;
-        IdentifierManager::getInstance().addIdentifierToLookupMaps(this);
+        IdentifierManager::getInstance().addIdentifier(this);
     }
 
Index: /code/branches/core7/src/libraries/core/class/Identifier.h
===================================================================
--- /code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10394)
+++ /code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10395)
@@ -82,4 +82,5 @@
 
 #include "util/Output.h"
+#include "util/OrxAssert.h"
 #include "core/object/ObjectList.h"
 #include "core/object/Listable.h"
@@ -109,5 +110,5 @@
     {
         public:
-            Identifier();
+            Identifier(const std::string& name, Factory* factory, bool bLoadable);
             Identifier(const Identifier& identifier); // don't copy
             virtual ~Identifier();
@@ -115,5 +116,4 @@
             /// Returns the name of the class the Identifier belongs to.
             inline const std::string& getName() const { return this->name_; }
-            void setName(const std::string& name);
 
             /// Returns the name of the class as it is returned by typeid(T).name()
@@ -127,6 +127,4 @@
             ORX_FORCEINLINE unsigned int getClassID() const { return this->classID_; }
 
-            /// Sets the Factory.
-            void setFactory(Factory* factory);
             /// Returns true if the Identifier has a Factory.
             inline bool hasFactory() const { return (this->factory_ != 0); }
@@ -136,6 +134,4 @@
             /// Returns true if the class can be loaded through XML.
             inline bool isLoadable() const { return this->bLoadable_; }
-            /// Set the class to be loadable through XML or not.
-            inline void setLoadable(bool bLoadable) { this->bLoadable_ = bLoadable; }
 
             /// Returns true if child classes should inherit virtually from this class.
@@ -264,29 +260,9 @@
 
         public:
-            static ClassIdentifier<T>* getIdentifier();
-            static ClassIdentifier<T>* getIdentifier(const std::string& name);
-
-            bool initializeObject(T* object);
-
-            void setConfigValues(T* object, Configurable*) const;
-            void setConfigValues(T* object, Identifiable*) const;
-
-            void addObjectToList(T* object, Listable*);
-            void addObjectToList(T* object, Identifiable*);
-
-            virtual void updateConfigValues(bool updateChildren = true) const;
-
-            virtual const std::string& getTypeidName()
-                { return this->typeidName_; }
-
-            virtual bool canDynamicCastObjectToIdentifierClass(Identifiable* object) const
-                { return dynamic_cast<T*>(object) != 0; }
-
-        private:
-            static void initializeIdentifier();
-
-            ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
-            ClassIdentifier()
+            ClassIdentifier(const std::string& name, Factory* factory, bool bLoadable) : Identifier(name, factory, bLoadable)
             {
+                OrxVerify(ClassIdentifier<T>::classIdentifier_s == NULL, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
+                ClassIdentifier<T>::classIdentifier_s = this;
+
                 this->typeidName_ = typeid(T).name();
                 SuperFunctionInitialization<0, T>::initialize(this);
@@ -297,4 +273,25 @@
             }
 
+            bool initializeObject(T* object);
+
+            void setConfigValues(T* object, Configurable*) const;
+            void setConfigValues(T* object, Identifiable*) const;
+
+            void addObjectToList(T* object, Listable*);
+            void addObjectToList(T* object, Identifiable*);
+
+            virtual void updateConfigValues(bool updateChildren = true) const;
+
+            virtual const std::string& getTypeidName()
+                { return this->typeidName_; }
+
+            virtual bool canDynamicCastObjectToIdentifierClass(Identifiable* object) const
+                { return dynamic_cast<T*>(object) != 0; }
+
+            static ClassIdentifier<T>* getIdentifier();
+
+        private:
+            ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
+
             void updateConfigValues(bool updateChildren, Listable*) const;
             void updateConfigValues(bool updateChildren, Identifiable*) const;
@@ -312,45 +309,11 @@
     */
     template <class T>
-    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
-    {
-        // check if the Identifier already exists
-        if (!ClassIdentifier<T>::classIdentifier_s)
-            ClassIdentifier<T>::initializeIdentifier();
-
+    /*static*/ inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
+    {
+        if (ClassIdentifier<T>::classIdentifier_s == NULL)
+            ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*) IdentifierManager::getInstance().getIdentifierByTypeidName(typeid(T).name());
+
+        OrxVerify(ClassIdentifier<T>::classIdentifier_s != NULL, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
         return ClassIdentifier<T>::classIdentifier_s;
-    }
-
-    /**
-        @brief Does the same as getIdentifier() but sets the name if this wasn't done yet.
-        @param name The name of this Identifier
-        @return The Identifier
-    */
-    template <class T>
-    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
-    {
-        ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
-        identifier->setName(name);
-        return identifier;
-    }
-
-    /**
-        @brief Assigns the static field for the identifier singleton.
-    */
-    template <class T>
-    /*static */ void ClassIdentifier<T>::initializeIdentifier()
-    {
-        // create a new identifier anyway. Will be deleted if not used.
-        ClassIdentifier<T>* proposal = new ClassIdentifier<T>();
-
-        // Get the entry from the map
-        ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*)IdentifierManager::getInstance().getGloballyUniqueIdentifier(proposal);
-
-        if (ClassIdentifier<T>::classIdentifier_s == proposal)
-            orxout(verbose, context::identifier) << "Requested Identifier for " << proposal->getTypeidName() << " was not yet existing and got created." << endl;
-        else
-        {
-            orxout(verbose, context::identifier) << "Requested Identifier for " << proposal->getTypeidName() << " was already existing and got assigned." << endl;
-            delete proposal; // delete proposal (it is not used anymore)
-        }
     }
 
Index: /code/branches/core7/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- /code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10394)
+++ /code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10395)
@@ -58,40 +58,14 @@
 
     /**
-        @brief Returns an identifier by name and adds it if not available
-        @param proposal A pointer to a newly created identifier for the case of non existence in the map
-        @return The identifier (unique instance)
-    */
-    Identifier* IdentifierManager::getGloballyUniqueIdentifier(Identifier* proposal)
-    {
-        const std::string& typeidName = proposal->getTypeidName();
-        std::map<std::string, Identifier*>::const_iterator it = this->identifierByTypeidName_.find(typeidName);
-
-        if (it != this->identifierByTypeidName_.end())
-        {
-            // There is already an entry: return it
-            return it->second;
-        }
-        else
-        {
-            // There is no entry: put the proposal into the map and return it
-            this->identifierByTypeidName_[typeidName] = proposal;
-            return proposal;
-        }
-    }
-
-    /**
      * Registers the identifier in all maps of the IdentifierManager.
      */
-    void IdentifierManager::addIdentifierToLookupMaps(Identifier* identifier)
-    {
-        const std::string& typeidName = identifier->getTypeidName();
-        if (this->identifierByTypeidName_.find(typeidName) != this->identifierByTypeidName_.end())
-        {
-            this->identifierByString_[identifier->getName()] = identifier;
-            this->identifierByLowercaseString_[getLowercase(identifier->getName())] = identifier;
-            this->identifierByNetworkId_[identifier->getNetworkID()] = identifier;
-        }
-        else
-            orxout(internal_warning) << "Trying to add an identifier to lookup maps which is not known to IdentifierManager" << endl;
+    void IdentifierManager::addIdentifier(Identifier* identifier)
+    {
+        orxout(verbose, context::identifier) << "Adding identifier for " << identifier->getName() << " / " << identifier->getTypeidName() << endl;
+
+        this->identifierByTypeidName_[identifier->getTypeidName()] = identifier;
+        this->identifierByString_[identifier->getName()] = identifier;
+        this->identifierByLowercaseString_[getLowercase(identifier->getName())] = identifier;
+        this->identifierByNetworkId_[identifier->getNetworkID()] = identifier;
     }
 
@@ -272,4 +246,18 @@
 
     /**
+        @brief Returns the Identifier with a given typeid-name.
+        @param name The typeid-name of the wanted Identifier
+        @return The Identifier
+    */
+    Identifier* IdentifierManager::getIdentifierByTypeidName(const std::string& typeidName)
+    {
+        std::map<std::string, Identifier*>::const_iterator it = this->identifierByTypeidName_.find(typeidName);
+        if (it != this->identifierByTypeidName_.end())
+            return it->second;
+        else
+            return 0;
+    }
+
+    /**
         @brief Cleans the NetworkID map (needed on clients for correct initialization)
     */
Index: /code/branches/core7/src/libraries/core/class/IdentifierManager.h
===================================================================
--- /code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10394)
+++ /code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10395)
@@ -48,6 +48,5 @@
             static IdentifierManager& getInstance();
 
-            Identifier* getGloballyUniqueIdentifier(Identifier* proposal);
-            void addIdentifierToLookupMaps(Identifier* identifier);
+            void addIdentifier(Identifier* identifier);
 
             unsigned int getUniqueClassId()
@@ -75,4 +74,5 @@
             Identifier* getIdentifierByLowercaseString(const std::string& name);
             Identifier* getIdentifierByID(uint32_t id);
+            Identifier* getIdentifierByTypeidName(const std::string& typeidName);
 
             void clearNetworkIDs();
Index: /code/branches/core7/test/core/object/ContextTest.cc
===================================================================
--- /code/branches/core7/test/core/object/ContextTest.cc	(revision 10394)
+++ /code/branches/core7/test/core/object/ContextTest.cc	(revision 10395)
@@ -13,4 +13,6 @@
                 SubclassContext() : Context(NULL) { RegisterObject(SubclassContext); }
         };
+
+        RegisterClassNoArgs(SubclassContext);
 
         // Fixture
Index: /code/branches/core7/test/core/object/IteratorTest.cc
===================================================================
--- /code/branches/core7/test/core/object/IteratorTest.cc	(revision 10394)
+++ /code/branches/core7/test/core/object/IteratorTest.cc	(revision 10395)
@@ -23,4 +23,7 @@
                 MOCK_METHOD0(test, void());
         };
+
+        RegisterClassNoArgs(TestInterface);
+        RegisterClassNoArgs(TestClass);
 
         // Fixture
Index: /code/branches/core7/test/core/object/ListableTest.cc
===================================================================
--- /code/branches/core7/test/core/object/ListableTest.cc	(revision 10394)
+++ /code/branches/core7/test/core/object/ListableTest.cc	(revision 10395)
@@ -18,4 +18,7 @@
                 ListableSubclassTest() { RegisterObject(ListableSubclassTest); }
         };
+
+        RegisterClassNoArgs(ListableClassTest);
+        RegisterClassNoArgs(ListableSubclassTest);
 
         template <class T>
Index: /code/branches/core7/test/core/object/ObjectListIteratorTest.cc
===================================================================
--- /code/branches/core7/test/core/object/ObjectListIteratorTest.cc	(revision 10394)
+++ /code/branches/core7/test/core/object/ObjectListIteratorTest.cc	(revision 10395)
@@ -16,4 +16,6 @@
                 MOCK_METHOD0(test, void());
         };
+
+        RegisterClassNoArgs(ListableTest);
 
         // Fixture
