Index: code/branches/core7/src/libraries/core/Core.cc
===================================================================
--- code/branches/core7/src/libraries/core/Core.cc	(revision 10361)
+++ code/branches/core7/src/libraries/core/Core.cc	(revision 10362)
@@ -94,5 +94,5 @@
 
     // register Core as an abstract class to avoid problems if the class hierarchy is created within Core-constructor
-    RegisterAbstractClass(Core).inheritsFrom(Class(Configurable));
+    RegisterAbstractClass(Core).inheritsFrom<Configurable>();
 
     Core::Core(const std::string& cmdLine)
@@ -517,5 +517,5 @@
 
 
-    RegisterAbstractClass(DevModeListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(DevModeListener).inheritsFrom<Listable>();
 
     DevModeListener::DevModeListener()
Index: code/branches/core7/src/libraries/core/CoreIncludes.h
===================================================================
--- code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10361)
+++ code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10362)
@@ -127,5 +127,5 @@
 */
 #define RegisterClassWithFactory(ClassName, FactoryInstance, bLoadable) \
-    Identifier& _##ClassName##Identifier = (new orxonox::SI_I(orxonox::registerClass<ClassName>(#ClassName, FactoryInstance, bLoadable)))->getIdentifier()
+    orxonox::SI_I& _##ClassName##Identifier = (*new orxonox::SI_I(orxonox::registerClass<ClassName>(#ClassName, FactoryInstance, bLoadable)))
 
 /**
@@ -213,16 +213,49 @@
     }
 
+
+
+
+    /**
+     * The static initializer stores the parent classes of this identifier. The corresponding identifiers are later loaded. This prevents identifiers from
+     * being used before they are completely initialized.
+     */
     class _CoreExport StaticallyInitializedIdentifier : public StaticallyInitializedInstance
     {
+        struct InheritsFrom
+        {
+            virtual ~InheritsFrom() {}
+            virtual Identifier* getParent() = 0;
+        };
+
+        template <class T>
+        struct InheritsFromClass : public InheritsFrom
+        {
+            virtual Identifier* getParent() { return Class(T); }
+        };
+
         public:
             StaticallyInitializedIdentifier(Identifier* identifier) : identifier_(identifier) {}
-
-            virtual void load() {}
+            ~StaticallyInitializedIdentifier()
+            {
+                for (size_t i = 0; i < this->parents_.size(); ++i)
+                    delete parents_[i];
+            }
+
+            virtual void load()
+            {
+                for (size_t i = 0; i < this->parents_.size(); ++i)
+                    this->identifier_->inheritsFrom(this->parents_[i]->getParent());
+            }
 
             inline Identifier& getIdentifier()
                 { return *this->identifier_; }
 
+            template <class T>
+            inline StaticallyInitializedIdentifier& inheritsFrom()
+                { this->parents_.push_back(new InheritsFromClass<T>()); return *this; }
+
         private:
             Identifier* identifier_;
+            std::vector<InheritsFrom*> parents_;
     };
 
Index: code/branches/core7/src/libraries/core/ViewportEventListener.cc
===================================================================
--- code/branches/core7/src/libraries/core/ViewportEventListener.cc	(revision 10361)
+++ code/branches/core7/src/libraries/core/ViewportEventListener.cc	(revision 10362)
@@ -32,5 +32,5 @@
 namespace orxonox
 {
-    RegisterAbstractClass(ViewportEventListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(ViewportEventListener).inheritsFrom<Listable>();
 
     ViewportEventListener::ViewportEventListener()
Index: code/branches/core7/src/libraries/core/WindowEventListener.cc
===================================================================
--- code/branches/core7/src/libraries/core/WindowEventListener.cc	(revision 10361)
+++ code/branches/core7/src/libraries/core/WindowEventListener.cc	(revision 10362)
@@ -35,5 +35,5 @@
     unsigned int WindowEventListener::windowHeight_s = 0;
 
-    RegisterAbstractClass(WindowEventListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(WindowEventListener).inheritsFrom<Listable>();
 
     WindowEventListener::WindowEventListener()
Index: code/branches/core7/src/libraries/core/XMLNameListener.cc
===================================================================
--- code/branches/core7/src/libraries/core/XMLNameListener.cc	(revision 10361)
+++ code/branches/core7/src/libraries/core/XMLNameListener.cc	(revision 10362)
@@ -32,5 +32,5 @@
 namespace orxonox
 {
-    RegisterAbstractClass(XMLNameListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(XMLNameListener).inheritsFrom<Listable>();
 
     XMLNameListener::XMLNameListener()
