Index: branches/new_class_id/src/lib/util/loading/load_param.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/load_param.cc	(revision 9764)
+++ branches/new_class_id/src/lib/util/loading/load_param.cc	(revision 9765)
@@ -17,5 +17,5 @@
 
 #include "util/loading/load_param.h"
-#include "load_param_description.h"
+#include "load_param_class_description.h"
 #include "compiler.h"
 #include "debug.h"
@@ -46,8 +46,9 @@
 void LoadParamBase::describe(const std::string& descriptionText)
 {
-  if (LoadClassDescription::parametersDescription && this->paramDesc && this->paramDesc->getDescription().empty())
+  /// TODO REIMPLEMENT
+  /*  if (LoadParamClassDescription::parametersDescription && this->paramDesc && this->paramDesc->getDescription().empty())
   {
     this->paramDesc->setDescription(descriptionText);
-  }
+  }*/
 }
 
@@ -115,118 +116,4 @@
 
 
-// const LoadParamDescription* LoadParamDescription::getClass(const char* className)
-// {
-//   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
-//   LoadClassDescription* enumClassDesc = iterator->firstElement();
-//   while (enumClassDesc)
-//   {
-//     if (!strcmp(enumClassDesc->className, classNameBegin, className))
-//     {
-//       delete iterator;
-//       return enumClassDesc;
-//     }
-//     enumClassDesc = iterator->nextElement();
-//   }
-//   delete iterator;
-//
-//   return NULL;
-// }
-
-
-
-
-/*
- * @param object The object this Parameter is loaded too.
- * @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 multi: if false LoadParam assumes only one occurence of this parameter in root, if true it assumes multiple occurences.
- * @param ...: the parameter information (1. Parameter, 2. Default Value for the Parameter, ...)
-*/
-/*LoadParam::LoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName,
-                             int paramCount, bool multi, const void* pointerToParam, ...)
-{
-  this->setClassID(CL_LOAD_PARAM, "LoadParam");
-  this->executor = NULL;
-
-  this->loadString = NULL;
-  this->pointerToParam = pointerToParam;
-
-  if (paramCount == 0 || this->pointerToParam != NULL)
-    this->loadString = "none";
-  else
-{
-      if (likely(!multi))
-        this->loadString = grabParameter(root, paramName);
-      else
-{
-          if (!strcmp(root->Value(), paramName))
-{
-              const TiXmlNode* val = root->FirstChild();
-              if( val->ToText())
-                this->loadString = val->Value();
-}
-}
-}
-
-  this->paramDesc = NULL;
-  if (LoadClassDescription::parametersDescription)
-{
-    // locating the class
-    this->classDesc = LoadClassDescription::addClass(object->getClassCName());
-
-    if ((this->paramDesc = this->classDesc->addParam(paramName)) != NULL)
-{
-
-      this->paramDesc->paramCount = paramCount;
-      this->paramDesc->types = new int[paramCount];
-      this->paramDesc->defaultValues = new char*[paramCount];
-
-      va_list types;
-      va_start (types, pointerToParam);
-      char defaultVal[512];
-      for(int i = 0; i < paramCount; i++)
-{
-        defaultVal[0] = '\0';
-          // parameters parsed
-        int tmpType = va_arg (types, int);
-        this->paramDesc->types[i] = tmpType;
-        switch (tmpType)
-{
-  case MT_INT:
-            sprintf(defaultVal, "%d", va_arg(types, int));
-            break;
-//          case MT_LONG:
-//            sprintf(defaultVal, "%0.3f", va_arg(types, l_LONG_TYPE));
-//            break;
-  case MT_FLOAT:
-            sprintf(defaultVal, "%0.3f", va_arg(types, double));
-            break;
-  case MT_STRING:
-            sprintf(defaultVal, "%s", va_arg(types, l_STRING_TYPE));
-            break;
-  case MT_EXT1:
-            sprintf(defaultVal, "");
-            break;
-}
-        this->paramDesc->defaultValues[i] = new char[strlen(defaultVal)+1];
-        strcpy(this->paramDesc->defaultValues[i], defaultVal);
-}
-      va_end(types);
-
-      int argCount = 0;
-}
-}
-}*/
-
-
-
-
-
-
-
-
-
-
 //////////////////////
 // HELPER FUNCTIONS //
Index: branches/new_class_id/src/lib/util/loading/load_param.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/load_param.h	(revision 9764)
+++ branches/new_class_id/src/lib/util/loading/load_param.h	(revision 9765)
@@ -99,6 +99,4 @@
   bool                     inLoadCycle;          //!< If the Parameter is in a LoadCycle.
 
-  LoadClassDescription*    classDesc;            //!< The LoadClassDescription of this CLoadParameter
-  LoadParamDescription*    paramDesc;            //!< The LoadParameterDescription of this LoadParameter
   const TiXmlElement*      loadElem;             //!< The Element to load.
 };
Index: branches/new_class_id/src/lib/util/loading/load_param_class_description.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/load_param_class_description.cc	(revision 9764)
+++ branches/new_class_id/src/lib/util/loading/load_param_class_description.cc	(revision 9765)
@@ -14,5 +14,5 @@
 */
 
-#include "load_param_description.h"
+#include "load_param_class_description.h"
 
 #include "multi_type.h"
@@ -125,22 +125,22 @@
  *  A list, that holds all the classes that are loadable (classes not objects!!)
  */
-std::list<LoadClassDescription*>* LoadClassDescription::classList = NULL;
+std::list<LoadParamClassDescription*>* LoadParamClassDescription::classList = NULL;
 
 /**
  *  if the description of Parameters should be executed
  */
-bool LoadClassDescription::parametersDescription = false;
+bool LoadParamClassDescription::parametersDescription = false;
 
 /**
  * @param className the name of the class to be loadable
  */
-LoadClassDescription::LoadClassDescription(const std::string& className)
+LoadParamClassDescription::LoadParamClassDescription(const std::string& className)
 {
   this->className = className;
 
-  if (LoadClassDescription::classList == NULL)
-    LoadClassDescription::classList = new std::list<LoadClassDescription*>;
-
-  LoadClassDescription::classList->push_back(this);
+  if (LoadParamClassDescription::classList == NULL)
+    LoadParamClassDescription::classList = new std::list<LoadParamClassDescription*>;
+
+  LoadParamClassDescription::classList->push_back(this);
 }
 
@@ -148,5 +148,5 @@
  *  deletes a classDescription (deletes all the parameterDescriptions as well
  */
-LoadClassDescription::~LoadClassDescription()
+LoadParamClassDescription::~LoadParamClassDescription()
 {
   std::list<LoadParamDescription*>::iterator it = this->paramList.begin();
@@ -158,16 +158,16 @@
 }
 
-void LoadClassDescription::deleteAllDescriptions()
-{
-  if (LoadClassDescription::classList != NULL)
-  {
-    while (!LoadClassDescription::classList->empty())
-    {
-      delete LoadClassDescription::classList->front();
-      LoadClassDescription::classList->pop_front();
-    }
-    delete LoadClassDescription::classList;
-  }
-  LoadClassDescription::classList = NULL;
+void LoadParamClassDescription::deleteAllDescriptions()
+{
+  if (LoadParamClassDescription::classList != NULL)
+  {
+    while (!LoadParamClassDescription::classList->empty())
+    {
+      delete LoadParamClassDescription::classList->front();
+      LoadParamClassDescription::classList->pop_front();
+    }
+    delete LoadParamClassDescription::classList;
+  }
+  LoadParamClassDescription::classList = NULL;
 }
 
@@ -180,10 +180,10 @@
    Otherwise it returns a new classDescription
  */
-LoadClassDescription* LoadClassDescription::addClass(const std::string& className)
-{
-  if (LoadClassDescription::classList != NULL)
-  {
-    std::list<LoadClassDescription*>::iterator it = LoadClassDescription::classList->begin();
-    while (it != LoadClassDescription::classList->end())
+LoadParamClassDescription* LoadParamClassDescription::addClass(const std::string& className)
+{
+  if (LoadParamClassDescription::classList != NULL)
+  {
+    std::list<LoadParamClassDescription*>::iterator it = LoadParamClassDescription::classList->begin();
+    while (it != LoadParamClassDescription::classList->end())
     {
       if ((*it)->className == className)
@@ -194,5 +194,5 @@
     }
   }
-  return new LoadClassDescription(className);
+  return new LoadParamClassDescription(className);
 }
 
@@ -201,5 +201,5 @@
  * @param paramName the name of the parameter to add.
  */
-LoadParamDescription* LoadClassDescription::addParam(const std::string& paramName)
+LoadParamDescription* LoadParamClassDescription::addParam(const std::string& paramName)
 {
   std::list<LoadParamDescription*>::iterator it = this->paramList.begin();
@@ -224,12 +224,12 @@
  * @todo implement it
  */
-void LoadClassDescription::printAll(const std::string& fileName)
+void LoadParamClassDescription::printAll(const std::string& fileName)
 {
   PRINT(3)("===============================================================\n");
   PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n");
-  if (LoadClassDescription::classList != NULL)
-  {
-    std::list<LoadClassDescription*>::iterator classDesc = LoadClassDescription::classList->begin();
-    while (classDesc != LoadClassDescription::classList->end())
+  if (LoadParamClassDescription::classList != NULL)
+  {
+    std::list<LoadParamClassDescription*>::iterator classDesc = LoadParamClassDescription::classList->begin();
+    while (classDesc != LoadParamClassDescription::classList->end())
     {
       PRINT(3)("<%s>\n", (*classDesc)->className.c_str());
@@ -255,5 +255,5 @@
  * !! The strings MUST NOT be deleted !!
  */
-std::list<std::string> LoadClassDescription::searchClassWithShort(const std::string& classNameBegin)
+std::list<std::string> LoadParamClassDescription::searchClassWithShort(const std::string& classNameBegin)
 {
   /// FIXME
@@ -262,6 +262,6 @@
   std::list<const std::string&> retVal;
 
-  tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
-  LoadClassDescription* enumClassDesc = iterator->firstElement();
+  tIterator<LoadParamClassDescription>* iterator = LoadParamClassDescription::classList->getIterator();
+  LoadParamClassDescription* enumClassDesc = iterator->firstElement();
   while (enumClassDesc)
   {
Index: branches/new_class_id/src/lib/util/loading/load_param_class_description.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/load_param_class_description.h	(revision 9764)
+++ branches/new_class_id/src/lib/util/loading/load_param_class_description.h	(revision 9765)
@@ -15,55 +15,29 @@
 
 /*!
- * @file load_param.h
+ * @file load_param_class_description.h
  * A Class and macro-functions, that makes our lives easy to load-in parameters
  */
 
-#ifndef _LOAD_PARAM_DESCRIPTION_H
-#define _LOAD_PARAM_DESCRIPTION_H
+#ifndef _LOAD_PARAM_CLASS_DESCRIPTION_H
+#define _LOAD_PARAM_CLASS_DESCRIPTION_H
 
-#include <list>
-#include <string>
+#include "load_param_description.h"
+#include <set>
 
 // Forward Declaration //
 class MultiType;
 
-/************************
-*** DESCRIPTION STUFF ***
-************************/
-//! A class that handles the description of loadable parameters
-class LoadParamDescription
+//! A class for descriptions of a loadable module
+class LoadParamClassDescription
 {
-  friend class LoadParam;
-  friend class LoadClassDescription;
 public:
-  LoadParamDescription(const std::string& paramName);
-  ~LoadParamDescription();
+  LoadParamClassDescription(const std::string& className);
+  ~LoadParamClassDescription();
 
-  void setDescription(const std::string& descriptionText);
-  /** @returns the descriptionString */
-  const std::string& getDescription() { return this->description; };
+  bool operator==(const std::string& className) const { return this->className == className; };
+  bool operator==(const LoadParamClassDescription& classDescr) const { return this->className == classDescr.className; };
+  bool operator<(const LoadParamClassDescription& classDescr) const { return this->className < classDescr.className; }
 
-  void print() const;
-
-private:
-  std::string                description;           //!< A longer description about this function.
-
-  std::vector<std::string>   parameters;
-  std::vector<std::string>   defaultValues;
-
-};
-
-
-
-
-//! A class for descriptions of a loadable module
-class LoadClassDescription
-{
-  friend class LoadParamBase;
-public:
-  LoadClassDescription(const std::string& className);
-  ~LoadClassDescription();
-
-  static LoadClassDescription* addClass(const std::string& className);
+  static LoadParamClassDescription* addClass(const std::string& className);
   LoadParamDescription* addParam(const std::string& paramName);
 
@@ -75,10 +49,13 @@
 
 private:
+  typedef std::set<LoadParamClassDescription>  ClassDescriptionSet;
+  typedef std::set<LoadParamDescription>       ParamDescriptionSet;
+
   static bool                                  parametersDescription;  //!< if parameter-description should be enabled.
-  static std::vector<LoadClassDescription*>*   classList;              //!< a list, that stores all the loadable classes. (after one instance has been loaded)
+  static ClassDescriptionSet*                  classList;              //!< a list, that stores all the loadable classes. (after one instance has been loaded)
   std::string                                  className;              //!< name of the class
 
-  std::vector<LoadParamDescription*>           paramList;              //!< List of parameters this class knows.
+  ParamDescriptionSet                          parameters;              //!< List of parameters this class knows.
 };
 
-#endif /* _LOAD_PARAM_DESCRIPTION_H */
+#endif /* _LOAD_PARAM_CLASS_DESCRIPTION_H */
Index: branches/new_class_id/src/lib/util/loading/load_param_description.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/load_param_description.cc	(revision 9764)
+++ branches/new_class_id/src/lib/util/loading/load_param_description.cc	(revision 9765)
@@ -17,5 +17,4 @@
 
 #include "multi_type.h"
-#include <stdarg.h>
 #include "debug.h"
 
@@ -24,9 +23,6 @@
  */
 LoadParamDescription::LoadParamDescription(const std::string& paramName)
-{
-  this->types = NULL;
-  this->defaultValues = NULL;
-  this->paramName = paramName;
-}
+  : name(paramName)
+{ }
 
 /**
@@ -35,14 +31,4 @@
 LoadParamDescription::~LoadParamDescription()
 {
-  if (this->defaultValues != NULL)
-  {
-    for(int i = 0; i < this->paramCount; i++)
-    {
-      delete[] this->defaultValues[i];
-    }
-  }
-
-  delete[] this->types;
-  delete[] this->defaultValues;
 }
 
@@ -60,6 +46,6 @@
 void LoadParamDescription::print() const
 {
-  PRINT(3)(" <%s>", this->paramName.c_str());
-  for (int i = 0; i < this->paramCount; i++)
+  PRINT(3)(" <%s>", this->name.c_str());
+  for (unsigned int i = 0; i < this->parameterCount; i++)
   {
     if (i > 0)
@@ -97,22 +83,22 @@
 //     }
   }
-  PRINT(3)("</%s>", this->paramName.c_str());
+  PRINT(3)("</%s>", this->name.c_str());
   if (!this->description.empty())
     PRINT(3)(" -- %s", this->description.c_str());
   // default values
-  if (this->paramCount > 0)
+  if (this->parameterCount > 0)
   {
     PRINT(3)(" (Default: ");
-    for (int i = 0; i < this->paramCount; i++)
+    for (unsigned int i = 0; i < this->parameterCount; i++)
     {
       if (i > 0)
         PRINT(3)(", ");
-      if (this->types[i] & MT_STRING)
+      if (this->types[i] == "string")
       { // leave brackets !!
-        PRINT(3)("\"%s\"", this->defaultValues[i]);
+	PRINT(3)("\"%s\"", this->defaultValues[i].c_str());
       }
       else
       {
-        PRINT(3)("%s", this->defaultValues[i]);
+	PRINT(3)("%s", this->defaultValues[i].c_str());
       }
     }
@@ -121,160 +107,2 @@
   PRINT(3)("\n");
 }
-
-/**
- *  A list, that holds all the classes that are loadable (classes not objects!!)
- */
-std::list<LoadClassDescription*>* LoadClassDescription::classList = NULL;
-
-/**
- *  if the description of Parameters should be executed
- */
-bool LoadClassDescription::parametersDescription = false;
-
-/**
- * @param className the name of the class to be loadable
- */
-LoadClassDescription::LoadClassDescription(const std::string& className)
-{
-  this->className = className;
-
-  if (LoadClassDescription::classList == NULL)
-    LoadClassDescription::classList = new std::list<LoadClassDescription*>;
-
-  LoadClassDescription::classList->push_back(this);
-}
-
-/**
- *  deletes a classDescription (deletes all the parameterDescriptions as well
- */
-LoadClassDescription::~LoadClassDescription()
-{
-  std::list<LoadParamDescription*>::iterator it = this->paramList.begin();
-  while (!this->paramList.empty())
-  {
-    delete this->paramList.front();
-    this->paramList.pop_front();
-  }
-}
-
-void LoadClassDescription::deleteAllDescriptions()
-{
-  if (LoadClassDescription::classList != NULL)
-  {
-    while (!LoadClassDescription::classList->empty())
-    {
-      delete LoadClassDescription::classList->front();
-      LoadClassDescription::classList->pop_front();
-    }
-    delete LoadClassDescription::classList;
-  }
-  LoadClassDescription::classList = NULL;
-}
-
-
-/**
- *  adds a class to the list of loadable classes
- * @param className The name of the class to add
-
-   this function searches for the className string, and if found just returns the appropriate Class.
-   Otherwise it returns a new classDescription
- */
-LoadClassDescription* LoadClassDescription::addClass(const std::string& className)
-{
-  if (LoadClassDescription::classList != NULL)
-  {
-    std::list<LoadClassDescription*>::iterator it = LoadClassDescription::classList->begin();
-    while (it != LoadClassDescription::classList->end())
-    {
-      if ((*it)->className == className)
-      {
-        return (*it);
-      }
-      it++;
-    }
-  }
-  return new LoadClassDescription(className);
-}
-
-/**
- *  does the same as addClass(const std::string& className), but with params
- * @param paramName the name of the parameter to add.
- */
-LoadParamDescription* LoadClassDescription::addParam(const std::string& paramName)
-{
-  std::list<LoadParamDescription*>::iterator it = this->paramList.begin();
-  while (it != this->paramList.end())
-  {
-    if ((*it)->paramName == paramName)
-    {
-      return NULL;
-    }
-    it++;
-  }
-
-  LoadParamDescription* newParam = new LoadParamDescription(paramName);
-
-  this->paramList.push_back(newParam);
-  return newParam;
-}
-
-/**
- *  prints out all loadable Classes, and their parameters
- * @param fileName prints the output to a File
- * @todo implement it
- */
-void LoadClassDescription::printAll(const std::string& fileName)
-{
-  PRINT(3)("===============================================================\n");
-  PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n");
-  if (LoadClassDescription::classList != NULL)
-  {
-    std::list<LoadClassDescription*>::iterator classDesc = LoadClassDescription::classList->begin();
-    while (classDesc != LoadClassDescription::classList->end())
-    {
-      PRINT(3)("<%s>\n", (*classDesc)->className.c_str());
-      std::list<LoadParamDescription*>::iterator param = (*classDesc)->paramList.begin();
-      while (param != (*classDesc)->paramList.end())
-      {
-        (*param)->print();
-        param++;
-      }
-      PRINT(3)("</%s>\n\n", (*classDesc)->className.c_str());
-      classDesc++;
-    }
-  }
-  else
-    PRINT(3)("no Classes defined so far\n");
-  PRINT(3)("===============================================================\n");
-}
-
-/**
- * searches for classes, which beginn with classNameBegin
- * @param classNameBegin the beginning string of a Class
- * @return a NEW char-array with ClassNames. The LIST should be deleted afterwards,
- * !! The strings MUST NOT be deleted !!
- */
-std::list<std::string> LoadClassDescription::searchClassWithShort(const std::string& classNameBegin)
-{
-  /// FIXME
-  // NOT USED
-/*  unsigned int searchLength = strlen(classNameBegin);
-  std::list<const std::string&> retVal;
-
-  tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
-  LoadClassDescription* enumClassDesc = iterator->firstElement();
-  while (enumClassDesc)
-  {
-    if (strlen(enumClassDesc->className)>searchLength+1 &&
-        !strncasecmp(enumClassDesc->className, classNameBegin, searchLength))
-    {
-      retVal->add(enumClassDesc->className);
-    }
-    enumClassDesc = iterator->nextElement();
-  }
-  delete iterator;
-
-  return retVal;*/
-  std::list<std::string> a;
-  return a;
-}
Index: branches/new_class_id/src/lib/util/loading/load_param_description.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/load_param_description.h	(revision 9764)
+++ branches/new_class_id/src/lib/util/loading/load_param_description.h	(revision 9765)
@@ -15,5 +15,5 @@
 
 /*!
- * @file load_param.h
+ * @file load_param_description.h
  * A Class and macro-functions, that makes our lives easy to load-in parameters
  */
@@ -22,5 +22,5 @@
 #define _LOAD_PARAM_DESCRIPTION_H
 
-#include <list>
+#include <vector>
 #include <string>
 
@@ -34,9 +34,11 @@
 class LoadParamDescription
 {
-  friend class LoadParam;
-  friend class LoadClassDescription;
 public:
   LoadParamDescription(const std::string& paramName);
   ~LoadParamDescription();
+
+  bool operator==(const std::string& paramName) const { return this->name == paramName; };
+  bool operator==(const LoadParamDescription& paramDescr) const { return this->name == paramDescr.name; };
+  bool operator<(const LoadParamDescription& paramDescr) const { return this->name < paramDescr.name; };
 
   void setDescription(const std::string& descriptionText);
@@ -47,38 +49,12 @@
 
 private:
+  const std::string          name;                  //!< The Name of the Parameter.
+  unsigned int               parameterCount;        //!< The Count of parameters.
   std::string                description;           //!< A longer description about this function.
 
-  std::vector<std::string>   parameters;
+  std::vector<std::string>   types;
   std::vector<std::string>   defaultValues;
 
 };
 
-
-
-
-//! A class for descriptions of a loadable module
-class LoadClassDescription
-{
-  friend class LoadParamBase;
-public:
-  LoadClassDescription(const std::string& className);
-  ~LoadClassDescription();
-
-  static LoadClassDescription* addClass(const std::string& className);
-  LoadParamDescription* addParam(const std::string& paramName);
-
-  static void deleteAllDescriptions();
-
-  static void printAll(const std::string& fileName = "");
-  static std::list<std::string> searchClassWithShort(const std::string& classNameBegin);
-  //  static const LoadParamDescription* getClass(const std::string& className);
-
-private:
-  static bool                                  parametersDescription;  //!< if parameter-description should be enabled.
-  static std::vector<LoadClassDescription*>*   classList;              //!< a list, that stores all the loadable classes. (after one instance has been loaded)
-  std::string                                  className;              //!< name of the class
-
-  std::vector<LoadParamDescription*>           paramList;              //!< List of parameters this class knows.
-};
-
 #endif /* _LOAD_PARAM_DESCRIPTION_H */
