Index: orxonox/trunk/src/util/loading/factory.cc
===================================================================
--- orxonox/trunk/src/util/loading/factory.cc	(revision 4592)
+++ orxonox/trunk/src/util/loading/factory.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -21,5 +21,5 @@
 
 /*  --------------------------------------------------
- *		 Factory
+ *               Factory
  *   --------------------------------------------------
  */
@@ -27,13 +27,16 @@
 /**
    \brief constructor
-   
+
    set everything to zero and define factoryName
 */
 Factory::Factory (const char* factoryName)
 {
+  this->setClassID(CL_FACTORY, "Factory");
+  this->setName(factoryName);
+
   this->factoryName = NULL;
   this->setFactoryName(factoryName);
   next = NULL;
-  
+
   initialize();
 }
@@ -41,5 +44,5 @@
 /**
    \brief destructor
-   
+
    clear the Q
 */
Index: orxonox/trunk/src/util/loading/factory.h
===================================================================
--- orxonox/trunk/src/util/loading/factory.h	(revision 4592)
+++ orxonox/trunk/src/util/loading/factory.h	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -14,5 +14,5 @@
 */
 
-/*! 
+/*!
   \file factory.h
   \brief A loadable object handler
@@ -27,19 +27,21 @@
 #include "tinyxml.h"
 #include "load_param.h"
+#include "base_object.h"
 #include "debug.h"
 
-/** 
+/**
     Creates a factory to a Loadable Class.
     this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
+  \todo make factoryName a BaseObject-parameter. (else it would be redundant)
 */
-#define CREATE_FACTORY(CLASS_NAME) tFactory<CLASS_NAME>* global_##CLASS_NAME##Factory = new tFactory<CLASS_NAME>(#CLASS_NAME)		
+#define CREATE_FACTORY(CLASS_NAME) tFactory<CLASS_NAME>* global_##CLASS_NAME##Factory = new tFactory<CLASS_NAME>(#CLASS_NAME)
 
 //! The Factory is a loadable object handler
