Index: code/trunk/src/core/Identifier.h
===================================================================
--- code/trunk/src/core/Identifier.h	(revision 1505)
+++ code/trunk/src/core/Identifier.h	(revision 1543)
@@ -253,4 +253,6 @@
             }
 
+            static Identifier* getIdentifier(std::string &name, Identifier *proposal);
+
             std::set<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to
             std::set<const Identifier*>* children_;                        //!< The children of the class the Identifier belongs to
@@ -288,15 +290,9 @@
 
         To be really sure that not more than exactly one object exists (even with libraries),
-        ClassIdentifiers are only created by IdentifierDistributor.
-
-        You can access the ClassIdentifiers created by IdentifierDistributor through the
-        ClassManager singletons.
+        ClassIdentifiers are stored in the Identifier Singleton.
     */
     template <class T>
     class ClassIdentifier : public Identifier
     {
-        template <class TT>
-        friend class ClassManager;
-
         public:
             ClassIdentifier<T>* registerClass(std::set<const Identifier*>* parents, const std::string& name, bool bRootClass);
@@ -316,4 +312,6 @@
             void addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container);
 
+            static ClassIdentifier<T> *getIdentifier();
+
         private:
             ClassIdentifier();
@@ -325,5 +323,10 @@
             std::map<std::string, XMLPortClassParamContainer<T>*> xmlportParamContainers_;              //!< All loadable parameters
             std::map<std::string, XMLPortClassObjectContainer<T, class O>*> xmlportObjectContainers_;   //!< All attachable objects
+
+            static ClassIdentifier<T> *classIdentifier_s;
     };
+
+    template <class T>
+    ClassIdentifier<T> *ClassIdentifier<T>::classIdentifier_s = 0;
 
     /**
@@ -365,4 +368,28 @@
 
     /**
+        @brief Creates the only instance of this class for the template class T and retrieves a unique Identifier for the given name.
+        @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)
+        {
+            // 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::getIdentifier(name, proposal);
+        }
+
+        // Finally return the unique ClassIdentifier
+        return ClassIdentifier<T>::classIdentifier_s;
+    }
+
+    /**
         @brief Sets the name of the class.
         @param name The name
@@ -472,5 +499,5 @@
             SubclassIdentifier()
             {
-                this->identifier_ = ClassManager<T>::getIdentifier();
+                this->identifier_ = ClassIdentifier<T>::getIdentifier();
             }
 
@@ -491,9 +518,9 @@
             SubclassIdentifier<T>& operator=(Identifier* identifier)
             {
-                if (!identifier->isA(ClassManager<T>::getIdentifier()))
+                if (!identifier->isA(ClassIdentifier<T>::getIdentifier()))
                 {
                     COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
-                    COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassManager<T>::getIdentifier()->getName() << "!" << std::endl;
-                    COUT(1) << "Error: SubclassIdentifier<" << ClassManager<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
+                    COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
+                    COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
                     COUT(1) << "Aborting..." << std::endl;
                     abort();
@@ -541,5 +568,5 @@
                     {
                         COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
-                        COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassManager<T>::getIdentifier()->getName() << "!" << std::endl;
+                        COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
                         COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl;
                         COUT(1) << "Aborting..." << std::endl;
