Index: code/trunk/src/util/CMakeLists.txt
===================================================================
--- code/trunk/src/util/CMakeLists.txt	(revision 790)
+++ code/trunk/src/util/CMakeLists.txt	(revision 871)
@@ -4,17 +4,21 @@
 
 SET (UTIL_SRC_FILES
+  Math.cc
+  String.cc
+  SubString.cc
+  MultiTypePrimitive.cc
+  MultiTypeString.cc
+  MultiTypeMath.cc
   ${TINYXML_SRC_FILES}
-  substring.cc
 )
 
-IF(WIN32)
-  ADD_LIBRARY( util ${UTIL_SRC_FILES} )
-ELSE(WIN32)
-  ADD_LIBRARY( util SHARED ${UTIL_SRC_FILES} )
-ENDIF(WIN32)
+ADD_LIBRARY( util SHARED ${UTIL_SRC_FILES} )
 SET_TARGET_PROPERTIES( util PROPERTIES LINK_FLAGS "--no-undefined" )
-
 
 IF(TESTING_ENABLED)
   ADD_SUBDIRECTORY(testing)
 ENDIF(TESTING_ENABLED)
+
+TARGET_LINK_LIBRARIES( util
+  ${OGRE_LIBRARIES}
+)
Index: code/trunk/src/util/Convert.h
===================================================================
--- code/trunk/src/util/Convert.h	(revision 790)
+++ code/trunk/src/util/Convert.h	(revision 871)
@@ -36,4 +36,9 @@
 #include <sstream>
 
+#include "UtilPrereqs.h"
+#include "Math.h"
+#include "SubString.h"
+#include "MultiTypeMath.h"
+
 
 // DEFAULT CLASS
@@ -41,9 +46,9 @@
 class Converter
 {
- public:
-  bool operator()(ToType* output, const FromType& input) const
-  {
-    return false;
-  }
+  public:
+    bool operator()(ToType* output, const FromType& input) const
+    {
+      return false;
+    }
 };
 
@@ -52,16 +57,16 @@
 class Converter<FromType, std::string>
 {
- public:
-  bool operator()(std::string* output, const FromType& input) const
-  {
-    std::ostringstream oss;
-    if (oss << input)
-    {
-      (*output) = oss.str();
-      return true;
-    }
-    else
-      return false;
-  }
+  public:
+    bool operator()(std::string* output, const FromType& input) const
+    {
+      std::ostringstream oss;
+      if (oss << input)
+      {
+        (*output) = oss.str();
+        return true;
+      }
+      else
+        return false;
+    }
 };
 
@@ -70,13 +75,13 @@
 class Converter<std::string, ToType>
 {
- public:
-  bool operator()(ToType* output, const std::string& input) const
-  {
-    std::istringstream iss(input);
-    if (iss >> (*output))
-      return true;
-    else
-      return false;
-  }
+  public:
+    bool operator()(ToType* output, const std::string& input) const
+    {
+      std::istringstream iss(input);
+      if (iss >> (*output))
+        return true;
+      else
+        return false;
+    }
 };
 
@@ -101,3 +106,431 @@
 }
 
