Index: code/trunk/src/core/Identifier.h
===================================================================
--- code/trunk/src/core/Identifier.h	(revision 2710)
+++ code/trunk/src/core/Identifier.h	(revision 2784)
@@ -357,9 +357,9 @@
             static ClassIdentifier<T> *getIdentifier(const std::string& name);
             void addObject(T* object);
-            static bool isFirstCall();
 
             void updateConfigValues(bool updateChildren = true) const;
 
         private:
+            static void initialiseIdentifier();
             ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
             ClassIdentifier()
@@ -376,70 +376,56 @@
 
     template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::classIdentifier_s;
-
-    /**
-        @brief Returns true if the function gets called the first time, false otherwise.
-        @return True if this function got called the first time.
-    */
-    template <class T>
-    bool ClassIdentifier<T>::isFirstCall()
-    {
-        static bool bFirstCall = true;
-
-        if (bFirstCall)
+    ClassIdentifier<T>* ClassIdentifier<T>::classIdentifier_s = 0;
+
+    /**
+        @brief Returns the only instance of this class.
+        @return The unique Identifier
+    */
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
+    {
+        // check if the static field has already been filled
+        if (ClassIdentifier<T>::classIdentifier_s == 0)
+            ClassIdentifier<T>::initialiseIdentifier();
+
+        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>
+    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>
+    void ClassIdentifier<T>::initialiseIdentifier()
+    {
+        // Get the name of the class
+        std::string name = typeid(T).name();
+
+        // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used.
+        ClassIdentifier<T>* proposal = new ClassIdentifier<T>();
+
+        // Get the entry from the map
+        ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*)Identifier::getIdentifierSingleton(name, proposal);
+
+        if (ClassIdentifier<T>::classIdentifier_s == proposal)
         {
-            bFirstCall = false;
-            return true;
+            COUT(4) << "*** Identifier: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;
         }
         else
         {
-            return false;
+            COUT(4) << "*** Identifier: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;
         }
-    }
-
-    /**
-        @brief Returns the only instance of this class.
-        @return The unique Identifier
-    */
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
-    {
-        // check if the static field has already been filled
-        if (ClassIdentifier<T>::isFirstCall())
-        {
-            // Get the name of the class
-            std::string name = typeid(T).name();
-
-            // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used.
-            ClassIdentifier<T>* proposal = new ClassIdentifier<T>();
-
-            // Get the entry from the map
-            ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*)Identifier::getIdentifierSingleton(name, proposal);
-
-            if (ClassIdentifier<T>::classIdentifier_s == proposal)
-            {
-                COUT(4) << "*** Identifier: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;
-            }
-            else
-            {
-                COUT(4) << "*** Identifier: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;
-            }
-        }
-
-        // Finally return the unique ClassIdentifier
-        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>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
-    {
-        ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
-        identifier->setName(name);
-        return identifier;
     }
 
