Index: /orxonox/trunk/src/util/loading/factory.cc
===================================================================
--- /orxonox/trunk/src/util/loading/factory.cc	(revision 4486)
+++ /orxonox/trunk/src/util/loading/factory.cc	(revision 4487)
@@ -30,8 +30,8 @@
    set everything to zero and define factoryName
 */
-Factory::Factory (const char* name)
+Factory::Factory (const char* factoryName)
 {
   this->factoryName = NULL;
-  this->setFactoryName(name);
+  this->setFactoryName(factoryName);
   next = NULL;
   
@@ -51,12 +51,18 @@
   if (this->next)
     delete this->next;
+
+  if (this->factoryName)
+    delete []this->factoryName;
 }
 
-void Factory::setFactoryName(const char* name)
+/**
+   \brief sets the name of this factory
+*/
+void Factory::setFactoryName(const char* factoryName)
 {
-  if (factoryName)
-    delete factoryName;
-  factoryName = new char[strlen(name)+1];
-  strcpy(factoryName, name);
+  if (this->factoryName)
+    delete this->factoryName;
+  this->factoryName = new char[strlen(factoryName)+1];
+  strcpy(this->factoryName, factoryName);
 }
 
@@ -88,5 +94,10 @@
 }
 
-const char* grabParameter(const TiXmlElement* root, const char* name)
+/**
+   \param root: The XML-element to grab a parameter from
+   \param parameterName: the parameter to grab
+   \returns the Value of the parameter if found, NULL otherwise
+*/
+const char* grabParameter(const TiXmlElement* root, const char* parameterName)
 {
   const TiXmlElement* element;
@@ -95,7 +106,7 @@
   if (root == NULL)
     return NULL;
-  assert( name != NULL);
+  assert( parameterName != NULL);
 	
-  element = root->FirstChildElement( name);
+  element = root->FirstChildElement( parameterName);
   if( element == NULL) return NULL;
 	
Index: /orxonox/trunk/src/util/loading/factory.h
===================================================================
--- /orxonox/trunk/src/util/loading/factory.h	(revision 4486)
+++ /orxonox/trunk/src/util/loading/factory.h	(revision 4487)
@@ -16,5 +16,5 @@
 /*! 
   \file factory.h
-  \brief philosophy stuff
+  \brief A loadable object handler
 */
 
@@ -34,9 +34,10 @@
 */
 #define CREATE_FACTORY(CLASS_NAME) tFactory<CLASS_NAME>* global_##CLASS_NAME##Factory = new tFactory<CLASS_NAME>(#CLASS_NAME)		
-//! The Factory is
+
+//! The Factory is a loadable object handler
 class Factory {
 
  public:
-  Factory (const char* name = NULL);
+  Factory (const char* factoryName = NULL);
   ~Factory ();
   
@@ -45,19 +46,26 @@
   void initialize();
   void registerFactory( Factory* factory);
-  void setFactoryName(const char* name);
-  const char* getFactoryName() {return factoryName;};
-  void setNext( Factory* factory) {next = factory;}
-  Factory* getNext() {return next;}
+  void setFactoryName(const char* factoryName);
+  /** \returns the name of the factory */
+  const char* getFactoryName() { return this->factoryName; };
+  /** \brief sets the Next factory in the list \param nextFactory the next factory */
+  inline void setNext( Factory* nextFactory) { this->next = nextFactory; };
+  /** \returns the next factory */
+  Factory* getNext(void) const { return this->next; };
 	
+ protected:
+  char*         factoryName;          //!< the name of the factory
  private:
-  char* factoryName;
-	
-  Factory* next;
+  Factory*      next;                 //!< pointer to the next factory.
 };
 
+/**
+   \brief a factory that is able to load any kind of Object
+   (this is a Functor)
+*/
 template<class T> class tFactory : public Factory
 {
  public:
-  tFactory(const char* name);
+  tFactory(const char* factoryName);
   virtual ~tFactory();
   
@@ -66,8 +74,12 @@
 };
 
+/**
+   \brief construnts a factory with
+   \param factoryName the name of the factory
+*/
 template<class T>
-tFactory<T>::tFactory(const char* name) : Factory(name)
+tFactory<T>::tFactory(const char* factoryName) : Factory(factoryName)
 {
-  PRINTF(5)("fileName: %s\n", name);
+  PRINTF(5)("fileName: %s loadable\n", this->factoryName);
 }
   
@@ -90,5 +102,5 @@
 // helper function
 
-const char* grabParameter(const TiXmlElement* root, const char* name);
+const char* grabParameter(const TiXmlElement* root, const char* parameterName);
 
 #endif /* _FACTORY_H */
Index: /orxonox/trunk/src/util/loading/game_loader.cc
===================================================================
--- /orxonox/trunk/src/util/loading/game_loader.cc	(revision 4486)
+++ /orxonox/trunk/src/util/loading/game_loader.cc	(revision 4487)
@@ -37,6 +37,6 @@
 
 /**
-  \brief simple constructor
- */
+   \brief simple constructor
+*/
 GameLoader::GameLoader () 
 {
@@ -46,6 +46,6 @@
 
 /**
-  \brief simple deconstructor
- */
+   \brief simple deconstructor
+*/
 GameLoader::~GameLoader () {}
 
@@ -64,5 +64,7 @@
 }
 
-
+/**
+   \brief initializes the GameLoader
+*/
 ErrorMessage GameLoader::init()
 {
@@ -80,13 +82,13 @@
 /**
    \brief reads a campaign definition file into a campaign class
-   \param filename to be loaded
+   \param fileName to be loaded
    \returns the loaded campaign
 
    this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
 */
-ErrorMessage GameLoader::loadCampaign(const char* name)
+ErrorMessage GameLoader::loadCampaign(const char* fileName)
 {
   ErrorMessage errorCode;
-  char* campaignName = ResourceManager::getFullName(name);
+  char* campaignName = ResourceManager::getFullName(fileName);
   if (campaignName)
     {
@@ -101,5 +103,5 @@
 /**
    \brief loads a debug campaign for test purposes only.
-   \param the identifier of the campaign.
+   \param campaignID the identifier of the campaign.
    \returns error message if not able to do so.
 */
@@ -198,15 +200,17 @@
  */
 ErrorMessage GameLoader::destroy()
-{}
+{
+
+}
 
 
 /**
    \brief reads a campaign definition file into a campaign class
-   \param filename to be loaded
+   \param fileName to be loaded
    \returns the loaded campaign
 
    this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
 */
-Campaign* GameLoader::fileToCampaign(const char *name)
+Campaign* GameLoader::fileToCampaign(const char* fileName)
 {
   /* do not entirely load the campaign. just the current world
@@ -215,5 +219,5 @@
   */
   
-  if( name == NULL)
+  if( fileName == NULL)
     {
       PRINTF(2)("No filename specified for loading");
@@ -221,10 +225,10 @@
     }
   
-  TiXmlDocument* XMLDoc = new TiXmlDocument( name);
+  TiXmlDocument* XMLDoc = new TiXmlDocument( fileName);
   // load the campaign document
   if( !XMLDoc->LoadFile())
     {
       // report an error
-      PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", name, XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
+      PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", fileName, XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
       delete XMLDoc;
       return NULL;
@@ -255,5 +259,5 @@
 /**
    \brief handle keyboard commands 
-   \param the event to handle
+   \param event the event to handle
 */
 void GameLoader::process(const Event& event)
@@ -290,5 +294,5 @@
 
 
-/*
+/**
   \brief this changes to the next level
 */
@@ -300,5 +304,5 @@
 
 
-/*
+/**
   \brief change to the previous level - not implemented
 
Index: /orxonox/trunk/src/util/loading/game_loader.h
===================================================================
--- /orxonox/trunk/src/util/loading/game_loader.h	(revision 4486)
+++ /orxonox/trunk/src/util/loading/game_loader.h	(revision 4487)
@@ -42,4 +42,6 @@
 
  public:
+  ~GameLoader ();
+
   static GameLoader* getInstance();
 
@@ -55,8 +57,9 @@
   void previousLevel();
 
+  /** \brief a world command to send to the GameLoader \param cmd the command */
   bool worldCommand(Command* cmd);
   ErrorMessage loadDebugCampaign(Uint32 campaignID);
   
-  void registerFactory( Factory* factory);
+  void registerFactory( Factory* factory );
   BaseObject* fabricate( TiXmlElement* data);
 
@@ -65,15 +68,18 @@
  private:
   GameLoader ();
-  ~GameLoader ();
-  Uint32 startTime; //!> start time of the campaign
-  static GameLoader* singletonRef;
-  bool isPaused;
 
-  Campaign* currentCampaign; //!> the current campaign playing
+  Campaign* fileToCampaign(const char* name);
+
+ private:
+  static GameLoader*     singletonRef;         //!< The singleton-reference to this object
+
+  Uint32                 startTime;            //!< start time of the campaign
+  bool                   isPaused;             //!< if the game is paused
+
+  Campaign*              currentCampaign;      //!< the current campaign playing
   
-  Campaign* fileToCampaign(const char* name);
-  EventHandler* eventHandler;
+  EventHandler*          eventHandler;         //!< reference to the eventHandler
 
-  Factory* first;
+  Factory*               first;                //!< the first factory of them all
 };
 
Index: /orxonox/trunk/src/util/loading/load_param.cc
===================================================================
--- /orxonox/trunk/src/util/loading/load_param.cc	(revision 4486)
+++ /orxonox/trunk/src/util/loading/load_param.cc	(revision 4487)
@@ -23,7 +23,8 @@
 /**
    \param object The object this Parameter is loaded too.
-   \param paramName The name of the parameter loaded.
-   \param paramCount how many parameters this loading-function takes
-   \param ... the parameter information
+   \param root: the XML-element to load this option from.
+   \param paramName: The name of the parameter loaded.
+   \param paramCount: how many parameters this loading-function takes
+   \param ...: the parameter information
 */
 BaseLoadParam::BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, ...)
Index: /orxonox/trunk/src/util/loading/load_param.h
===================================================================
--- /orxonox/trunk/src/util/loading/load_param.h	(revision 4486)
+++ /orxonox/trunk/src/util/loading/load_param.h	(revision 4487)
@@ -38,27 +38,27 @@
 */
 
-#define l_INT_TYPE int
-#define l_INT_FUNC atoi
-#define l_INT_NAME "int"
-
-#define l_LONG_TYPE long
-#define l_LONG_FUNC atol
-#define l_LONG_NAME "long"
-
-#define l_SHORT_TYPE short
-#define l_SHORT_FUNC atoi
-#define l_SHORT_NAME "short"
-
-#define l_FLOAT_TYPE float
-#define l_FLOAT_FUNC atof
-#define l_FLOAT_NAME "float"
-
-#define l_STRING_TYPE const char*
-#define l_STRING_FUNC
-#define l_STRING_NAME "string"
-
-
-/**
-   \brief a Macro to easily implement many different Constructors for the LoadParam-Class
+#define l_INT_TYPE       int              //!< The type of an INT
+#define l_INT_FUNC       atoi             //!< the function to call to parse INT
+#define l_INT_NAME       "int"            //!< the name of an INT
+
+#define l_LONG_TYPE      long             //!< The type of a LONG
+#define l_LONG_FUNC      atol             //!< The function to parse a LONG
+#define l_LONG_NAME      "long"           //!< The name of a LONG
+
+#define l_SHORT_TYPE     short            //!< The type of a SHORT
+#define l_SHORT_FUNC     atoi             //!< The function to parse a SHORT
+#define l_SHORT_NAME     "short"          //!< The name of a SHORT
+
+#define l_FLOAT_TYPE     float            //!< The type of a FLOAT
+#define l_FLOAT_FUNC     atof             //!< The function to parse a FLOAT
+#define l_FLOAT_NAME     "float"          //!< The name of a FLOAT
+
+#define l_STRING_TYPE    const char*      //!< The type fo a STRING
+#define l_STRING_FUNC                     //!< The function to parse a STRING
+#define l_STRING_NAME    "string"         //!< The name of a STRING
+
+// 1. TYPE
+/**
+   \brief a Macro to easily implement many different Constructors for the LoadParam-Class with 1 argument
    \param type1 The type of the first functionParameter
 */
@@ -75,4 +75,9 @@
 
 // 2. TYPES
+/**
+   \brief a Macro to easily implement many different Constructors for the LoadParam-Class with 2 arguments
+   \param type1 The type of the first functionParameter
+   \param type2 The type of the second functionParameter
+*/
 #define LoadParam2(type1, type2) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE)) \
@@ -94,4 +99,10 @@
 
 // 3. TYPES
+/**
+   \brief a Macro to easily implement many different Constructors for the LoadParam-Class with 3 arguments
+   \param type1 The type of the first functionParameter
+   \param type2 The type of the second functionParameter
+   \param type3 The type of the third functionParameter
+*/
 #define LoadParam3(type1, type2, type3) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE))\
@@ -113,4 +124,11 @@
 
 // 4. TYPES
+/**
+   \brief a Macro to easily implement many different Constructors for the LoadParam-Class with 4 arguments
+   \param type1 The type of the first functionParameter
+   \param type2 The type of the second functionParameter
+   \param type3 The type of the third functionParameter
+   \param type4 The type of the forth functionParameter
+*/
 #define LoadParam4(type1, type2, type3, type4) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE)) \
@@ -132,4 +150,12 @@
 
 // 5. TYPES
+/**
+   \brief a Macro to easily implement many different Constructors for the LoadParam-Class with 5 arguments
+   \param type1 The type of the first functionParameter
+   \param type2 The type of the second functionParameter
+   \param type3 The type of the third functionParameter
+   \param type4 The type of the forth functionParameter
+   \param type5 The type of the fifth functionParameter
+*/
 #define LoadParam5(type1, type2, type3, type4, type5) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE, type5##_TYPE)) \
@@ -161,14 +187,15 @@
   void setDescription(const char* descriptionText);
   /** \returns the descriptionString */
-  const char* getDescription(void) { return this->description;};
+  const char* getDescription(void) { return this->description; };
 
   void print(void) const;
  private:
-  char* paramName;              //!< The name of the parameter
-  int paramCount;               //!< The count of parameters
-  char** types;                 //!< What kind of parameters does this function take ??
-  char* description;            //!< A longer description about this function
-};
-
+  char*         paramName;             //!< The name of the parameter
+  int           paramCount;            //!< The count of parameters
+  char**        types;                 //!< What kind of parameters does this function take ??
+  char*         description;           //!< A longer description about this function
+};
+
+//! A class for descriptions of a loadable module
 class LoadClassDescription
 {
@@ -184,12 +211,12 @@
   static void printAll(const char* fileName = NULL);
 
-  static bool parametersDescription;             //!< if parameter-description should be enabled.
-  static tList<LoadClassDescription>* classList; //!< a list, that holds all the loadable classes. (after one instance has been loaded)
  private:
-  char* className;                               //!< name of the class
-  tList<LoadParamDescription>* paramList;        //!< List of parameters this class knows.
-};
-
-// abstract Base class
+  static bool                         parametersDescription;  //!< if parameter-description should be enabled.
+  static tList<LoadClassDescription>* classList;              //!< a list, that holds all the loadable classes. (after one instance has been loaded)
+  char*                               className;              //!< name of the class
+  tList<LoadParamDescription>*        paramList;              //!< List of parameters this class knows.
+};
+
+//! abstract Base class for a Loadable parameter
 class BaseLoadParam
 {
@@ -201,7 +228,7 @@
 
  protected:
-  LoadClassDescription* classDesc;               //!< The LoadClassDescription of this LoadParameter
-  LoadParamDescription* paramDesc;               //!< The LoadParameterDescription of this LoadParameter
-  const char* loadString;                        //!< The string loaded by this LoadParam
+  LoadClassDescription*    classDesc;            //!< The LoadClassDescription of this LoadParameter
+  LoadParamDescription*    paramDesc;            //!< The LoadParameterDescription of this LoadParameter
+  const char*              loadString;           //!< The string loaded by this LoadParam
 };
 
@@ -211,17 +238,29 @@
 {
  public:
+  //! makes functions with one string loadable
   LoadParam1(l_STRING);
+  //! makes functions with two strings loadable
   LoadParam2(l_STRING, l_STRING);
+  //! makes functions with three strings loadable
   LoadParam3(l_STRING, l_STRING, l_STRING);
+  //! makes functions with four strings loadable
   LoadParam4(l_STRING, l_STRING, l_STRING, l_STRING);
 
+  //! makes functions with one int loadable
   LoadParam1(l_INT);
+  //! makes functions with two ints loadable
   LoadParam2(l_INT, l_INT);
+  //! makes functions with three ints loadable
   LoadParam3(l_INT, l_INT, l_INT);
+  //! makes functions with four ints loadable
   LoadParam4(l_INT, l_INT, l_INT, l_INT);
 
+  //! makes functions with one float loadable
   LoadParam1(l_FLOAT);
+  //! makes functions with two floats loadable
   LoadParam2(l_FLOAT, l_FLOAT);
+  //! makes functions with three floats loadable
   LoadParam3(l_FLOAT, l_FLOAT, l_FLOAT);
+  //! makes functions with four floats loadable
   LoadParam4(l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT);
 };