-class Factory {
+class Factory : public BaseObject {
 
  public:
   Factory (const char* factoryName = NULL);
   ~Factory ();
-  
+
 
   virtual BaseObject* fabricate(const TiXmlElement* root);
@@ -53,5 +55,5 @@
   /** \returns the next factory */
   Factory* getNext(void) const { return this->next; };
-	
+
  protected:
   char*         factoryName;          //!< the name of the factory
@@ -69,5 +71,5 @@
   tFactory(const char* factoryName);
   virtual ~tFactory();
-  
+
   private:
   BaseObject* fabricate(const TiXmlElement* root);
@@ -83,5 +85,5 @@
   PRINTF(5)("fileName: %s loadable\n", this->factoryName);
 }
-  
+
 
 template<class T>
@@ -90,11 +92,11 @@
 
 template<class T>
-BaseObject* tFactory<T>::fabricate(const TiXmlElement* root) 
-{ 
+BaseObject* tFactory<T>::fabricate(const TiXmlElement* root)
+{
   if(!strcmp(root->Value(), getFactoryName()))
     return new T ( root);
-  else if( getNext() != NULL) 
+  else if( getNext() != NULL)
     return getNext()->fabricate( root);
-  else 
+  else
     return NULL;
 }
Index: orxonox/trunk/src/util/loading/game_loader.cc
===================================================================
--- orxonox/trunk/src/util/loading/game_loader.cc	(revision 4592)
+++ orxonox/trunk/src/util/loading/game_loader.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -39,6 +39,8 @@
    \brief simple constructor
 */
-GameLoader::GameLoader () 
-{
+GameLoader::GameLoader ()
+{
+  this->setClassID(CL_GAME_LOADER, "GameLoader");
+  this->setName("GameLoader");
   first = NULL;
 }
@@ -110,28 +112,28 @@
   switch(campaignID)
     {
-      /* 
-	 Debug Level 0: Debug level used to test the base frame work.
-	 As you can see, all storyentity data is allocated before game
-	 start. the storyentity will load themselfs shortly before start
-	 through the StoryEntity::init() funtion.
+      /*
+         Debug Level 0: Debug level used to test the base frame work.
+         As you can see, all storyentity data is allocated before game
+         start. the storyentity will load themselfs shortly before start
+         through the StoryEntity::init() funtion.
       */
     case DEBUG_CAMPAIGN_0:
       {
-	Campaign* debugCampaign = new Campaign();
-
-	World* world0 = new World(DEBUG_WORLD_0);
-	world0->setNextStoryID(WORLD_ID_1);
-	debugCampaign->addEntity(world0, WORLD_ID_0);
-
-	World* world1 = new World(DEBUG_WORLD_1);
-	world1->setNextStoryID(WORLD_ID_2);
-	debugCampaign->addEntity(world1, WORLD_ID_1);
-
-	World* world2 = new World(DEBUG_WORLD_2);
-	world2->setNextStoryID(WORLD_ID_GAMEEND);
-	debugCampaign->addEntity(world2, WORLD_ID_2);
-
-	this->currentCampaign = debugCampaign;
-	break;
+        Campaign* debugCampaign = new Campaign();
+
+        World* world0 = new World(DEBUG_WORLD_0);
+        world0->setNextStoryID(WORLD_ID_1);
+        debugCampaign->addEntity(world0, WORLD_ID_0);
+
+        World* world1 = new World(DEBUG_WORLD_1);
+        world1->setNextStoryID(WORLD_ID_2);
+        debugCampaign->addEntity(world1, WORLD_ID_1);
+
+        World* world2 = new World(DEBUG_WORLD_2);
+        world2->setNextStoryID(WORLD_ID_GAMEEND);
+        debugCampaign->addEntity(world2, WORLD_ID_2);
+
+        this->currentCampaign = debugCampaign;
+        break;
       }
     }
@@ -139,7 +141,7 @@
 
 
-/** 
+/**
     \brief starts the current entity
-    \returns error code if this action has caused a error    
+    \returns error code if this action has caused a error
 */
 ErrorMessage GameLoader::start()
@@ -150,5 +152,5 @@
 
 
-/** 
+/**
     \brief stops the current entity
     \returns error code if this action has caused a error
@@ -168,5 +170,5 @@
 
 
-/** 
+/**
     \brief pause the current entity
     \returns error code if this action has caused a error
@@ -182,5 +184,5 @@
 
 
-/** 
+/**
     \brief resumes a pause
     \returns error code if this action has caused a error
@@ -218,5 +220,5 @@
      can load everything it needs into memory then.
   */
-  
+
   if( fileName == NULL)
     {
@@ -224,5 +226,5 @@
       return NULL;
     }
-  
+
   TiXmlDocument* XMLDoc = new TiXmlDocument( fileName);
   // load the campaign document
@@ -234,9 +236,9 @@
       return NULL;
     }
-	
+
   // check basic validity
   TiXmlElement* root = XMLDoc->RootElement();
   assert( root != NULL);
-	
+
   if( strcmp( root->Value(), "Campaign"))
     {
@@ -246,8 +248,8 @@
       return NULL;
     }
-	
+
   // construct campaign
   Campaign* c = new Campaign( root);
-	
+
   // free the XML data
   delete XMLDoc;
@@ -258,5 +260,5 @@
 
 /**
-   \brief handle keyboard commands 
+   \brief handle keyboard commands
    \param event the event to handle
 */
@@ -265,25 +267,25 @@
   if( event.type == KeyMapper::PEV_NEXT_WORLD)
     {
-      if( likely(event.bPressed)) 
-	{
-	  this->nextLevel();
-	}
+      if( likely(event.bPressed))
+        {
+          this->nextLevel();
+        }
     }
   else if( event.type == KeyMapper::PEV_PREVIOUS_WORLD)
     {
       if( likely(event.bPressed))
-	{
-	  this->previousLevel();
-	}
+        {
+          this->previousLevel();
+        }
     }
   else if( event.type == KeyMapper::PEV_PAUSE)
     {
       if( likely(event.bPressed))
-	{
-	  if(this->isPaused)
-	    this->resume();
-	  else
-	    this->pause();
-	}
+        {
+          if(this->isPaused)
+            this->resume();
+          else
+            this->pause();
+        }
     }
   else if( event.type == KeyMapper::PEV_QUIT)
@@ -322,10 +324,10 @@
 void GameLoader::registerFactory( Factory* factory)
 {
-	assert( factory != NULL);
-	
-	PRINTF(4)("Registered factory for '%s'\n", factory->getFactoryName());
-	
-	if( first == NULL) first = factory;
-	else first->registerFactory( factory);
+        assert( factory != NULL);
+
+        PRINTF(4)("Registered factory for '%s'\n", factory->getFactoryName());
+
+        if( first == NULL) first = factory;
+        else first->registerFactory( factory);
 }
 
@@ -338,5 +340,5 @@
 {
   assert( element != NULL);
-	
+
   if( first == NULL)
     {
@@ -344,18 +346,18 @@
       return NULL;
     }
-	
+
   if( element->Value() != NULL)
     {
       PRINTF(4)("Attempting fabrication of a '%s'\n", element->Value());
       BaseObject* b = first->fabricate( element);
-      if( b == NULL) 
-	PRINTF(2)("Failed to fabricate a '%s'\n", element->Value());
-      else 
-	PRINTF(4)("Successfully fabricated a '%s'\n", element->Value());
+      if( b == NULL)
+        PRINTF(2)("Failed to fabricate a '%s'\n", element->Value());
+      else
+        PRINTF(4)("Successfully fabricated a '%s'\n", element->Value());
       return b;
     }
-	
+
   PRINTF(2)("Fabricate failed, TiXmlElement did not contain a value\n");
-	
+
   return NULL;
 }
Index: orxonox/trunk/src/util/loading/load_param.cc
===================================================================
--- orxonox/trunk/src/util/loading/load_param.cc	(revision 4592)
+++ orxonox/trunk/src/util/loading/load_param.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -30,6 +30,7 @@
 */
 BaseLoadParam::BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName,
-			     int paramCount, bool multi, ...)
-{
+                             int paramCount, bool multi, ...)
+{
+  this->setClassID(CL_LOAD_PARAM, "LoadParam");
   this->loadString = NULL;
 
@@ -39,14 +40,14 @@
     {
       if (likely(!multi))
-	this->loadString = grabParameter(root, paramName);
+        this->loadString = grabParameter(root, paramName);
       else
-	{
-	  if (!strcmp(root->Value(), paramName))
-	    {
-	      const TiXmlNode* val = root->FirstChild();
-	      if( val->ToText())
-		this->loadString = val->Value();
-	    }
-	}
+        {
+          if (!strcmp(root->Value(), paramName))
+            {
+              const TiXmlNode* val = root->FirstChild();
+              if( val->ToText())
+                this->loadString = val->Value();
+            }
+        }
     }
 
@@ -64,9 +65,9 @@
       va_start (types, multi);
       for(int i = 0; i < paramCount; i++)
-	{
-	  const char* tmpTypeName = va_arg (types, const char*);
-	  this->paramDesc->types[i] = new char[strlen(tmpTypeName)+1];
-	  strcpy(this->paramDesc->types[i], tmpTypeName);
-	}
+        {
+          const char* tmpTypeName = va_arg (types, const char*);
+          this->paramDesc->types[i] = new char[strlen(tmpTypeName)+1];
+          strcpy(this->paramDesc->types[i], tmpTypeName);
+        }
       va_end(types);
 
@@ -131,5 +132,5 @@
     {
       if (i > 0)
-	PRINT(3)(",");
+        PRINT(3)(",");
       PRINT(3)("%s", this->types[i]);
     }
@@ -194,8 +195,8 @@
     {
       if (!strcmp(enumClassDesc->className, className))
-	{
-	  delete iterator;
-	  return enumClassDesc;
-	}
+        {
+          delete iterator;
+          return enumClassDesc;
+        }
       enumClassDesc = iterator->nextElement();
     }
@@ -216,8 +217,8 @@
     {
       if (!strcmp(enumParamDesc->paramName, paramName))
-	{
-	  delete iterator;
-	  return enumParamDesc;
-	}
+        {
+          delete iterator;
+          return enumParamDesc;
+        }
       enumParamDesc = iterator->nextElement();
     }
@@ -243,8 +244,8 @@
       LoadParamDescription* enumParamDesc = paramIT->nextElement();
       while (enumParamDesc)
-	{
-	  enumParamDesc->print();
-	  enumParamDesc = paramIT->nextElement();
-	}
+        {
+          enumParamDesc->print();
+          enumParamDesc = paramIT->nextElement();
+        }
       delete paramIT;
 
@@ -267,12 +268,12 @@
   const TiXmlElement* element;
   const TiXmlNode* node;
-	
+
   if (root == NULL)
     return NULL;
   assert( parameterName != NULL);
-	
+
   element = root->FirstChildElement( parameterName);
   if( element == NULL) return NULL;
-	
+
   node = element->FirstChild();
   while( node != NULL)
Index: orxonox/trunk/src/util/loading/load_param.h
===================================================================
--- orxonox/trunk/src/util/loading/load_param.h	(revision 4592)
+++ orxonox/trunk/src/util/loading/load_param.h	(revision 4597)
@@ -22,4 +22,5 @@
 #define _LOAD_PARAM_H
 
+#include "base_object.h"
 #include "factory.h"
 #include "debug.h"
@@ -228,5 +229,5 @@
 
 //! abstract Base class for a Loadable parameter
-class BaseLoadParam
+class BaseLoadParam : public BaseObject
 {
  public:
