Index: /trunk/src/lib/util/multi_type.cc
===================================================================
--- /trunk/src/lib/util/multi_type.cc	(revision 5536)
+++ /trunk/src/lib/util/multi_type.cc	(revision 5537)
@@ -21,8 +21,17 @@
 using namespace std;
 
+MultiType::MultiType(bool value)
+{
+  this->init();
+  this->type = MT_BOOL;
+  this->value.Bool = value;
+
+}
+
 MultiType::MultiType(int value)
 {
-  this->type = M_Int;
-  this->value.typeInt = value;
+  this->init();
+  this->type = MT_INT;
+  this->value.Int = value;
 }
 
@@ -30,6 +39,7 @@
 MultiType::MultiType(float value)
 {
-  this->type = M_Float;
-  this->value.typeFloat = value;
+  this->init();
+  this->type = MT_FLOAT;
+  this->value.Float = value;
 }
 
@@ -37,6 +47,7 @@
 MultiType::MultiType(char value)
 {
-  this->type = M_Char;
-  this->value.typeChar = value;
+  this->init();
+  this->type = MT_CHAR;
+  this->value.Char = value;
 }
 
@@ -44,7 +55,10 @@
 MultiType::MultiType(const char* value)
 {
-  this->type = M_String;
-  this->value.typeString = new char[strlen(value)+1];
-  strcpy(this->value.typeString, value);
+  this->init();
+  this->type = MT_STRING;
+  this->value.String = new char[strlen(value)+1];
+  strcpy(this->value.String, value);
+
+  this->storedString = this->value.String;
 }
 
@@ -54,4 +68,71 @@
 MultiType::~MultiType ()
 {
-  // delete what has to be deleted here
+  if (this->storedString != NULL)
+    delete this->storedString;
 }
+
+void MultiType::init()
+{
+  this->storedString = NULL;
+}
+
+
+bool MultiType::getBool()
+{
+  // default case:
+  if (this->type & MT_BOOL)
+    return this->value.Bool;
+  // Special Cases:
+  else if (this->type & MT_INT) return (this->value.Int == 0)? false : true;
+  else if (this->type & MT_FLOAT) return (this->value.Float == 0.0f)? false : true;
+  else if (this->type & MT_CHAR) return (this->value.Char == '\0')? false : true;
+  else if (this->type & MT_STRING) return (!strncmp(this->value.String, "true", 4) || !strncmp(this->value.String, "TRUE", 4) || !strncmp(this->value.String, "1", 1))? true : false;
+}
+
+
+int MultiType::getInt()
+{
+  // default case:
+  if (this->type & MT_INT)
+    return this->value.Int;
+  if (this->type & MT_BOOL) return (this->value.Bool)? 1 : 0;
+  else if (this->type & MT_FLOAT) return (int) this->value.Float;
+  else if (this->type & MT_CHAR) return (int) this->value.Char;
+  else if (this->type & MT_STRING) return 1; //! @TODO
+}
+
+
+float MultiType::getFloat()
+{
+ // default case:
+  if (this->type & MT_FLOAT) return this->value.Float;
+    return this->value.Int;
+  if (this->type & MT_BOOL) return (this->value.Bool)? 1.0f : 0.0f;
+  else if (this->type & MT_INT) return (float) this->value.Int;
+  else if (this->type & MT_CHAR) return (float) this->value.Char;
+  else if (this->type & MT_STRING) return 1; //! @TODO
+}
+
+
+char MultiType::getChar()
+{
+ // default case:
+  if (this->type & MT_INT)
+    return this->value.Int;
+  if (this->type & MT_BOOL) return (this->value.Bool)? 'y' : 'n';
+  else if (this->type & MT_INT) return (int) this->value.Int;
+  else if (this->type & MT_FLOAT) return (char) this->value.Float;
+  else if (this->type & MT_STRING) return 1; //! @TODO
+}
+
+const char* MultiType::getString()
+{
+ // default case:
+  if (this->type & MT_STRING)
+    return this->value.String;
+/*  else if (this->type & MT_BOOL) return (this->value.Bool)? 1 : 0;
+  else if (this->type & MT_INT) return 1; //! @TODO
+  else if (this->type & MT_FLOAT) return (int) this->value.Float;
+  else if (this->type & MT_CHAR) return (int) this->value.Char;*/
+}
+
Index: /trunk/src/lib/util/multi_type.h
===================================================================
--- /trunk/src/lib/util/multi_type.h	(revision 5536)
+++ /trunk/src/lib/util/multi_type.h	(revision 5537)
@@ -9,41 +9,56 @@
 // FORWARD DECLARATION
 
-
+//! An enumerator defining Types, that can be stored inside a MultiType.
 typedef enum
 {
-  M_Int,
-  M_Float,
-  M_Char,
-  M_String,
+  MT_NULL            = 0,                  //!< No Value at all.
+  MT_BOOL            = 1,                  //!< A bool Value.
+  MT_INT             = 2,                  //!< An int Value.
+  MT_FLOAT           = 4,                  //!< A float Value.
+  MT_CHAR            = 8,                  //!< A single char.
+  MT_STRING          = 16,                 //!< An entire String.
 
-} M_Type;
+} MT_Type;
 
 
 
-//! A class for ...
+//! A class that encapsulates multiple differen types.
+/**
+ * Only one Value can be Stored inside this Class, but it can have any type: @see MT_Type.
+ */
 class MultiType {
 
  public:
+   MultiType(bool value);
    MultiType(int value);
    MultiType(float value);
    MultiType(char value);
    MultiType(const char* value);
+   virtual ~MultiType();
+   void init();
 
-  virtual ~MultiType();
+
+  /** @returns the Type of the Value stored in this MultiType */
+  inline MT_Type getType() const { return this->type; };
+
+  bool getBool();
+  int getInt();
+  float getFloat();
+  char getChar();
+  const char* getString();
 
 
  private:
-
-   M_Type             type;
+   MT_Type             type;
    union Type
    {
-     int              typeInt;
-     float            typeFloat;
-     char             typeChar;
-     char*            typeString;
+     bool             Bool;
+     int              Int;
+     float            Float;
+     char             Char;
+     char*            String;
    } value;
 
-
-
+   char* storedString;
 };
 