+// THE SAME LIKE BEFORE, BUT NEEDS NO POINTER TO THE OUTPUT
+template<typename FromType, typename ToType>
+static ToType ConvertValueAndReturn(const FromType& input)
+{
+  ToType output;
+  ConvertValue(&output, input);
+  return output;
+}
+
+// THE SAME, BUT WITH DEFAULT VALUE
+template<typename FromType, typename ToType>
+static ToType ConvertValueAndReturn(const FromType& input, const FromType& fallback)
+{
+  ToType output;
+  ConvertValue(&output, input, fallback);
+  return output;
+}
+
+//////////////////////////
+// MORE SPECIALISATIONS //
+//////////////////////////
+
+// STRING TO STRING
+template<>
+class Converter<std::string, std::string>
+{
+  public:
+    bool operator()(std::string* output, const std::string& input) const
+    {
+        (*output) = std::string(input);
+        return true;
+    }
+};
+
+////////////////
+// MULTITYPES //
+////////////////
+
+// PARTIAL SPECIALIZATION TO CONVERT FROM MULTITYPEPRIMITIVE
+template<typename ToType>
+class Converter<MultiTypePrimitive, ToType>
+{
+  public:
+    bool operator()(ToType* output, const MultiTypePrimitive& input) const
+    {
+      if (input.getType() == MT_int)
+        return ConvertValue(output, input.getInt());
+      else if (input.getType() == MT_uint)
+        return ConvertValue(output, input.getUnsignedInt());
+      else if (input.getType() == MT_char)
+        return ConvertValue(output, input.getChar());
+      else if (input.getType() == MT_uchar)
+        return ConvertValue(output, input.getUnsignedChar());
+      else if (input.getType() == MT_short)
+        return ConvertValue(output, input.getShort());
+      else if (input.getType() == MT_ushort)
+        return ConvertValue(output, input.getUnsignedShort());
+      else if (input.getType() == MT_long)
+        return ConvertValue(output, input.getLong());
+      else if (input.getType() == MT_ulong)
+        return ConvertValue(output, input.getUnsignedLong());
+      else if (input.getType() == MT_float)
+        return ConvertValue(output, input.getFloat());
+      else if (input.getType() == MT_double)
+        return ConvertValue(output, input.getDouble());
+      else if (input.getType() == MT_longdouble)
+        return ConvertValue(output, input.getLongDouble());
+      else if (input.getType() == MT_bool)
+        return ConvertValue(output, input.getBool());
+      else
+        return false;
+    }
+};
+template<>
+class Converter<MultiTypePrimitive, std::string>
+{
+  public:
+    bool operator()(std::string* output, const MultiTypePrimitive& input) const
+    {
+      if (input.getType() == MT_int)
+        return ConvertValue(output, input.getInt());
+      else if (input.getType() == MT_uint)
+        return ConvertValue(output, input.getUnsignedInt());
+      else if (input.getType() == MT_char)
+        return ConvertValue(output, input.getChar());
+      else if (input.getType() == MT_uchar)
+        return ConvertValue(output, input.getUnsignedChar());
+      else if (input.getType() == MT_short)
+        return ConvertValue(output, input.getShort());
+      else if (input.getType() == MT_ushort)
+        return ConvertValue(output, input.getUnsignedShort());
+      else if (input.getType() == MT_long)
+        return ConvertValue(output, input.getLong());
+      else if (input.getType() == MT_ulong)
+        return ConvertValue(output, input.getUnsignedLong());
+      else if (input.getType() == MT_float)
+        return ConvertValue(output, input.getFloat());
+      else if (input.getType() == MT_double)
+        return ConvertValue(output, input.getDouble());
+      else if (input.getType() == MT_longdouble)
+        return ConvertValue(output, input.getLongDouble());
+      else if (input.getType() == MT_bool)
+        return ConvertValue(output, input.getBool());
+      else
+        return false;
+    }
+};
+
+// PARTIAL SPECIALIZATION TO CONVERT FROM MULTITYPESTRING
+template<typename ToType>
+class Converter<MultiTypeString, ToType>
+{
+  public:
+    bool operator()(ToType* output, const MultiTypeString& input) const
+    {
+      if (input.getType() == MT_constchar)
+        return ConvertValue(output, input.getConstChar());
+      else if (input.getType() == MT_string)
+        return ConvertValue(output, input.getString());
+      else
+        return ConvertValue(output, (MultiTypePrimitive)input);
+    }
+};
+template<>
+class Converter<MultiTypeString, std::string>
+{
+  public:
+    bool operator()(std::string* output, const MultiTypeString& input) const
+    {
+      if (input.getType() == MT_constchar)
+        return ConvertValue(output, input.getConstChar());
+      else if (input.getType() == MT_string)
+        return ConvertValue(output, input.getString());
+      else
+        return ConvertValue(output, (MultiTypePrimitive)input);
+    }
+};
+
+// PARTIAL SPECIALIZATION TO CONVERT FROM MULTITYPEMATH
+template<typename ToType>
+class Converter<MultiTypeMath, ToType>
+{
+  public:
+    bool operator()(ToType* output, const MultiTypeMath& input) const
+    {
+      if (input.getType() == MT_vector2)
+        return ConvertValue(output, input.getVector2());
+      else if (input.getType() == MT_vector3)
+        return ConvertValue(output, input.getVector3());
+      else if (input.getType() == MT_quaternion)
+        return ConvertValue(output, input.getQuaternion());
+      else if (input.getType() == MT_colourvalue)
+        return ConvertValue(output, input.getColourValue());
+      else if (input.getType() == MT_radian)
+        return ConvertValue(output, input.getRadian());
+      else if (input.getType() == MT_degree)
+        return ConvertValue(output, input.getDegree());
+      else
+        return ConvertValue(output, (MultiTypeString)input);
+    }
+};
+template<>
+class Converter<MultiTypeMath, std::string>
+{
+  public:
+    bool operator()(std::string* output, const MultiTypeMath& input) const
+    {
+      if (input.getType() == MT_vector2)
+        return ConvertValue(output, input.getVector2());
+      else if (input.getType() == MT_vector3)
+        return ConvertValue(output, input.getVector3());
+      else if (input.getType() == MT_quaternion)
+        return ConvertValue(output, input.getQuaternion());
+      else if (input.getType() == MT_colourvalue)
+        return ConvertValue(output, input.getColourValue());
+      else if (input.getType() == MT_radian)
+        return ConvertValue(output, input.getRadian());
+      else if (input.getType() == MT_degree)
+        return ConvertValue(output, input.getDegree());
+      else
+        return ConvertValue(output, (MultiTypeString)input);
+    }
+};
+
+
+////////////////////
+// MATH TO STRING //
+////////////////////
+
+// Vector2 to std::string
+template <>
+class Converter<orxonox::Vector2, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Vector2& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.x << "," << input.y)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// Vector3 to std::string
+template <>
+class Converter<orxonox::Vector3, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Vector3& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.x << "," << input.y << "," << input.z)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// Vector4 to std::string
+template <>
+class Converter<orxonox::Vector4, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Vector4& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.x << "," << input.y << "," << input.z << "," << input.w)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// Quaternion to std::string
+template <>
+class Converter<orxonox::Quaternion, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Quaternion& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.w << "," << input.x << "," << input.y << "," << input.z)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// ColourValue to std::string
+template <>
+class Converter<orxonox::ColourValue, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::ColourValue& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.r << "," << input.g << "," << input.b << "," << input.a)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+
+////////////////////
+// STRING TO MATH //
+////////////////////
+
+// std::string to Vector2
+template <>
+class Converter<std::string, orxonox::Vector2>
+{
+  public:
+    bool operator()(orxonox::Vector2* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 2)
+      {
+        if (!ConvertValue(&(output->x), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[1]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to Vector3
+template <>
+class Converter<std::string, orxonox::Vector3>
+{
+  public:
+    bool operator()(orxonox::Vector3* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 3)
+      {
+        if (!ConvertValue(&(output->x), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->z), tokens[2]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to Vector4
+template <>
+class Converter<std::string, orxonox::Vector4>
+{
+  public:
+    bool operator()(orxonox::Vector4* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 4)
+      {
+        if (!ConvertValue(&(output->x), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->z), tokens[2]))
+          return false;
+        if (!ConvertValue(&(output->w), tokens[3]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to Quaternion
+template <>
+class Converter<std::string, orxonox::Quaternion>
+{
+  public:
+    bool operator()(orxonox::Quaternion* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 4)
+      {
+        if (!ConvertValue(&(output->w), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->x), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[2]))
+          return false;
+        if (!ConvertValue(&(output->z), tokens[3]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to ColourValue
+template <>
+class Converter<std::string, orxonox::ColourValue>
+{
+  public:
+    bool operator()(orxonox::ColourValue* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 4)
+      {
+        if (!ConvertValue(&(output->r), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->g), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->b), tokens[2]))
+          return false;
+        if (!ConvertValue(&(output->a), tokens[3]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
 #endif /* _Convert_H__ */
Index: code/trunk/src/util/Math.cc
===================================================================
--- code/trunk/src/util/Math.cc	(revision 871)
+++ code/trunk/src/util/Math.cc	(revision 871)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Math.h"
+
+/**
+    @brief Function for writing to a stream.
+*/
+std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian)
+{
+    out << radian.valueRadians();
+    return out;
+}
+
+/**
+    @brief Function for reading from a stream.
+*/
+std::istream& operator>>(std::istream& in, orxonox::Radian& radian)
+{
+    float temp;
+    in >> temp;
+    radian = temp;
+    return in;
+}
+
+/**
+    @brief Function for writing to a stream.
+*/
+std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree)
+{
+    out << degree.valueDegrees();
+    return out;
+}
+
+/**
+    @brief Function for reading from a stream.
+*/
+std::istream& operator>>(std::istream& in, orxonox::Degree& degree)
+{
+    float temp;
+    in >> temp;
+    degree = temp;
+    return in;
+}
Index: code/trunk/src/util/Math.h
===================================================================
--- code/trunk/src/util/Math.h	(revision 790)
+++ code/trunk/src/util/Math.h	(revision 871)
@@ -1,2 +1,36 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Math_H__
+#define _Math_H__
+
+#include <ostream>
+
+#include "UtilPrereqs.h"
+
 #include <OgreMath.h>
 #include <OgreVector2.h>
@@ -18,2 +52,97 @@
   typedef Ogre::ColourValue ColourValue;
 }
+
+_UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian);
+_UtilExport std::istream& operator>>(std::istream& in, orxonox::Radian& radian);
+_UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree);
+_UtilExport std::istream& operator>>(std::istream& in, orxonox::Degree& degree);
+
+template <typename T>
+inline T sgn(T x)
+{
+    return (x >= 0) ? 1 : -1;
+}
+
+template <typename T>
+inline T min(T a, T b)
+{
+    return (a <= b) ? a : b;
+}
+
+template <typename T>
+inline T max(T a, T b)
+{
+    return (a >= b) ? a : b;
+}
+
+template <typename T>
+inline T clamp(T x, T min, T max)
+{
+    if (x < min)
+        return min;
+
+    if (x > max)
+        return max;
+
+    return x;
+}
+
+template <typename T>
+inline T square(T x)
+{
+    return x*x;
+}
+
+template <typename T>
+inline T cube(T x)
+{
+    return x*x*x;
+}
+
+template <typename T>
+inline int floor(T x)
+{
+    return (int)(x);
+}
+
+template <typename T>
+inline int ceil(T x)
+{
+    int temp = floor(x);
+    return (temp != x) ? (temp + 1) : temp;
+}
+
+template <typename T>
+inline int round(T x)
+{
+    return (int)(x + 0.5);
+}
+
+template <typename T>
+T interpolate(float time, const T& start, const T& end)
+{
+    return time * (end - start) + start;
+}
+
+template <typename T>
+T interpolateSmooth(float time, const T& start, const T& end)
+{
+    return (-2 * (end - start) * cube(time)) + (3 * (end - start) * square(time)) + start;
+}
+
+inline _UtilExport float rnd()
+{
+    return ((float)rand() / RAND_MAX);
+}
+
+inline _UtilExport float rnd(float max)
+{
+    return rnd() * max;
+}
+
+inline _UtilExport float rnd(float min, float max)
+{
+    return rnd(max - min) + min;
+}
+
+#endif /* _Math_H__ */
Index: code/trunk/src/util/MultiType.h
===================================================================
--- code/trunk/src/util/MultiType.h	(revision 871)
+++ code/trunk/src/util/MultiType.h	(revision 871)
@@ -0,0 +1,75 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiType_H__
+#define _MultiType_H__
+
+#include "UtilPrereqs.h"
+
+enum _UtilExport MultiType
+{
+    MT_null,
+    MT_int,
+    MT_uint,
+    MT_char,
+    MT_uchar,
+    MT_short,
+    MT_ushort,
+    MT_long,
+    MT_ulong,
+    MT_float,
+    MT_double,
+    MT_longdouble,
+    MT_bool,
+    MT_constchar,
+    MT_string,
+    MT_vector2,
+    MT_vector3,
+    MT_colourvalue,
+    MT_quaternion,
+    MT_degree,
+    MT_radian
+};
+
+union _UtilExport MultiTypeValue
+{
+    int             int_;
+    unsigned int    uint_;
+    char            char_;
+    unsigned char   uchar_;
+    short           short_;
+    unsigned short  ushort_;
+    long            long_;
+    unsigned long   ulong_;
+    float           float_;
+    double          double_;
+    long double     longdouble_;
+    bool            bool_;
+};
+
+#endif /* _MultiType_H__ */
Index: code/trunk/src/util/MultiTypeMath.cc
===================================================================
--- code/trunk/src/util/MultiTypeMath.cc	(revision 871)
+++ code/trunk/src/util/MultiTypeMath.cc	(revision 871)
@@ -0,0 +1,186 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#include "MultiTypeMath.h"
+#include "Convert.h"
+
+MultiTypeMath::MultiTypeMath(MultiType type) : MultiTypeString(type)
+{
+    if (type == MT_vector2)
+        this->vector2_ = orxonox::Vector2(0, 0);
+    else if (type == MT_vector3)
+        this->vector3_ = orxonox::Vector3(0, 0, 0);
+    else if (type == MT_colourvalue)
+        this->colourvalue_ = orxonox::ColourValue(0, 0, 0, 0);
+    else if (type == MT_quaternion)
+        this->quaternion_ = orxonox::Quaternion(1, 0, 0, 0);
+    else if (type == MT_radian)
+        this->radian_ = orxonox::Radian(0);
+    else if (type == MT_degree)
+        this->degree_ = orxonox::Degree(0);
+}
+
+bool MultiTypeMath::operator==(const MultiTypeMath& mtm) const
+{
+    if (!MultiTypeString::operator==(mtm) && this->type_ == mtm.type_)
+    {
+        if (this->type_ == MT_vector2)
+            return (this->vector2_ == mtm.vector2_);
+        else if (this->type_ == MT_vector3)
+            return (this->vector3_ == mtm.vector3_);
+        else if (this->type_ == MT_colourvalue)
+            return (this->colourvalue_ == mtm.colourvalue_);
+        else if (this->type_ == MT_quaternion)
+            return (this->quaternion_ == mtm.quaternion_);
+        else if (this->type_ == MT_radian)
+            return (this->radian_ == mtm.radian_);
+        else if (this->type_ == MT_degree)
+            return (this->degree_ == mtm.degree_);
+    }
+
+    return false;
+}
+
+bool MultiTypeMath::operator!=(const MultiTypeMath& mtm) const
+{
+    if (MultiTypeString::operator==(mtm) && this->type_ == mtm.type_)
+    {
+        if (this->type_ == MT_vector2)
+            return (this->vector2_ != mtm.vector2_);
+        else if (this->type_ == MT_vector3)
+            return (this->vector3_ != mtm.vector3_);
+        else if (this->type_ == MT_colourvalue)
+            return (this->colourvalue_ != mtm.colourvalue_);
+        else if (this->type_ == MT_quaternion)
+            return (this->quaternion_ != mtm.quaternion_);
+        else if (this->type_ == MT_radian)
+            return (this->radian_ != mtm.radian_);
+        else if (this->type_ == MT_degree)
+            return (this->degree_ != mtm.degree_);
+    }
+
+    return true;
+}
+
+MultiTypeMath::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeMath, int>(*this); }
+MultiTypeMath::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeMath, unsigned int>(*this); }
+MultiTypeMath::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeMath, char>(*this); }
+MultiTypeMath::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeMath, unsigned char>(*this); }
+MultiTypeMath::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeMath, short>(*this); }
+MultiTypeMath::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeMath, unsigned short>(*this); }
+MultiTypeMath::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeMath, long>(*this); }
+MultiTypeMath::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeMath, unsigned long>(*this); }
+MultiTypeMath::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeMath, float>(*this); }
+MultiTypeMath::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeMath, double>(*this); }
+MultiTypeMath::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeMath, long double>(*this); }
+MultiTypeMath::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeMath, bool>(*this); }
+MultiTypeMath::operator std::string() const
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this); }
+MultiTypeMath::operator const char*() const
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this)).c_str(); }
+MultiTypeMath::operator orxonox::Vector2() const
+{ return (this->type_ == MT_vector2) ? this->vector2_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector2>(*this); }
+MultiTypeMath::operator orxonox::Vector3() const
+{ return (this->type_ == MT_vector3) ? this->vector3_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector3>(*this); }
+MultiTypeMath::operator orxonox::Quaternion() const
+{ return (this->type_ == MT_quaternion) ? this->quaternion_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Quaternion>(*this); }
+MultiTypeMath::operator orxonox::ColourValue() const
+{ return (this->type_ == MT_colourvalue) ? this->colourvalue_ : ConvertValueAndReturn<MultiTypeMath, orxonox::ColourValue>(*this); }
+MultiTypeMath::operator orxonox::Radian() const
+{ return (this->type_ == MT_radian) ? this->radian_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Radian>(*this); }
+MultiTypeMath::operator orxonox::Degree() const
+{ return (this->type_ == MT_degree) ? this->degree_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Degree>(*this); }
+
+void MultiTypeMath::setValue(const MultiTypeMath& mtm)
+{
+    MultiTypeString::setValue(mtm);
+    this->vector2_ = mtm.vector2_;
+    this->vector3_ = mtm.vector3_;
+    this->quaternion_ = mtm.quaternion_;
+    this->colourvalue_ = mtm.colourvalue_;
+    this->radian_ = mtm.radian_;
+    this->degree_ = mtm.degree_;
+}
+
+std::string MultiTypeMath::toString() const
+{
+    std::string output;
+
+    if (this->type_ == MT_vector2)
+        ConvertValue(&output, this->vector2_);
+    else if (this->type_ == MT_vector3)
+        ConvertValue(&output, this->vector3_);
+    else if (this->type_ == MT_colourvalue)
+        ConvertValue(&output, this->colourvalue_);
+    else if (this->type_ == MT_quaternion)
+        ConvertValue(&output, this->quaternion_);
+    else if (this->type_ == MT_radian)
+        ConvertValue(&output, this->radian_);
+    else if (this->type_ == MT_degree)
+        ConvertValue(&output, this->degree_);
+    else
+        return MultiTypeString::toString();
+
+    return output;
+}
+
+bool MultiTypeMath::fromString(const std::string value)
+{
+    if (this->type_ == MT_vector2)
+        return ConvertValue(&this->vector2_, value, orxonox::Vector2(0, 0));
+    else if (this->type_ == MT_vector3)
+        return ConvertValue(&this->vector3_, value, orxonox::Vector3(0, 0, 0));
+    else if (this->type_ == MT_colourvalue)
+        return ConvertValue(&this->colourvalue_, value, orxonox::ColourValue(0, 0, 0, 0));
+    else if (this->type_ == MT_quaternion)
+        return ConvertValue(&this->quaternion_, value, orxonox::Quaternion(1, 0, 0, 0));
+    else if (this->type_ == MT_radian)
+        return ConvertValue(&this->radian_, value, orxonox::Radian(0));
+    else if (this->type_ == MT_degree)
+        return ConvertValue(&this->degree_, value, orxonox::Degree(0));
+    else
+        return MultiTypeString::fromString(value);
+}
+
+std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm)
+{
+    out << mtm.toString();
+    return out;
+}
Index: code/trunk/src/util/MultiTypeMath.h
===================================================================
--- code/trunk/src/util/MultiTypeMath.h	(revision 871)
+++ code/trunk/src/util/MultiTypeMath.h	(revision 871)
@@ -0,0 +1,157 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiTypeMath_H__
+#define _MultiTypeMath_H__
+
+#include "UtilPrereqs.h"
+
+#include "MultiTypeString.h"
+#include "Math.h"
+
+class _UtilExport MultiTypeMath : public MultiTypeString
+{
+    public:
+        MultiTypeMath(MultiType      type = MT_null);
+        inline MultiTypeMath(int            value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned int   value) : MultiTypeString(value) {}
+        inline MultiTypeMath(char           value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned char  value) : MultiTypeString(value) {}
+        inline MultiTypeMath(short          value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned short value) : MultiTypeString(value) {}
+        inline MultiTypeMath(long           value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned long  value) : MultiTypeString(value) {}
+        inline MultiTypeMath(float          value) : MultiTypeString(value) {}
+        inline MultiTypeMath(double         value) : MultiTypeString(value) {}
+        inline MultiTypeMath(long double    value) : MultiTypeString(value) {}
+        inline MultiTypeMath(bool           value) : MultiTypeString(value) {}
+        inline MultiTypeMath(const char*        value) : MultiTypeString(value) {}
+        inline MultiTypeMath(const std::string& value) : MultiTypeString(value) {}
+        inline MultiTypeMath(const orxonox::Vector2&     value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Vector3&     value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::ColourValue& value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Quaternion&  value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Radian&      value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Degree&      value) { this->setValue(value); }
+        inline MultiTypeMath(const MultiTypeMath& mtm)          { this->setValue(mtm);   }
+        virtual inline ~MultiTypeMath() {}
+
+        using MultiTypeString::operator=;
+        inline MultiTypeMath& operator=(const orxonox::Vector2&     value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Vector3&     value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::ColourValue& value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Quaternion&  value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Radian&      value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Degree&      value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const MultiTypeMath& mtm)          { this->setValue(mtm);   return *this; }
+
+        using MultiTypeString::operator==;
+        inline bool operator==(const orxonox::Vector2&     value) const { return (this->vector2_     == value); }
+        inline bool operator==(const orxonox::Vector3&     value) const { return (this->vector3_     == value); }
+        inline bool operator==(const orxonox::ColourValue& value) const { return (this->colourvalue_ == value); }
+        inline bool operator==(const orxonox::Quaternion&  value) const { return (this->quaternion_  == value); }
+        inline bool operator==(const orxonox::Radian&      value) const { return (this->radian_      == value); }
+        inline bool operator==(const orxonox::Degree&      value) const { return (this->degree_      == value); }
+        bool operator==(const MultiTypeMath& mtm) const;
+
+        using MultiTypeString::operator!=;
+        inline bool operator!=(const orxonox::Vector2&     value) const { return (this->vector2_     != value); }
+        inline bool operator!=(const orxonox::Vector3&     value) const { return (this->vector3_     != value); }
+        inline bool operator!=(const orxonox::ColourValue& value) const { return (this->colourvalue_ != value); }
+        inline bool operator!=(const orxonox::Quaternion&  value) const { return (this->quaternion_  != value); }
+        inline bool operator!=(const orxonox::Radian&      value) const { return (this->radian_      != value); }
+        inline bool operator!=(const orxonox::Degree&      value) const { return (this->degree_      != value); }
+        bool operator!=(const MultiTypeMath& mtm) const;
+
+        virtual operator int()                  const;
+        virtual operator unsigned int()         const;
+        virtual operator char()                 const;
+        virtual operator unsigned char()        const;
+        virtual operator short()                const;
+        virtual operator unsigned short()       const;
+        virtual operator long()                 const;
+        virtual operator unsigned long()        const;
+        virtual operator float ()               const;
+        virtual operator double ()              const;
+        virtual operator long double()          const;
+        virtual operator bool()                 const;
+        virtual operator std::string()          const;
+        virtual operator const char*()          const;
+        virtual operator orxonox::Vector2()     const;
+        virtual operator orxonox::Vector3()     const;
+        virtual operator orxonox::ColourValue() const;
+        virtual operator orxonox::Quaternion()  const;
+        virtual operator orxonox::Radian()      const;
+        virtual operator orxonox::Degree()      const;
+
+        using MultiTypeString::setValue;
+        inline void setValue(const orxonox::Vector2&     value) { this->type_ = MT_vector2;     this->vector2_     = value; }
+        inline void setValue(const orxonox::Vector3&     value) { this->type_ = MT_vector3;     this->vector3_     = value; }
+        inline void setValue(const orxonox::ColourValue& value) { this->type_ = MT_colourvalue; this->colourvalue_ = value; }
+        inline void setValue(const orxonox::Quaternion&  value) { this->type_ = MT_quaternion;  this->quaternion_  = value; }
+        inline void setValue(const orxonox::Radian&      value) { this->type_ = MT_radian;      this->radian_      = value; }
+        inline void setValue(const orxonox::Degree&      value) { this->type_ = MT_degree;      this->degree_      = value; }
+        void setValue(const MultiTypeMath& mtm);
+
+        inline orxonox::Vector2     getVector2()     const { return this->vector2_;     }
+        inline orxonox::Vector3     getVector3()     const { return this->vector3_;     }
+        inline orxonox::ColourValue getColourValue() const { return this->colourvalue_; }
+        inline orxonox::Quaternion  getQuaternion()  const { return this->quaternion_;  }
+        inline orxonox::Radian      getRadian()      const { return this->radian_;      }
+        inline orxonox::Degree      getDegree()      const { return this->degree_;      }
+
+        inline orxonox::Vector2&     getVector2()     { return this->vector2_;     }
+        inline orxonox::Vector3&     getVector3()     { return this->vector3_;     }
+        inline orxonox::ColourValue& getColourValue() { return this->colourvalue_; }
+        inline orxonox::Quaternion&  getQuaternion()  { return this->quaternion_;  }
+        inline orxonox::Radian&      getRadian()      { return this->radian_;      }
+        inline orxonox::Degree&      getDegree()      { return this->degree_;      }
+
+        using MultiTypeString::getValue;
+        inline void getValue(orxonox::Vector2*     variable) const { (*variable) = orxonox::Vector2     (this->vector2_);     }
+        inline void getValue(orxonox::Vector3*     variable) const { (*variable) = orxonox::Vector3     (this->vector3_);     }
+        inline void getValue(orxonox::ColourValue* variable) const { (*variable) = orxonox::ColourValue (this->colourvalue_); }
+        inline void getValue(orxonox::Quaternion*  variable) const { (*variable) = orxonox::Quaternion  (this->quaternion_);  }
+        inline void getValue(orxonox::Radian*      variable) const { (*variable) = orxonox::Radian      (this->radian_);      }
+        inline void getValue(orxonox::Degree*      variable) const { (*variable) = orxonox::Degree      (this->degree_);      }
+
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
+
+    protected:
+        orxonox::Vector2      vector2_;
+        orxonox::Vector3      vector3_;
+        orxonox::ColourValue  colourvalue_;
+        orxonox::Quaternion   quaternion_;
+        orxonox::Radian       radian_;
+        orxonox::Degree       degree_;
+};
+
+std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm);
+
+#endif /* _MultiTypeMath_H__ */
Index: code/trunk/src/util/MultiTypePrimitive.cc
===================================================================
--- code/trunk/src/util/MultiTypePrimitive.cc	(revision 871)
+++ code/trunk/src/util/MultiTypePrimitive.cc	(revision 871)
@@ -0,0 +1,227 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#include "MultiTypePrimitive.h"
+#include "Convert.h"
+
+MultiTypePrimitive::MultiTypePrimitive(MultiType type)
+{
+    this->type_ = type;
+
+    if (type == MT_int)
+        this->value_.int_ = 0;
+    else if (type == MT_uint)
+        this->value_.uint_ = 0;
+    else if (type == MT_char)
+        this->value_.char_ = 0;
+    else if (type == MT_uchar)
+        this->value_.uchar_ = 0;
+    else if (type == MT_short)
+        this->value_.short_ = 0;
+    else if (type == MT_ushort)
+        this->value_.ushort_ = 0;
+    else if (type == MT_long)
+        this->value_.long_ = 0;
+    else if (type == MT_ulong)
+        this->value_.ulong_ = 0;
+    else if (type == MT_float)
+        this->value_.float_ = 0.0;
+    else if (type == MT_double)
+        this->value_.double_ = 0.0;
+    else if (type == MT_longdouble)
+        this->value_.longdouble_ = 0.0;
+    else if (type == MT_bool)
+        this->value_.bool_ = false;
+    else
+        this->value_.int_ = 0;
+}
+
+bool MultiTypePrimitive::operator==(const MultiTypePrimitive& mtp) const
+{
+    if (this->type_ == mtp.type_)
+    {
+        if (this->type_ == MT_int)
+            return (this->value_.int_ == mtp.value_.int_);
+        else if (this->type_ == MT_uint)
+            return (this->value_.uint_ == mtp.value_.uint_);
+        else if (this->type_ == MT_char)
+            return (this->value_.char_ == mtp.value_.char_);
+        else if (this->type_ == MT_uchar)
+            return (this->value_.uchar_ == mtp.value_.uchar_);
+        else if (this->type_ == MT_short)
+            return (this->value_.short_ == mtp.value_.short_);
+        else if (this->type_ == MT_ushort)
+            return (this->value_.ushort_ == mtp.value_.ushort_);
+        else if (this->type_ == MT_long)
+            return (this->value_.long_ == mtp.value_.long_);
+        else if (this->type_ == MT_ulong)
+            return (this->value_.ulong_ == mtp.value_.ulong_);
+        else if (this->type_ == MT_float)
+            return (this->value_.float_ == mtp.value_.float_);
+        else if (this->type_ == MT_double)
+            return (this->value_.double_ == mtp.value_.double_);
+        else if (this->type_ == MT_longdouble)
+            return (this->value_.longdouble_ == mtp.value_.longdouble_);
+        else if (this->type_ == MT_bool)
+            return (this->value_.bool_ == mtp.value_.bool_);
+    }
+
+    return false;
+}
+
+bool MultiTypePrimitive::operator!=(const MultiTypePrimitive& mtp) const
+{
+    if (this->type_ == mtp.type_)
+    {
+        if (this->type_ == MT_int)
+            return (this->value_.int_ != mtp.value_.int_);
+        else if (this->type_ == MT_uint)
+            return (this->value_.uint_ != mtp.value_.uint_);
+        else if (this->type_ == MT_char)
+            return (this->value_.char_ != mtp.value_.char_);
+        else if (this->type_ == MT_uchar)
+            return (this->value_.uchar_ != mtp.value_.uchar_);
+        else if (this->type_ == MT_short)
+            return (this->value_.short_ != mtp.value_.short_);
+        else if (this->type_ == MT_ushort)
+            return (this->value_.ushort_ != mtp.value_.ushort_);
+        else if (this->type_ == MT_long)
+            return (this->value_.long_ != mtp.value_.long_);
+        else if (this->type_ == MT_ulong)
+            return (this->value_.ulong_ != mtp.value_.ulong_);
+        else if (this->type_ == MT_float)
+            return (this->value_.float_ != mtp.value_.float_);
+        else if (this->type_ == MT_double)
+            return (this->value_.double_ != mtp.value_.double_);
+        else if (this->type_ == MT_longdouble)
+            return (this->value_.longdouble_ != mtp.value_.longdouble_);
+        else if (this->type_ == MT_bool)
+            return (this->value_.bool_ != mtp.value_.bool_);
+    }
+
+    return true;
+}
+
+MultiTypePrimitive::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypePrimitive, int>(*this); }
+MultiTypePrimitive::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned int>(*this); }
+MultiTypePrimitive::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypePrimitive, char>(*this); }
+MultiTypePrimitive::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned char>(*this); }
+MultiTypePrimitive::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypePrimitive, short>(*this); }
+MultiTypePrimitive::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned short>(*this); }
+MultiTypePrimitive::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypePrimitive, long>(*this); }
+MultiTypePrimitive::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned long>(*this); }
+MultiTypePrimitive::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypePrimitive, float>(*this); }
+MultiTypePrimitive::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypePrimitive, double>(*this); }
+MultiTypePrimitive::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypePrimitive, long double>(*this); }
+MultiTypePrimitive::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypePrimitive, bool>(*this); }
+
+void MultiTypePrimitive::setValue(const MultiTypePrimitive& mtp)
+{
+    this->type_ = mtp.type_;
+    this->value_ = mtp.value_;
+}
+
+std::string MultiTypePrimitive::toString() const
+{
+    std::string output;
+
+    if (this->type_ == MT_int)
+        ConvertValue(&output, this->value_.int_);
+    else if (this->type_ == MT_uint)
+        ConvertValue(&output, this->value_.uint_);
+    else if (this->type_ == MT_char)
+        ConvertValue(&output, this->value_.char_);
+    else if (this->type_ == MT_uchar)
+        ConvertValue(&output, this->value_.uchar_);
+    else if (this->type_ == MT_short)
+        ConvertValue(&output, this->value_.short_);
+    else if (this->type_ == MT_ushort)
+        ConvertValue(&output, this->value_.ushort_);
+    else if (this->type_ == MT_long)
+        ConvertValue(&output, this->value_.long_);
+    else if (this->type_ == MT_ulong)
+        ConvertValue(&output, this->value_.ulong_);
+    else if (this->type_ == MT_float)
+        ConvertValue(&output, this->value_.float_);
+    else if (this->type_ == MT_double)
+        ConvertValue(&output, this->value_.double_);
+    else if (this->type_ == MT_longdouble)
+        ConvertValue(&output, this->value_.longdouble_);
+    else if (this->type_ == MT_bool)
+        ConvertValue(&output, this->value_.bool_);
+
+    return output;
+}
+
+bool MultiTypePrimitive::fromString(const std::string value)
+{
+    if (this->type_ == MT_int)
+        return ConvertValue(&this->value_.int_, value, (int)0);
+    else if (this->type_ == MT_uint)
+        return ConvertValue(&this->value_.uint_, value, (unsigned int)0);
+    else if (this->type_ == MT_char)
+        return ConvertValue(&this->value_.char_, value, (char)0);
+    else if (this->type_ == MT_uchar)
+        return ConvertValue(&this->value_.uchar_, value, (unsigned char)0);
+    else if (this->type_ == MT_short)
+        return ConvertValue(&this->value_.short_, value, (short)0);
+    else if (this->type_ == MT_ushort)
+        return ConvertValue(&this->value_.ushort_, value, (unsigned short)0);
+    else if (this->type_ == MT_long)
+        return ConvertValue(&this->value_.long_, value, (long)0);
+    else if (this->type_ == MT_ulong)
+        return ConvertValue(&this->value_.ulong_, value, (unsigned long)0);
+    else if (this->type_ == MT_float)
+        return ConvertValue(&this->value_.float_, value, (float)0.0);
+    else if (this->type_ == MT_double)
+        return ConvertValue(&this->value_.double_, value, (double)0.0);
+    else if (this->type_ == MT_longdouble)
+        return ConvertValue(&this->value_.longdouble_, value, (long double)0.0);
+    else if (this->type_ == MT_bool)
+        return ConvertValue(&this->value_.bool_, value, false);
+    else
+        return false;
+}
+
+std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp)
+{
+    out << mtp.toString();
+    return out;
+}
Index: code/trunk/src/util/MultiTypePrimitive.h
===================================================================
--- code/trunk/src/util/MultiTypePrimitive.h	(revision 871)
+++ code/trunk/src/util/MultiTypePrimitive.h	(revision 871)
@@ -0,0 +1,179 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiTypePrimitive_H__
+#define _MultiTypePrimitive_H__
+
+#include <ostream>
+
+#include "UtilPrereqs.h"
+
+#include "MultiType.h"
+
+class _UtilExport MultiTypePrimitive
+{
+    public:
+        MultiTypePrimitive(MultiType      type = MT_null);
+        inline MultiTypePrimitive(int            value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned int   value) { this->setValue(value); }
+        inline MultiTypePrimitive(char           value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned char  value) { this->setValue(value); }
+        inline MultiTypePrimitive(short          value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned short value) { this->setValue(value); }
+        inline MultiTypePrimitive(long           value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned long  value) { this->setValue(value); }
+        inline MultiTypePrimitive(float          value) { this->setValue(value); }
+        inline MultiTypePrimitive(double         value) { this->setValue(value); }
+        inline MultiTypePrimitive(long double    value) { this->setValue(value); }
+        inline MultiTypePrimitive(bool           value) { this->setValue(value); }
+        inline MultiTypePrimitive(const MultiTypePrimitive& mtp) { this->setValue(mtp); }
+        virtual inline ~MultiTypePrimitive() {}
+
+        inline MultiTypePrimitive& operator=(MultiType      value) { this->type_ = MT_null; return *this; }
+        inline MultiTypePrimitive& operator=(int            value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned int   value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(char           value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned char  value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(short          value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned short value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(long           value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned long  value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(float          value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(double         value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(long double    value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(bool           value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(const MultiTypePrimitive& mtp) { this->setValue(mtp); return *this; }
+
+        inline bool operator==(int            value) const { return (this->value_.int_        == value); }
+        inline bool operator==(unsigned int   value) const { return (this->value_.uint_       == value); }
+        inline bool operator==(char           value) const { return (this->value_.char_       == value); }
+        inline bool operator==(unsigned char  value) const { return (this->value_.uchar_      == value); }
+        inline bool operator==(short          value) const { return (this->value_.short_      == value); }
+        inline bool operator==(unsigned short value) const { return (this->value_.ushort_     == value); }
+        inline bool operator==(long           value) const { return (this->value_.long_       == value); }
+        inline bool operator==(unsigned long  value) const { return (this->value_.ulong_      == value); }
+        inline bool operator==(float          value) const { return (this->value_.float_      == value); }
+        inline bool operator==(double         value) const { return (this->value_.double_     == value); }
+        inline bool operator==(long double    value) const { return (this->value_.longdouble_ == value); }
+        inline bool operator==(bool           value) const { return (this->value_.bool_       == value); }
+        bool operator==(const MultiTypePrimitive& mtp) const;
+
+        inline bool operator!=(int            value) const { return (this->value_.int_        != value); }
+        inline bool operator!=(unsigned int   value) const { return (this->value_.uint_       != value); }
+        inline bool operator!=(char           value) const { return (this->value_.char_       != value); }
+        inline bool operator!=(unsigned char  value) const { return (this->value_.uchar_      != value); }
+        inline bool operator!=(short          value) const { return (this->value_.short_      != value); }
+        inline bool operator!=(unsigned short value) const { return (this->value_.ushort_     != value); }
+        inline bool operator!=(long           value) const { return (this->value_.long_       != value); }
+        inline bool operator!=(unsigned long  value) const { return (this->value_.ulong_      != value); }
+        inline bool operator!=(float          value) const { return (this->value_.float_      != value); }
+        inline bool operator!=(double         value) const { return (this->value_.double_     != value); }
+        inline bool operator!=(long double    value) const { return (this->value_.longdouble_ != value); }
+        inline bool operator!=(bool           value) const { return (this->value_.bool_       != value); }
+        bool operator!=(const MultiTypePrimitive& mtp) const;
+
+        virtual operator int()            const;
+        virtual operator unsigned int()   const;
+        virtual operator char()           const;
+        virtual operator unsigned char()  const;
+        virtual operator short()          const;
+        virtual operator unsigned short() const;
+        virtual operator long()           const;
+        virtual operator unsigned long()  const;
+        virtual operator float ()         const;
+        virtual operator double ()        const;
+        virtual operator long double()    const;
+        virtual operator bool()           const;
+
+        inline void setValue(int            value) { this->type_ = MT_int;        this->value_.int_        = value; }
+        inline void setValue(unsigned int   value) { this->type_ = MT_uint;       this->value_.uint_       = value; }
+        inline void setValue(char           value) { this->type_ = MT_char;       this->value_.char_       = value; }
+        inline void setValue(unsigned char  value) { this->type_ = MT_uchar;      this->value_.uchar_      = value; }
+        inline void setValue(short          value) { this->type_ = MT_short;      this->value_.short_      = value; }
+        inline void setValue(unsigned short value) { this->type_ = MT_ushort;     this->value_.ushort_     = value; }
+        inline void setValue(long           value) { this->type_ = MT_long;       this->value_.long_       = value; }
+        inline void setValue(unsigned long  value) { this->type_ = MT_ulong;      this->value_.ulong_      = value; }
+        inline void setValue(float          value) { this->type_ = MT_float;      this->value_.float_      = value; }
+        inline void setValue(double         value) { this->type_ = MT_double;     this->value_.double_     = value; }
+        inline void setValue(long double    value) { this->type_ = MT_longdouble; this->value_.longdouble_ = value; }
+        inline void setValue(bool           value) { this->type_ = MT_bool;       this->value_.bool_       = value; }
+        void setValue(const MultiTypePrimitive& mtp);
+
+        inline int            getInt()           const { return this->value_.int_;        }
+        inline unsigned int   getUnsignedInt()   const { return this->value_.uint_;       }
+        inline char           getChar()          const { return this->value_.char_;       }
+        inline unsigned char  getUnsignedChar()  const { return this->value_.uchar_;      }
+        inline short          getShort()         const { return this->value_.short_;      }
+        inline unsigned short getUnsignedShort() const { return this->value_.ushort_;     }
+        inline long           getLong()          const { return this->value_.long_;       }
+        inline unsigned long  getUnsignedLong()  const { return this->value_.ulong_;      }
+        inline float          getFloat()         const { return this->value_.float_;      }
+        inline double         getDouble()        const { return this->value_.double_;     }
+        inline long double    getLongDouble()    const { return this->value_.longdouble_; }
+        inline bool           getBool()          const { return this->value_.bool_;       }
+
+        inline int&            getInt()           { return this->value_.int_;        }
+        inline unsigned int&   getUnsignedInt()   { return this->value_.uint_;       }
+        inline char&           getChar()          { return this->value_.char_;       }
+        inline unsigned char&  getUnsignedChar()  { return this->value_.uchar_;      }
+        inline short&          getShort()         { return this->value_.short_;      }
+        inline unsigned short& getUnsignedShort() { return this->value_.ushort_;     }
+        inline long&           getLong()          { return this->value_.long_;       }
+        inline unsigned long&  getUnsignedLong()  { return this->value_.ulong_;      }
+        inline float&          getFloat()         { return this->value_.float_;      }
+        inline double&         getDouble()        { return this->value_.double_;     }
+        inline long double&    getLongDouble()    { return this->value_.longdouble_; }
+        inline bool&           getBool()          { return this->value_.bool_;       }
+
+        inline void getValue(int*            variable) const { (*variable) = this->value_.int_;        }
+        inline void getValue(unsigned int*   variable) const { (*variable) = this->value_.uint_;       }
+        inline void getValue(char*           variable) const { (*variable) = this->value_.char_;       }
+        inline void getValue(unsigned char*  variable) const { (*variable) = this->value_.uchar_;      }
+        inline void getValue(short*          variable) const { (*variable) = this->value_.short_;      }
+        inline void getValue(unsigned short* variable) const { (*variable) = this->value_.ushort_;     }
+        inline void getValue(long*           variable) const { (*variable) = this->value_.long_;       }
+        inline void getValue(unsigned long*  variable) const { (*variable) = this->value_.ulong_;      }
+        inline void getValue(float*          variable) const { (*variable) = this->value_.float_;      }
+        inline void getValue(double*         variable) const { (*variable) = this->value_.double_;     }
+        inline void getValue(long double*    variable) const { (*variable) = this->value_.longdouble_; }
+        inline void getValue(bool*           variable) const { (*variable) = this->value_.bool_;       }
+
+        inline MultiType getType()           const { return this->type_; }
+        inline bool      isA(MultiType type) const { return (this->type_ == type); }
+
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
+
+    protected:
+        MultiTypeValue  value_;
+        MultiType       type_;
+};
+
+std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp);
+
+#endif /* _MultiTypePrimitive_H__ */
Index: code/trunk/src/util/MultiTypeString.cc
===================================================================
--- code/trunk/src/util/MultiTypeString.cc	(revision 871)
+++ code/trunk/src/util/MultiTypeString.cc	(revision 871)
@@ -0,0 +1,127 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#include "MultiTypeString.h"
+#include "Convert.h"
+
+MultiTypeString::MultiTypeString(MultiType type) : MultiTypePrimitive(type)
+{
+    if (type == MT_constchar)
+        this->string_ = std::string("");
+    else if (type == MT_string)
+        this->string_ = std::string("");
+}
+
+bool MultiTypeString::operator==(const MultiTypeString& mts) const
+{
+    if (!MultiTypePrimitive::operator==(mts) && this->type_ == mts.type_)
+    {
+        if (this->type_ == MT_constchar)
+            return (this->string_ == mts.string_);
+        else if (this->type_ == MT_string)
+            return (this->string_ == mts.string_);
+    }
+
+    return false;
+}
+
+bool MultiTypeString::operator!=(const MultiTypeString& mts) const
+{
+    if (MultiTypePrimitive::operator==(mts) && this->type_ == mts.type_)
+    {
+        if (this->type_ == MT_constchar)
+            return (this->string_ != mts.string_);
+        else if (this->type_ == MT_string)
+            return (this->string_ != mts.string_);
+    }
+
+    return true;
+}
+
+MultiTypeString::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeString, int>(*this); }
+MultiTypeString::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeString, unsigned int>(*this); }
+MultiTypeString::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeString, char>(*this); }
+MultiTypeString::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeString, unsigned char>(*this); }
+MultiTypeString::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeString, short>(*this); }
+MultiTypeString::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeString, unsigned short>(*this); }
+MultiTypeString::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeString, long>(*this); }
+MultiTypeString::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeString, unsigned long>(*this); }
+MultiTypeString::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeString, float>(*this); }
+MultiTypeString::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeString, double>(*this); }
+MultiTypeString::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeString, long double>(*this); }
+MultiTypeString::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeString, bool>(*this); }
+MultiTypeString::operator std::string() const
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this); }
+MultiTypeString::operator const char*() const
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this)).c_str(); }
+
+void MultiTypeString::setValue(const MultiTypeString& mts)
+{
+    MultiTypePrimitive::setValue(mts);
+    this->string_ = mts.string_;
+}
+
+std::string MultiTypeString::toString() const
+{
+    if (this->type_ == MT_constchar)
+        return this->string_;
+    else if (this->type_ == MT_string)
+        return this->string_;
+    else
+        return MultiTypePrimitive::toString();
+}
+
+bool MultiTypeString::fromString(const std::string value)
+{
+    if (this->type_ == MT_constchar)
+        this->string_ = value;
+    else if (this->type_ == MT_string)
+        this->string_ = value;
+    else
+        return MultiTypePrimitive::fromString(value);
+
+    return true;
+}
+
+std::ostream& operator<<(std::ostream& out, MultiTypeString& mts)
+{
+    out << mts.toString();
+    return out;
+}
Index: code/trunk/src/util/MultiTypeString.h
===================================================================
--- code/trunk/src/util/MultiTypeString.h	(revision 871)
+++ code/trunk/src/util/MultiTypeString.h	(revision 871)
@@ -0,0 +1,113 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiTypeString_H__
+#define _MultiTypeString_H__
+
+#include <string>
+#include <iostream>
+#include "UtilPrereqs.h"
+
+#include "MultiTypePrimitive.h"
+
+class _UtilExport MultiTypeString : public MultiTypePrimitive
+{
+    public:
+        MultiTypeString(MultiType      type = MT_null);
+        inline MultiTypeString(int            value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned int   value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(char           value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned char  value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(short          value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned short value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(long           value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned long  value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(float          value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(double         value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(long double    value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(bool           value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(const char*        value)   { this->setValue(value); }
+        inline MultiTypeString(const std::string& value)   { this->setValue(value); }
+        inline MultiTypeString(const MultiTypeString& mts) { this->setValue(mts);   }
+        virtual inline ~MultiTypeString() {}
+
+        using MultiTypePrimitive::operator=;
+        inline MultiTypeString& operator=(const char*        value)   { this->setValue(value); return *this; }
+        inline MultiTypeString& operator=(const std::string& value)   { this->setValue(value); return *this; }
+        inline MultiTypeString& operator=(const MultiTypeString& mts) { this->setValue(mts);   return *this; }
+
+        using MultiTypePrimitive::operator==;
+        inline bool operator==(const char*        value) const { return (this->string_ == std::string(value)); }
+        inline bool operator==(const std::string& value) const { return (this->string_ == value);              }
+        bool operator==(const MultiTypeString& mts) const;
+
+        using MultiTypePrimitive::operator!=;
+        inline bool operator!=(const char*        value) const { return (this->string_ != std::string(value)); }
+        inline bool operator!=(const std::string& value) const { return (this->string_ != value);              }
+        bool operator!=(const MultiTypeString& mts) const;
+
+        virtual operator int()            const;
+        virtual operator unsigned int()   const;
+        virtual operator char()           const;
+        virtual operator unsigned char()  const;
+        virtual operator short()          const;
+        virtual operator unsigned short() const;
+        virtual operator long()           const;
+        virtual operator unsigned long()  const;
+        virtual operator float ()         const;
+        virtual operator double ()        const;
+        virtual operator long double()    const;
+        virtual operator bool()           const;
+        virtual operator std::string()    const;
+        virtual operator const char*()    const;
+
+        using MultiTypePrimitive::setValue;
+        inline void setValue(const char*        value) { this->type_ = MT_string; this->string_ = std::string(value); }
+        inline void setValue(const std::string& value) { this->type_ = MT_string; this->string_ = value;              }
+        void setValue(const MultiTypeString& mts);
+
+        inline const std::string getString() const { return this->string_;         }
+        inline const char*  getConstChar()   const { return this->string_.c_str(); }
+
+        inline const std::string& getString() { return this->string_;         }
+        inline const char*  getConstChar()    { return this->string_.c_str(); }
+
+        using MultiTypePrimitive::getValue;
+        inline void getValue(std::string* variable) const { (*variable) = this->string_;         }
+        inline void getValue(const char** variable) const { (*variable) = this->string_.c_str(); }
+
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
+
+    protected:
+        std::string string_;
+};
+
+std::ostream& operator<<(std::ostream& out, MultiTypeString& mts);
+
+#endif /* _MultiTypeString_H__ */
Index: code/trunk/src/util/String.cc
===================================================================
--- code/trunk/src/util/String.cc	(revision 871)
+++ code/trunk/src/util/String.cc	(revision 871)
@@ -0,0 +1,213 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+ */
+
+#include "String.h"
+
+/**
+    @brief Removes all whitespaces from a string.
+    @param str The string to strip
+*/
+void strip(std::string* str)
+{
+    unsigned int pos;
+    while ((pos = (*str).find(" ")) < (*str).length())
+        (*str).erase(pos, 1);
+    while ((pos = (*str).find("\t")) < (*str).length())
+        (*str).erase(pos, 1);
+}
+
+/**
+    @brief Returns a copy of a string without whitespaces.
+    @param str The string to strip
+    @return The stripped line
+*/
+std::string getStripped(const std::string& str)
+{
+    std::string output = std::string(str);
+    strip(&output);
+    return output;
+}
+
+/**
+    @brief Determines if a string in is a comment.
+    @param str The string to check
+    @return True = it's a comment
+
+    A comment is defined by a leading '#', '%', ';' or '//'.
+*/
+bool isComment(const std::string& str)
+{
+    // Strip the line, whitespaces are disturbing
+    std::string teststring = getStripped(str);
+
+    // There are four possible comment-symbols:
+    //  1) #comment in script-language style
+    //  2) %comment in matlab style
+    //  3) ;comment in unreal tournament config-file style
+    //  4) //comment in code style
+    if (teststring[0] == '#' || teststring[0] == '%' || teststring[0] == ';' || (teststring[0] == '/' && teststring[0] == '/'))
+        return true;
+
+    return false;
+}
+
+/**
+    @brief Determines if a string is empty (contains only whitespaces).
+    @param str The string to check
+    @return True = it's empty
+*/
+bool isEmpty(const std::string& str)
+{
+    return getStripped(str) == "";
+}
+
+/**
+    @brief Determines if a string contains only numbers and maximal one '.'.
+    @param str The string to check
+    @return True = it's a number
+*/
+bool isNumeric(const std::string& str)
+{
+    bool foundPoint = false;
+
+    for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
+    {
+        if (((*it) < '0' || (*it) > '9'))
+        {
+            if ((*it) != '.' && !foundPoint)
+                foundPoint = true;
+            else
+                return false;
+        }
+    }
+
+    return true;
+}
+
+/**
+    @brief Replaces each char between A and Z with its lowercase equivalent.
+    @param str The string to convert
+*/
+void lowercase(std::string* str)
+{
+    static unsigned const char difference_between_A_and_a = 'A' - 'a';
+
+    for (std::string::iterator it = (*str).begin(); it != (*str).end(); ++it)
+        if ((*it) >= 'A' && (*it) <= 'Z')
+            (*it) -= difference_between_A_and_a;
+}
+
+/**
+    @brief Returns a copy of the given string without uppercase chars.
+    @param str The string
+    @return The copy
+*/
+std::string getLowercase(const std::string& str)
+{
+    std::string output = std::string(str);
+    lowercase(&output);
+    return output;
+}
+
+/**
+    @brief Replaces each char between a and z with its uppercase equivalent.
+    @param str The string to convert
+*/
+void uppercase(std::string* str)
+{
+    static unsigned const char difference_between_A_and_a = 'A' - 'a';
+
+    for (std::string::iterator it = (*str).begin(); it != (*str).end(); ++it)
+        if ((*it) >= 'a' && (*it) <= 'z')
+            (*it) += difference_between_A_and_a;
+}
+
+/**
+    @brief Returns a copy of the given string without lowercase chars.
+    @param str The string
+    @return The copy
+*/
+std::string getUppercase(const std::string& str)
+{
+    std::string output = std::string(str);
+    uppercase(&output);
+    return output;
+}
+
+/**
+ * @brief compares two strings without ignoring the case
+ * @param s1 first string
+ * @param s2 second string
+ */
+int nocaseCmp(const std::string& s1, const std::string& s2)
+{
+    std::string::const_iterator it1=s1.begin();
+    std::string::const_iterator it2=s2.begin();
+
+    //stop when either string's end has been reached
+    while ( (it1!=s1.end()) && (it2!=s2.end()) )
+    {
+        if(::toupper(*it1) != ::toupper(*it2)) //letters differ?
+            // return -1 to indicate smaller than, 1 otherwise
+            return (::toupper(*it1)  < ::toupper(*it2)) ? -1 : 1;
+        //proceed to the next character in each string
+        ++it1;
+        ++it2;
+    }
+    size_t size1=s1.size(), size2=s2.size();// cache lengths
+    //return -1,0 or 1 according to strings' lengths
+    if (size1==size2)
+        return 0;
+    return (size1<size2) ? -1 : 1;
+}
+
+
+/**
+ * @brief compares two strings without ignoring the case
+ * @param s1 first string
+ * @param s2 second string
+ * @param len how far from the beginning to start.
+ */
+int nocaseCmp(const std::string& s1, const std::string& s2, unsigned int len)
+{
+    if (len == 0)
+        return 0;
+    std::string::const_iterator it1=s1.begin();
+    std::string::const_iterator it2=s2.begin();
+
+    //stop when either string's end has been reached
+    while ( (it1!=s1.end()) && (it2!=s2.end()) && len-- > 0)
+    {
+        if(::toupper(*it1) != ::toupper(*it2)) //letters differ?
+            // return -1 to indicate smaller than, 1 otherwise
+            return (::toupper(*it1)  < ::toupper(*it2)) ? -1 : 1;
+        //proceed to the next character in each string
+        ++it1;
+        ++it2;
+    }
+    return 0;
+}
Index: code/trunk/src/util/String.h
===================================================================
--- code/trunk/src/util/String.h	(revision 871)
+++ code/trunk/src/util/String.h	(revision 871)
@@ -0,0 +1,146 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+ */
+
+#ifndef _String_H__
+#define _String_H__
+
+#include <string>
+#include <sstream>
+
+#include "UtilPrereqs.h"
+
+_UtilExport void        strip(std::string* str);
+_UtilExport std::string getStripped(const std::string& str);
+
+_UtilExport bool        isEmpty(const std::string& str);
+_UtilExport bool        isComment(const std::string& str);
+_UtilExport bool        isNumeric(const std::string& str);
+
+_UtilExport void        lowercase(std::string* str);
+_UtilExport std::string getLowercase(const std::string& str);
+
+_UtilExport void        uppercase(std::string* str);
+_UtilExport std::string getUppercase(const std::string& str);
+
+_UtilExport int         nocaseCmp(const std::string& s1, const std::string& s2);
+_UtilExport int         nocaseCmp(const std::string& s1, const std::string& s2, unsigned int len);
+
+//! The Convert class has some static member functions to convert strings to values and values to strings.
+class _UtilExport Convert
+{
+    public:
+        /**
+            @brief Converts a value of any type to a string.
+            @param output The string to write the result in
+            @param input The variable to convert
+            @return True if the conversion succeded
+
+            @example
+            float f = 3.14;
+            std::string output;
+            bool success = Convert::ToString(&output, f);
+        */
+        template <typename T>
+        static bool ToString(std::string* output, T input)
+        {
+            std::ostringstream oss;
+            if (oss << input)
+            {
+                (*output) = oss.str();
+                return true;
+            }
+
+            return false;
+        }
+
+        /**
+            @brief Converts a value of any type to a string and assigns a defaultvalue if the conversion fails.
+            @param output The string to write the result in
+            @param input The variable to convert
+            @param fallbackString The assigned string if the conversion fails.
+            @return True if the conversion succeeded
+
+            @example
+            float f = 3.14;
+            std::string output;
+            bool success = Convert::ToString(&output, f, "0.000000");
+        */
+        template <typename T>
+        static bool ToString(std::string* output, T input, const std::string& fallbackString)
+        {
+            if (Convert::ToString(output, input))
+                return true;
+
+            (*output) = fallbackString;
+            return false;
+        }
+
+        /**
+            @brief Converts a string to a value of any type.
+            @param output The variable to assign the result to
+            @param input The string to convert
+            @return True if the conversion succeeded
+
+            @example
+            std::string input = "3.14";
+            float f;
+            bool success = string2Number(&f, input);
+        */
+        template <typename T>
+        static bool FromString(T* output, const std::string& input)
+        {
+            std::istringstream iss(input);
+            if (iss >> (*output))
+                return true;
+
+            return false;
+        }
+
+        /**
+            @brief Converts a string to a value of any type.
+            @param output The variable to assign the result to
+            @param input The string to convert
+            @param fallbackValue The assigned value if the conversion fails
+            @return True if the conversion succeeded
+
+            @example
+            std::string input = "3.14";
+            float f;
+            bool success = string2Number(&f, input, 0.000000);
+        */
+        template <typename T>
+        static bool FromString(T* output, const std::string& input, T fallbackValue)
+        {
+            if (Convert::FromString(output, input))
+                return true;
+
+            (*output) = fallbackValue;
+            return false;
+        }
+};
+
+#endif /* _String_H__ */
Index: code/trunk/src/util/String2Number.h
===================================================================
--- code/trunk/src/util/String2Number.h	(revision 790)
+++ code/trunk/src/util/String2Number.h	(revision 871)
@@ -7,4 +7,5 @@
 
 #include "core/Debug.h"
+#include "UtilPrereqs.h"
 
 /**
Index: code/trunk/src/util/SubString.cc
===================================================================
--- code/trunk/src/util/SubString.cc	(revision 871)
+++ code/trunk/src/util/SubString.cc	(revision 871)
@@ -0,0 +1,500 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christian Meyer
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+//
+//  splitLine
+//  STL string tokenizer
+//
+//  Created by Clemens Wacha.
+//  Version 1.0
+//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
+//
+ */
+
+#include "SubString.h"
+
+/**
+ * @brief default constructor
+ */
+SubString::SubString()
+{}
+
+
+/**
+ * @brief create a SubString from
+ * @param string the String to Split
+ * @param delimiter the Character at which to split string (delimiter)
+ */
+SubString::SubString(const std::string& string, char delimiter)
+{
+  this->split(string, delimiter);
+}
+
+
+/**
+ * @brief Splits a String into multiple splitters.
+ * @param string the String to split
+ * @param delimiters multiple set of characters at what to split. (delimiters)
+ * @param delimiterNeighbours neighbours of the delimiters, that will be erased only when near a delimiter.
+ * @param emptyEntries If empty entries should be allewed or removed.
+ * @param escapeChar The Escape Character that overrides splitters commends and so on...
+ * @param safemode_char within these characters splitting won't happen
+ * @param comment_char the Comment character.
+ */
+SubString::SubString(const std::string& string,
+                     const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
+                     char escapeChar, char safemode_char, char openparenthesis_char, char closeparenthesis_char, char comment_char)
+{
+  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, openparenthesis_char, closeparenthesis_char, comment_char);
+}
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subString the SubString to take a set from.
+ * @param subSetBegin the beginning to the end
+ */
+SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+{
+  for (unsigned int i = subSetBegin; i < subString.size(); i++)
+    this->strings.push_back(subString[i]);
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subString the SubString to take a Set from
+ * @param subSetBegin the beginning to the end
+ * @param subSetEnd the end of the SubSet (max subString.size() will be checked internaly)
+ */
+SubString::SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd)
+{
+  for (unsigned int i = subSetBegin; i < subString.size() || i < subSetEnd; i++)
+    this->strings.push_back(subString[i]);
+}
+
+/**
+ * @brief creates a Substring from a count and values set.
+ * @param argc: the Arguments Count.
+ * @param argv: Argument Values.
+ */
+SubString::SubString(unsigned int argc, const char** argv)
+{
+  for(unsigned int i = 0; i < argc; ++i)
+    this->strings.push_back(std::string(argv[i]));
+}
+
+/**
+ * @brief removes the object from memory
+ */
+SubString::~SubString()
+{ }
+
+/** @brief An empty String */
+// const std::string SubString::emptyString = "";
+/** @brief Helper that gets you a String consisting of all White Spaces */
+const std::string SubString::WhiteSpaces = " \n\t";
+/** @brief Helper that gets you a String consisting of all WhiteSpaces and the Comma */
+const std::string SubString::WhiteSpacesWithComma = " \n\t,";
+/** An Empty SubString */
+const SubString SubString::NullSubString = SubString();
+
+/**
+ * @brief stores the Value of subString in this SubString
+ * @param subString will be copied into this String.
+ * @returns this SubString.
+ */
+SubString& SubString::operator=(const SubString& subString)
+{
+  this->strings = subString.strings;
+  return *this;
+}
+
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::operator==(const SubString& subString) const
+{
+  return (this->strings == subString.strings);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString) const
+{
+  return (*this == subString);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @param length how many entries to compare. (from 0 to length)
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString, unsigned int length) const
+{
+  if (length > this->size() || length > subString.size())
+    return false;
+
+  for (unsigned int i = 0; i < length; i++)
+    if (this->strings[i] != subString.strings[i])
+      return false;
+  return true;
+}
+
+
+/**
+ * @brief append operator
+ * @param subString the String to append.
+ * @returns a SubString where this and subString are appended.
+ */
+SubString SubString::operator+(const SubString& subString) const
+{
+  return SubString(*this) += subString;
+}
+
+
+/**
+ * @brief append operator.
+ * @param subString append subString to this SubString.
+ * @returns this substring appended with subString
+ */
+SubString& SubString::operator+=(const SubString& subString)
+{
+  for (unsigned int i = 0; i < subString.size(); i++)
+    this->strings.push_back(subString[i]);
+  return *this;
+}
+
+
+/**
+ * @brief Split the String at
+ * @param string where to split
+ * @param splitter delimiter.
+ */
+unsigned int SubString::split(const std::string& string, char splitter)
+{
+  this->strings.clear();
+  char split[2];
+  split[0] = splitter;
+  split[1] = '\0';
+  SubString::splitLine(this->strings, string, split);
+  return strings.size();
+}
+
+
+/**
+ * @brief Splits a String into multiple splitters.
+ * @param string the String to split
+ * @param delimiters multiple set of characters at what to split. (delimiters)
+ * @param delimiterNeighbours: Neighbours to the Delimiters that will be erased too.
+ * @param emptyEntries: If empty entries are added to the List of SubStrings
+ * @param escapeChar The Escape Character that overrides splitters commends and so on...
+ * @param safemode_char within these characters splitting won't happen
+ * @param comment_char the Comment character.
+ */
+unsigned int SubString::split(const std::string& string,
+                              const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
+                              char escapeChar, char safemode_char, char openparenthesis_char, char closeparenthesis_char, char comment_char)
+{
+  this->strings.clear();
+  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, openparenthesis_char, closeparenthesis_char, comment_char);
+  return this->strings.size();
+}
+
+
+/**
+ * @brief joins together all Strings of this Substring.
+ * @param delimiter the String between the subStrings.
+ * @returns the joined String.
+ */
+std::string SubString::join(const std::string& delimiter) const
+{
+  if (!this->strings.empty())
+  {
+    std::string retVal = this->strings[0];
+    for (unsigned int i = 1; i < this->strings.size(); i++)
+      retVal += delimiter + this->strings[i];
+    return retVal;
+  }
+  else
+  {
+    static std::string empty;
+    return empty;
+  }
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subSetBegin the beginning to the end
+ * @returns the SubSet
+ *
+ * This function is added for your convenience, and does the same as
+ * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+ */
+SubString SubString::subSet(unsigned int subSetBegin) const
+{
+  return SubString(*this, subSetBegin);
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subSetBegin the beginning to
+ * @param subSetEnd the end of the SubSet to select (if bigger than subString.size() it will be downset.)
+ * @returns the SubSet
+ *
+ * This function is added for your convenience, and does the same as
+ * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+ */
+SubString SubString::subSet(unsigned int subSetBegin, unsigned int subSetEnd) const
+{
+  return SubString(*this, subSetBegin, subSetEnd);
+}
+
+
+/**
+ * @brief splits line into tokens and stores them in ret.
+ * @param ret the Array, where the Splitted strings will be stored in
+ * to the beginning of the current token is stored
+ * @param line the inputLine to split
+ * @param delimiters a String of Delimiters (here the input will be splitted)
+ * @param delimiterNeighbours Naighbours to the Delimitter, that will be removed if they are to the left or the right of a Delimiter.
+ * @param emptyEntries: if empty Strings are added to the List of Strings.
+ * @param escape_char: Escape carater (escapes splitters)
+ * @param safemode_char: the beginning of the safemode is marked with this
+ * @param comment_char: the beginning of a comment is marked with this: (until the end of a Line)
+ * @param start_state: the Initial state on how to parse the String.
+ * @returns SPLIT_LINE_STATE the parser was in when returning
+ *
+ * This is the Actual Splitting Algorithm from Clemens Wacha
+ * Supports delimiters, escape characters,
+ * ignores special  characters between safemode_char and between comment_char and linend '\n'.
+ */
+SubString::SPLIT_LINE_STATE
+SubString::splitLine(std::vector<std::string>& ret,
+                     const std::string& line,
+                     const std::string& delimiters,
+                     const std::string& delimiterNeighbours,
+                     bool emptyEntries,
+                     char escape_char,
+                     char safemode_char,
+                     char openparenthesis_char,
+                     char closeparenthesis_char,
+                     char comment_char,
+                     SPLIT_LINE_STATE start_state)
+{
+  SPLIT_LINE_STATE state = start_state;
+  unsigned int i = 0;
+  unsigned int fallBackNeighbours = 0;
+
+  std::string token;
+
+  if(start_state != SL_NORMAL && ret.size() > 0)
+  {
+    token = ret[ret.size()-1];
+    ret.pop_back();
+  }
+
+  while(i < line.size())
+  {
+    switch(state)
+    {
+      case SL_NORMAL:
+        if(line[i] == escape_char)
+        {
+          state = SL_ESCAPE;
+        }
+        else if(line[i] == safemode_char)
+        {
+          state = SL_SAFEMODE;
+        }
+        else if(line[i] == openparenthesis_char)
+        {
+          state = SL_PARENTHESES;
+        }
+        else if(line[i] == comment_char)
+        {
+          if (fallBackNeighbours > 0)
+            token = token.substr(0, token.size() - fallBackNeighbours);
+          /// FINISH
+          if(emptyEntries || token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          token += line[i];       // EAT
+          state = SL_COMMENT;
+        }
+        else if(delimiters.find(line[i]) != std::string::npos)
+        {
+          // line[i] is a delimiter
+          if (fallBackNeighbours > 0)
+            token = token.substr(0, token.size() - fallBackNeighbours);
+          /// FINISH
+          if(emptyEntries || token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          state = SL_NORMAL;
+        }
+        else
+        {
+          if (delimiterNeighbours.find(line[i]) != std::string::npos)
+          {
+            if (token.size() > 0)
+              ++fallBackNeighbours;
+            else
+            {
+              i++;
+              continue;
+            }
+          }
+          else
+            fallBackNeighbours = 0;
+          token += line[i];       // EAT
+        }
+        break;
+      case SL_ESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_NORMAL;
+        break;
+      case SL_SAFEMODE:
+        if(line[i] == safemode_char)
+        {
+          state = SL_NORMAL;
+        }
+        else if(line[i] == escape_char)
+        {
+          state = SL_SAFEESCAPE;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      case SL_SAFEESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_SAFEMODE;
+        break;
+
+      case SL_PARENTHESES:
+        if(line[i] == closeparenthesis_char)
+        {
+          state = SL_NORMAL;
+        }
+        else if(line[i] == escape_char)
+        {
+          state = SL_PARENTHESESESCAPE;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      case SL_PARENTHESESESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_PARENTHESES;
+        break;
+
+      case SL_COMMENT:
+        if(line[i] == '\n')
+        {
+          /// FINISH
+          if(token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          state = SL_NORMAL;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      default:
+        // nothing
+        break;
+    }
+    i++;
+  }
+
+  /// FINISH
+  if (fallBackNeighbours > 0)
+    token = token.substr(0, token.size() - fallBackNeighbours);
+  if(emptyEntries || token.size() > 0)
+  {
+    ret.push_back(token);
+    token.clear();
+  }
+  return(state);
+}
+
+
+/**
+ * @brief Some nice debug information about this SubString
+ */
+void SubString::debug() const
+{
+  printf("Substring-information::count=%d ::", this->strings.size());
+  for (unsigned int i = 0; i < this->strings.size(); i++)
+    printf("s%d='%s'::", i, this->strings[i].c_str());
+  printf("\n");
+}
Index: code/trunk/src/util/SubString.h
===================================================================
--- code/trunk/src/util/SubString.h	(revision 871)
+++ code/trunk/src/util/SubString.h	(revision 871)
@@ -0,0 +1,161 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christian Meyer
+ *   Co-authors:
+ *      Benjamin Grauer
+ *      Fabian 'x3n' Landau
+ *
+
+//  splitLine
+//  STL string tokenizer
+//
+//  Created by Clemens Wacha.
+//  Version 1.0
+//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
+
+ * Extended by Fabian 'x3n' Landau with the SL_PARENTHESES mode.
+ */
+
+ /*!
+ * @file substring.h
+ * @brief a small class to get the parts of a string separated by commas
+ *
+ * This class is also identified as a Tokenizer. It splits up one long
+ * String into multiple small ones by a designated Delimiter.
+ *
+ * Substring is Advanced, and it is possible, to split a string by ','
+ * but also removing leading and trailing spaces around the comma.
+ *
+ * @example
+ * Split the String std::string st = "1345, The new empire   , is , orxonox"
+ * is splitted with:
+ * SubString(st, ',', " \n\t")
+ * into
+ * "1345", "The new empire", "is", "orxonox"
+ * As you can see, the useless spaces around ',' were removed.
+ */
+
+#ifndef __SUBSTRING_H__
+#define __SUBSTRING_H__
+
+#include <vector>
+#include <string>
+
+#include "UtilPrereqs.h"
+
+//! A class that can load one string and split it in multipe ones
+/**
+ * SubString is a very Powerfull way to create a SubSet from a String
+ * It can be used, to Split strings append them and join them again.
+ */
+class _UtilExport SubString
+{
+public:
+  //! An enumerator for the State the Parser is in
+  typedef enum {
+    SL_NORMAL,            //!< Normal state
+    SL_ESCAPE,            //!< After an escape character
+    SL_SAFEMODE,          //!< In safe mode (between "" mostly).
+    SL_SAFEESCAPE,        //!< In safe mode with the internal escape character, that escapes even the savemode character.
+    SL_COMMENT,           //!< In Comment mode.
+    SL_PARENTHESES,       //!< Between parentheses (usually '(' and ')')
+    SL_PARENTHESESESCAPE, //!< Between parentheses with the internal escape character, that escapes even the closing paranthesis character.
+  } SPLIT_LINE_STATE;
+
+
+public:
+  SubString();
+  SubString(const std::string& string, char delimiter = ',');
+  SubString(const std::string& string,
+            const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries=false,
+            char escapeChar ='\\', char safemode_char = '"', char openparenthesis_char = '(', char closeparenthesis_char = ')', char comment_char = '\0');
+  SubString(unsigned int argc, const char** argv);
+  /** @brief create a Substring as a copy of another one. @param subString the SubString to copy. */
+  SubString(const SubString& subString) { *this = subString; };
+  SubString(const SubString& subString, unsigned int subSetBegin);
+  SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd);
+  ~SubString();
+
+  // operate on the SubString
+  SubString& operator=(const SubString& subString);
+  bool operator==(const SubString& subString) const;
+  bool compare(const SubString& subString) const;
+  bool compare(const SubString& subString, unsigned int length) const;
+  SubString operator+(const SubString& subString) const;
+  SubString& operator+=(const SubString& subString);
+  /** @param subString the String to append @returns appended String. @brief added for convenience */
+  SubString& append(const SubString subString) { return (*this += subString); };
+
+  /////////////////////////////////////////
+  // Split and Join the any String. ///////
+  unsigned int split(const std::string& string = "", char delimiter = ',');
+  unsigned int split(const std::string& string,
+                     const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries = false,
+                     char escapeChar ='\\', char safemode_char = '"', char openparenthesis_char = '(', char closeparenthesis_char = ')', char comment_char = '\0');
+  std::string join(const std::string& delimiter = " ") const;
+  ////////////////////////////////////////
+
+  // retrieve a SubSet from the String
+  SubString subSet(unsigned int subSetBegin) const;
+  SubString subSet(unsigned int subSetBegin, unsigned int subSetEnd) const;
+
+  // retrieve Information from within
+  /** @returns true if the SubString is empty */
+  inline bool empty() const { return this->strings.empty(); };
+  /** @returns the count of Strings stored in this substring */
+  inline unsigned int size() const { return this->strings.size(); };
+  /** @param i the i'th String @returns the i'th string from the subset of Strings */
+  inline const std::string& operator[](unsigned int i) const { return this->strings[i]; };
+  /** @param i the i'th String @returns the i'th string from the subset of Strings */
+  inline const std::string& getString(unsigned int i) const { return (*this)[i]; };
+  /** @returns the front of the StringList. */
+  inline const std::string& front() const { return this->strings.front(); };
+  /** @returns the back of the StringList. */
+  inline const std::string& back() const { return this->strings.back(); };
+  /** @brief removes the back of the strings list. */
+  inline void pop_back() { this->strings.pop_back(); };
+
+  // the almighty algorithm.
+  static SPLIT_LINE_STATE splitLine(std::vector<std::string>& ret,
+                                    const std::string& line,
+                                    const std::string& delimiters = SubString::WhiteSpaces,
+                                    const std::string& delimiterNeighbours = "",
+                                    bool emptyEntries = false,
+                                    char escape_char = '\\',
+                                    char safemode_char = '"',
+                                    char openparenthesis_char = '(',
+                                    char closeparenthesis_char = ')',
+                                    char comment_char = '\0',
+                                    SPLIT_LINE_STATE start_state = SL_NORMAL);
+  // debugging.
+  void debug() const;
+
+public:
+  static const std::string WhiteSpaces;
+  static const std::string WhiteSpacesWithComma;
+  static const SubString   NullSubString;
+
+private:
+  std::vector<std::string>  strings;                      //!< strings produced from a single string splitted in multiple strings
+};
+
+#endif /* __SUBSTRING_H__ */
Index: code/trunk/src/util/UtilPrereqs.h
===================================================================
--- code/trunk/src/util/UtilPrereqs.h	(revision 871)
+++ code/trunk/src/util/UtilPrereqs.h	(revision 871)
@@ -0,0 +1,71 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+/**
+ @file  UtilPrereq.h
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _UtilPrereqs_H__
+#define _UtilPrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( UTIL_STATIC_BUILD )
+#  ifdef UTIL_SHARED_BUILD
+#    define _UtilExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _UtilExport
+#    else
+#      define _UtilExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _UtilExport  __attribute__ ((visibility("default")))
+#else
+#  define _UtilExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+class Convert;
+template <typename FromType, typename ToType>
+class Converter;
+class MultiTypePrimitive;
+class MultiTypeString;
+class MultiTypeMath;
+template <class T>
+class String2Number;
+class SubString;
+
+#endif /* _UtilPrereqs_H__ */
Index: code/trunk/src/util/XMLIncludes.h
===================================================================
--- code/trunk/src/util/XMLIncludes.h	(revision 871)
+++ code/trunk/src/util/XMLIncludes.h	(revision 871)
@@ -0,0 +1,12 @@
+#include "util/tinyxml/TinyXMLPrereqs.h"
+
+namespace orxonox
+{
+    typedef ticpp::Document Document;
+    typedef ticpp::Element Element;
+    typedef ticpp::Declaration Declaration;
+    typedef ticpp::StylesheetReference StylesheetReference;
+    typedef ticpp::Text Text;
+    typedef ticpp::Comment Comment;
+    typedef ticpp::Attribute Attribute;
+}
Index: code/trunk/src/util/substring.cc
===================================================================
--- code/trunk/src/util/substring.cc	(revision 790)
+++ 	(revision )
@@ -1,466 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Christian Meyer
- *   Co-authors:
- *      Benjamin Grauer
- *
-//
-//  splitLine
-//  STL string tokenizer
-//
-//  Created by Clemens Wacha.
-//  Version 1.0
-//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
-//
- */
-
-#include "substring.h"
-
-/**
- * @brief default constructor
- */
-SubString::SubString()
-{}
-
-
-/**
- * @brief create a SubString from
- * @param string the String to Spilit
- * @param delimiter the Character at which to split string (delimiter)
- */
-SubString::SubString(const std::string& string, char delimiter)
-{
-  this->split(string, delimiter);
-}
-
-
-/**
- * @brief Splits a String into multiple splitters.
- * @param string the String to split
- * @param delimiters multiple set of characters at what to split. (delimiters)
- * @param delimiterNeighbours neighbours of the delimiters, that will be erased only when near a delimiter.
- * @param emptyEntries If empty entries should be allewed or removed.
- * @param escapeChar The Escape Character that overrides splitters commends and so on...
- * @param safemode_char within these characters splitting won't happen
- * @param comment_char the Comment character.
- */
-SubString::SubString(const std::string& string,
-                     const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
-                     char escapeChar, char safemode_char, char comment_char)
-{
-  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, comment_char);
-}
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subString the SubString to take a set from.
- * @param subSetBegin the beginning to the end
- */
-SubString::SubString(const SubString& subString, unsigned int subSetBegin)
-{
-  for (unsigned int i = subSetBegin; i < subString.size(); i++)
-    this->strings.push_back(subString[i]);
-}
-
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subString the SubString to take a Set from
- * @param subSetBegin the beginning to the end
- * @param subSetEnd the end of the SubSet (max subString.size() will be checked internaly)
- */
-SubString::SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd)
-{
-  for (unsigned int i = subSetBegin; i < subString.size() || i < subSetEnd; i++)
-    this->strings.push_back(subString[i]);
-}
-
-/**
- * @brief creates a Substring from a count and values set.
- * @param argc: the Arguments Count.
- * @param argv: Argument Values.
- */
-SubString::SubString(unsigned int argc, const char** argv)
-{
-  for(unsigned int i = 0; i < argc; ++i)
-    this->strings.push_back(std::string(argv[i]));
-}
-
-/**
- * @brief removes the object from memory
- */
-SubString::~SubString()
-{ }
-
-/** @brief An empty String */
-// const std::string SubString::emptyString = "";
-/** @brief Helper that gets you a String consisting of all White Spaces */
-const std::string SubString::WhiteSpaces = " \n\t";
-/** @brief Helper that gets you a String consisting of all WhiteSpaces and the Comma */
-const std::string SubString::WhiteSpacesWithComma = " \n\t,";
-/** An Empty SubString */
-const SubString SubString::NullSubString = SubString();
-
-/**
- * @brief stores the Value of subString in this SubString
- * @param subString will be copied into this String.
- * @returns this SubString.
- */
-SubString& SubString::operator=(const SubString& subString)
-{
-  this->strings = subString.strings;
-  return *this;
-}
-
-
-/**
- * @brief comparator.
- * @param subString the SubString to compare against this one.
- * @returns true if the Stored Strings match
- */
-bool SubString::operator==(const SubString& subString) const
-{
-  return (this->strings == subString.strings);
-}
-
-/**
- * @brief comparator.
- * @param subString the SubString to compare against this one.
- * @returns true if the Stored Strings match
- */
-bool SubString::compare(const SubString& subString) const
-{
-  return (*this == subString);
-}
-
-/**
- * @brief comparator.
- * @param subString the SubString to compare against this one.
- * @param length how many entries to compare. (from 0 to length)
- * @returns true if the Stored Strings match
- */
-bool SubString::compare(const SubString& subString, unsigned int length) const
-{
-  if (length > this->size() || length > subString.size())
-    return false;
-
-  for (unsigned int i = 0; i < length; i++)
-    if (this->strings[i] != subString.strings[i])
-      return false;
-  return true;
-}
-
-
-/**
- * @brief append operator
- * @param subString the String to append.
- * @returns a SubString where this and subString are appended.
- */
-SubString SubString::operator+(const SubString& subString) const
-{
-  return SubString(*this) += subString;
-}
-
-
-/**
- * @brief append operator.
- * @param subString append subString to this SubString.
- * @returns this substring appended with subString
- */
-SubString& SubString::operator+=(const SubString& subString)
-{
-  for (unsigned int i = 0; i < subString.size(); i++)
-    this->strings.push_back(subString[i]);
-  return *this;
-}
-
-
-/**
- * @brief Split the String at
- * @param string where to split
- * @param splitter delimiter.
- */
-unsigned int SubString::split(const std::string& string, char splitter)
-{
-  this->strings.clear();
-  char split[2];
-  split[0] = splitter;
-  split[1] = '\0';
-  SubString::splitLine(this->strings, string, split);
-  return strings.size();
-}
-
-
-/**
- * @brief Splits a String into multiple splitters.
- * @param string the String to split
- * @param delimiters multiple set of characters at what to split. (delimiters)
- * @param delimiterNeighbours: Neighbours to the Delimiters that will be erased too.
- * @param emptyEntries: If empty entries are added to the List of SubStrings
- * @param escapeChar The Escape Character that overrides splitters commends and so on...
- * @param safemode_char within these characters splitting won't happen
- * @param comment_char the Comment character.
- */
-unsigned int SubString::split(const std::string& string,
-                              const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
-                              char escapeChar,char safemode_char, char comment_char)
-{
-  this->strings.clear();
-  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, comment_char);
-  return this->strings.size();
-}
-
-
-/**
- * @brief joins together all Strings of this Substring.
- * @param delimiter the String between the subStrings.
- * @returns the joined String.
- */
-std::string SubString::join(const std::string& delimiter) const
-{
-  if (!this->strings.empty())
-  {
-    std::string retVal = this->strings[0];
-    for (unsigned int i = 1; i < this->strings.size(); i++)
-      retVal += delimiter + this->strings[i];
-    return retVal;
-  }
-  else
-  {
-    static std::string empty;
-    return empty;
-  }
-}
-
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subSetBegin the beginning to the end
- * @returns the SubSet
- *
- * This function is added for your convenience, and does the same as
- * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
- */
-SubString SubString::subSet(unsigned int subSetBegin) const
-{
-  return SubString(*this, subSetBegin);
-}
-
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subSetBegin the beginning to
- * @param subSetEnd the end of the SubSet to select (if bigger than subString.size() it will be downset.)
- * @returns the SubSet
- *
- * This function is added for your convenience, and does the same as
- * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
- */
-SubString SubString::subSet(unsigned int subSetBegin, unsigned int subSetEnd) const
-{
-  return SubString(*this, subSetBegin, subSetEnd);
-}
-
-
-/**
- * @brief splits line into tokens and stores them in ret.
- * @param ret the Array, where the Splitted strings will be stored in
- * to the beginning of the current token is stored
- * @param line the inputLine to split
- * @param delimiters a String of Delimiters (here the input will be splitted)
- * @param delimiterNeighbours Naighbours to the Delimitter, that will be removed if they are to the left or the right of a Delimiter.
- * @param emptyEntries: if empty Strings are added to the List of Strings.
- * @param escape_char: Escape carater (escapes splitters)
- * @param safemode_char: the beginning of the safemode is marked with this
- * @param comment_char: the beginning of a comment is marked with this: (until the end of a Line)
- * @param start_state: the Initial state on how to parse the String.
- * @returns SPLIT_LINE_STATE the parser was in when returning
- *
- * This is the Actual Splitting Algorithm from Clemens Wacha
- * Supports delimiters, escape characters,
- * ignores special  characters between safemode_char and between comment_char and linend '\n'.
- */
-SubString::SPLIT_LINE_STATE
-SubString::splitLine(std::vector<std::string>& ret,
-                     const std::string& line,
-                     const std::string& delimiters,
-                     const std::string& delimiterNeighbours,
-                     bool emptyEntries,
-                     char escape_char,
-                     char safemode_char,
-                     char comment_char,
-                     SPLIT_LINE_STATE start_state)
-{
-  SPLIT_LINE_STATE state = start_state;
-  unsigned int i = 0;
-  unsigned int fallBackNeighbours = 0;
-
-  std::string token;
-
-  if(start_state != SL_NORMAL && ret.size() > 0)
-  {
-    token = ret[ret.size()-1];
-    ret.pop_back();
-  }
-
-  while(i < line.size())
-  {
-    switch(state)
-    {
-      case SL_NORMAL:
-        if(line[i] == escape_char)
-        {
-          state = SL_ESCAPE;
-        }
-        else if(line[i] == safemode_char)
-        {
-          state = SL_SAFEMODE;
-        }
-        else if(line[i] == comment_char)
-        {
-          if (fallBackNeighbours > 0)
-            token = token.substr(0, token.size() - fallBackNeighbours);
-          /// FINISH
-          if(emptyEntries || token.size() > 0)
-          {
-            ret.push_back(token);
-            token.clear();
-          }
-          token += line[i];       // EAT
-          state = SL_COMMENT;
-        }
-        else if(delimiters.find(line[i]) != std::string::npos)
-        {
-          // line[i] is a delimiter
-          if (fallBackNeighbours > 0)
-            token = token.substr(0, token.size() - fallBackNeighbours);
-          /// FINISH
-          if(emptyEntries || token.size() > 0)
-          {
-            ret.push_back(token);
-            token.clear();
-          }
-          state = SL_NORMAL;
-        }
-        else
-        {
-          if (delimiterNeighbours.find(line[i]) != std::string::npos)
-          {
-            if (token.size() > 0)
-              ++fallBackNeighbours;
-            else
-            {
-              i++;
-              continue;
-            }
-          }
-          else
-            fallBackNeighbours = 0;
-          token += line[i];       // EAT
-        }
-        break;
-      case SL_ESCAPE:
-        if(line[i] == 'n') token += '\n';
-        else if(line[i] == 't') token += '\t';
-        else if(line[i] == 'v') token += '\v';
-        else if(line[i] == 'b') token += '\b';
-        else if(line[i] == 'r') token += '\r';
-        else if(line[i] == 'f') token += '\f';
-        else if(line[i] == 'a') token += '\a';
-        else if(line[i] == '?') token += '\?';
-        else token += line[i];  // EAT
-        state = SL_NORMAL;
-        break;
-      case SL_SAFEMODE:
-        if(line[i] == safemode_char)
-        {
-          state = SL_NORMAL;
-        }
-        else if(line[i] == escape_char)
-        {
-          state = SL_SAFEESCAPE;
-        }
-        else
-        {
-          token += line[i];       // EAT
-        }
-        break;
-
-      case SL_SAFEESCAPE:
-        if(line[i] == 'n') token += '\n';
-        else if(line[i] == 't') token += '\t';
-        else if(line[i] == 'v') token += '\v';
-        else if(line[i] == 'b') token += '\b';
-        else if(line[i] == 'r') token += '\r';
-        else if(line[i] == 'f') token += '\f';
-        else if(line[i] == 'a') token += '\a';
-        else if(line[i] == '?') token += '\?';
-        else token += line[i];  // EAT
-        state = SL_SAFEMODE;
-        break;
-
-      case SL_COMMENT:
-        if(line[i] == '\n')
-        {
-          /// FINISH
-          if(token.size() > 0)
-          {
-            ret.push_back(token);
-            token.clear();
-          }
-          state = SL_NORMAL;
-        }
-        else
-        {
-          token += line[i];       // EAT
-        }
-        break;
-
-      default:
-        // nothing
-        break;
-    }
-    i++;
-  }
-
-  /// FINISH
-  if (fallBackNeighbours > 0)
-    token = token.substr(0, token.size() - fallBackNeighbours);
-  if(emptyEntries || token.size() > 0)
-  {
-    ret.push_back(token);
-    token.clear();
-  }
-  return(state);
-}
-
-
-/**
- * @brief Some nice debug information about this SubString
- */
-void SubString::debug() const
-{
-  printf("Substring-information::count=%d ::", this->strings.size());
-  for (unsigned int i = 0; i < this->strings.size(); i++)
-    printf("s%d='%s'::", i, this->strings[i].c_str());
-  printf("\n");
-}
Index: code/trunk/src/util/substring.h
===================================================================
--- code/trunk/src/util/substring.h	(revision 790)
+++ 	(revision )
@@ -1,154 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Christian Meyer
- *   Co-authors:
- *      Benjamin Grauer
- *
-//
-//  splitLine
-//  STL string tokenizer
-//
-//  Created by Clemens Wacha.
-//  Version 1.0
-//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
-//
- */
-
- /*!
- * @file substring.h
- * @brief a small class to get the parts of a string separated by commas
- *
- * This class is also identified as a Tokenizer. It splits up one long
- * String into multiple small ones by a designated Delimiter.
- *
- * Substring is Advanced, and it is possible, to split a string by ','
- * but also removing leading and trailing spaces around the comma.
- *
- * @example
- * Split the String std::string st = "1345, The new empire   , is , orxonox"
- * is splitted with:
- * SubString(st, ',', " \n\t")
- * into
- * "1345", "The new empire", "is", "orxonox"
- * As you can see, the useless spaces around ',' were removed.
- */
-
-#ifndef __SUBSTRING_H__
-#define __SUBSTRING_H__
-
-#include <vector>
-#include <string>
-
-
-//! A class that can load one string and split it in multipe ones
-/**
- * SubString is a very Powerfull way to create a SubSet from a String
- * It can be used, to Split strings append them and join them again.
- */
-class SubString
-{
-public:
-  //! An enumerator for the State the Parser is in
-  typedef enum {
-    SL_NORMAL,            //!< Normal state
-    SL_ESCAPE,            //!< After an escape character
-    SL_SAFEMODE,          //!< In safe mode (between "" mostly).
-    SL_SAFEESCAPE,        //!< In safe mode with the internal escape character, that escapes even the savemode character.
-    SL_COMMENT,           //!< In Comment mode.
-  } SPLIT_LINE_STATE;
-
-
-public:
-  SubString();
-  SubString(const std::string& string, char delimiter = ',');
-  SubString(const std::string& string,
-            const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries=false,
-            char escapeChar ='\\', char safemode_char = '"', char comment_char = '\0');
-  SubString(unsigned int argc, const char** argv);
-  /** @brief create a Substring as a copy of another one. @param subString the SubString to copy. */
-  SubString(const SubString& subString) { *this = subString; };
-  SubString(const SubString& subString, unsigned int subSetBegin);
-  SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd);
-  ~SubString();
-
-  // operate on the SubString
-  SubString& operator=(const SubString& subString);
-  bool operator==(const SubString& subString) const;
-  bool compare(const SubString& subString) const;
-  bool compare(const SubString& subString, unsigned int length) const;
-  SubString operator+(const SubString& subString) const;
-  SubString& operator+=(const SubString& subString);
-  /** @param subString the String to append @returns appended String. @brief added for convenience */
-  SubString& append(const SubString subString) { return (*this += subString); };
-
-  /////////////////////////////////////////
-  // Split and Join the any String. ///////
-  unsigned int split(const std::string& string = "", char delimiter = ',');
-  unsigned int split(const std::string& string,
-                     const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries = false,
-                     char escapeChar ='\\', char safemode_char = '"', char comment_char = '\0');
-  std::string join(const std::string& delimiter = " ") const;
-  ////////////////////////////////////////
-
-  // retrieve a SubSet from the String
-  SubString subSet(unsigned int subSetBegin) const;
-  SubString subSet(unsigned int subSetBegin, unsigned int subSetEnd) const;
-
-  // retrieve Information from within
-  /** @returns true if the SubString is empty */
-  inline bool empty() const { return this->strings.empty(); };
-  /** @returns the count of Strings stored in this substring */
-  inline unsigned int size() const { return this->strings.size(); };
-  /** @param i the i'th String @returns the i'th string from the subset of Strings */
-  inline const std::string& operator[](unsigned int i) const { return this->strings[i]; };
-  /** @param i the i'th String @returns the i'th string from the subset of Strings */
-  inline const std::string& getString(unsigned int i) const { return (*this)[i]; };
-  /** @returns the front of the StringList. */
-  inline const std::string& front() const { return this->strings.front(); };
-  /** @returns the back of the StringList. */
-  inline const std::string& back() const { return this->strings.back(); };
-  /** @brief removes the back of the strings list. */
-  inline void pop_back() { this->strings.pop_back(); };
-
-  // the almighty algorithm.
-  static SPLIT_LINE_STATE splitLine(std::vector<std::string>& ret,
-                                    const std::string& line,
-                                    const std::string& delimiters = SubString::WhiteSpaces,
-                                    const std::string& delimiterNeighbours = "",
-                                    bool emptyEntries = false,
-                                    char escape_char = '\\',
-                                    char safemode_char = '"',
-                                    char comment_char = '\0',
-                                    SPLIT_LINE_STATE start_state = SL_NORMAL);
-  // debugging.
-  void debug() const;
-
-public:
-  static const std::string WhiteSpaces;
-  static const std::string WhiteSpacesWithComma;
-  static const SubString   NullSubString;
-
-private:
-  std::vector<std::string>  strings;                      //!< strings produced from a single string splitted in multiple strings
-};
-
-#endif /* __SUBSTRING_H__ */
Index: code/trunk/src/util/tinyxml/TinyXMLPrereqs.h
===================================================================
--- code/trunk/src/util/tinyxml/TinyXMLPrereqs.h	(revision 790)
+++ code/trunk/src/util/tinyxml/TinyXMLPrereqs.h	(revision 871)
@@ -73,3 +73,14 @@
 class TiXmlParsingData;
 
+namespace ticpp
+{
+    class Document;
+    class Element;
+    class Declaration;
+    class StylesheetReference;
+    class Text;
+    class Comment;
+    class Attribute;
+}
+
 #endif /* _TinyXMLPrereqs_H__ */
Index: code/trunk/src/util/tinyxml/ticpp.cc
===================================================================
--- code/trunk/src/util/tinyxml/ticpp.cc	(revision 790)
+++ code/trunk/src/util/tinyxml/ticpp.cc	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 http://code.google.com/p/ticpp/
Index: code/trunk/src/util/tinyxml/ticpp.h
===================================================================
--- code/trunk/src/util/tinyxml/ticpp.h	(revision 790)
+++ code/trunk/src/util/tinyxml/ticpp.h	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 http://code.google.com/p/ticpp/
Index: code/trunk/src/util/tinyxml/ticpprc.h
===================================================================
--- code/trunk/src/util/tinyxml/ticpprc.h	(revision 790)
+++ code/trunk/src/util/tinyxml/ticpprc.h	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 http://code.google.com/p/ticpp/
Index: code/trunk/src/util/tinyxml/tinyxml.h
===================================================================
--- code/trunk/src/util/tinyxml/tinyxml.h	(revision 790)
+++ code/trunk/src/util/tinyxml/tinyxml.h	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 www.sourceforge.net/projects/tinyxml
