Index: /code/branches/core6/src/libraries/core/CoreIncludes.h
===================================================================
--- /code/branches/core6/src/libraries/core/CoreIncludes.h	(revision 9636)
+++ /code/branches/core6/src/libraries/core/CoreIncludes.h	(revision 9637)
@@ -117,5 +117,5 @@
 */
 #define CreateFactory(ClassName) \
-    RegisterFactory(ClassName, new orxonox::ClassFactoryWithContext<ClassName>(#ClassName, true))
+    RegisterFactory(ClassName, new orxonox::ClassFactoryWithContext<ClassName>(), true)
 
 /**
@@ -124,5 +124,5 @@
 */
 #define CreateUnloadableFactory(ClassName) \
-    RegisterFactory(ClassName, new orxonox::ClassFactoryWithContext<ClassName>(#ClassName, false))
+    RegisterFactory(ClassName, new orxonox::ClassFactoryWithContext<ClassName>(), false)
 
 /**
@@ -130,6 +130,6 @@
     @param ClassName The name of the class
 */
-#define RegisterFactory(ClassName, FactoryInstance) \
-    Factory* _##ClassName##Factory = FactoryInstance
+#define RegisterFactory(ClassName, FactoryInstance, bLoadable) \
+    Identifier* _##ClassName##Identifier = orxonox::registerClass<ClassName>(#ClassName, FactoryInstance, bLoadable)
 
 /**
@@ -143,4 +143,29 @@
 namespace orxonox
 {
+    /**
+     * @brief Overload of registerClass() which determines T implicitly by the template argument of the ClassFactory.
+     */
+    template <class T>
+    inline Identifier* registerClass(const std::string& name, ClassFactory<T>* factory, bool bLoadable = true)
+    {
+        return registerClass<T>(name, static_cast<Factory*>(factory), bLoadable);
+    }
+
+    /**
+     * @brief Registers a class in the framework.
+     * @param name The name of the class
+     * @param factory The factory which is able to create new instances of this class
+     * @param bLoadable Whether the class is allowed to be loaded through XML
+     */
+    template <class T>
+    inline Identifier* registerClass(const std::string& name, Factory* factory, bool bLoadable = true)
+    {
+        orxout(verbose, context::misc::factory) << "Create entry for " << name << " in Factory." << endl;
+        Identifier* identifier = ClassIdentifier<T>::getIdentifier(name);
+        identifier->setFactory(factory);
+        identifier->setLoadable(bLoadable);
+        return identifier;
+    }
+
     /**
         @brief Returns the Identifier with a given name.
Index: /code/branches/core6/src/libraries/core/object/ClassFactory.h
===================================================================
--- /code/branches/core6/src/libraries/core/object/ClassFactory.h	(revision 9636)
+++ /code/branches/core6/src/libraries/core/object/ClassFactory.h	(revision 9637)
@@ -43,5 +43,4 @@
 
 #include "util/Output.h"
-#include "core/class/Identifier.h"
 
 namespace orxonox
@@ -54,5 +53,5 @@
     {
         public:
-            virtual ~Factory() {};
+            virtual ~Factory() {}
             virtual Identifiable* fabricate(Context* context) = 0;
     };
@@ -61,21 +60,18 @@
     // ###      ClassFactory       ###
     // ###############################
-    /// The ClassFactory is able to create new objects of a specific class that require no constructor arguments.
+    /// The ClassFactory is the base-class of all class-spezific factories
     template <class T>
     class ClassFactory : public Factory
     {
+    };
+
+    // ###############################
+    // ###   ClassFactoryNoArgs    ###
+    // ###############################
+    /// The ClassFactoryNoArgs is able to create new objects of a specific class that require no constructor arguments.
+    template <class T>
+    class ClassFactoryNoArgs : public ClassFactory<T>
+    {
         public:
-            /**
-                @brief Constructor: Adds the ClassFactory to the Identifier of the same type.
-                @param name The name of the class
-                @param bLoadable True if the class can be loaded through XML
-            */
-            ClassFactory(const std::string& name, bool bLoadable = true)
-            {
-                orxout(verbose, context::misc::factory) << "Create entry for " << name << " in Factory." << endl;
-                ClassIdentifier<T>::getIdentifier(name)->setFactory(this);
-                ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
-            }
-
             /**
                 @brief Creates and returns a new object of class T.
@@ -93,19 +89,7 @@
     /// The ClassFactoryWithContext is able to create new objects of a specific class that require a context as constructor argument
     template <class T>
-    class ClassFactoryWithContext : public Factory
+    class ClassFactoryWithContext : public ClassFactory<T>
     {
         public:
-            /**
-                @brief Constructor: Adds the ClassFactory to the Identifier of the same type.
-                @param name The name of the class
-                @param bLoadable True if the class can be loaded through XML
-            */
-            ClassFactoryWithContext(const std::string& name, bool bLoadable = true)
-            {
-                orxout(verbose, context::misc::factory) << "Create entry for " << name << " in Factory." << endl;
-                ClassIdentifier<T>::getIdentifier(name)->setFactory(this);
-                ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
-            }
-
             /**
                 @brief Creates and returns a new object of class T.
Index: /code/branches/core6/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- /code/branches/core6/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 9636)
+++ /code/branches/core6/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 9637)
@@ -22,7 +22,7 @@
                 virtual void SetUp()
                 {
-                    new ClassFactory<Interface>("Interface");
-                    new ClassFactory<BaseClass>("BaseClass");
-                    new ClassFactory<RealClass>("RealClass");
+                    registerClass("Interface", new ClassFactoryNoArgs<Interface>());
+                    registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
+                    registerClass("RealClass", new ClassFactoryNoArgs<RealClass>());
                     IdentifierManager::createClassHierarchy();
                 }
Index: /code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- /code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 9636)
+++ /code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 9637)
@@ -24,7 +24,7 @@
                 virtual void SetUp()
                 {
-                    new ClassFactory<Interface>("Interface");
-                    new ClassFactory<BaseClass>("BaseClass");
-                    new ClassFactory<RealClass>("RealClass");
+                    registerClass("Interface", new ClassFactoryNoArgs<Interface>());
+                    registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
+                    registerClass("RealClass", new ClassFactoryNoArgs<RealClass>());
                     IdentifierManager::createClassHierarchy();
                 }
Index: /code/branches/core6/test/core/object/ClassFactoryTest.cc
===================================================================
--- /code/branches/core6/test/core/object/ClassFactoryTest.cc	(revision 9636)
+++ /code/branches/core6/test/core/object/ClassFactoryTest.cc	(revision 9637)
@@ -7,5 +7,5 @@
     TEST(ClassFactoryTest, CanFabricateObject)
     {
-        Factory* factory = new ClassFactoryWithContext<BaseObject>("BaseObject");
+        Factory* factory = new ClassFactoryWithContext<BaseObject>();
         Identifiable* object = factory->fabricate(NULL);
         ASSERT_TRUE(object != NULL);
