Index: code/branches/core3/src/util/CMakeLists.txt
===================================================================
--- code/branches/core3/src/util/CMakeLists.txt	(revision 1610)
+++ code/branches/core3/src/util/CMakeLists.txt	(revision 1716)
@@ -5,7 +5,5 @@
   ExprParser.cc
   Math.cc
-  MultiTypePrimitive.cc
-  MultiTypeString.cc
-  MultiTypeMath.cc
+  MultiType.cc
   OutputBuffer.cc
   OutputHandler.cc
Index: code/branches/core3/src/util/Convert.h
===================================================================
--- code/branches/core3/src/util/Convert.h	(revision 1610)
+++ code/branches/core3/src/util/Convert.h	(revision 1716)
@@ -43,5 +43,5 @@
 #include "Debug.h"
 #include "SubString.h"
-#include "MultiTypeMath.h"
+//#include "MultiTypeMath.h"
 
 // disable annoying warning about forcing value to boolean
@@ -323,5 +323,5 @@
 // MULTITYPES //
 ////////////////
-
+/*
 // convert from MultiTypePrimitive
 template <class ToType>
@@ -403,5 +403,5 @@
     }
 };
-
+*/
 
 ////////////////////
Index: code/branches/core3/src/util/MultiType.cc
===================================================================
--- code/branches/core3/src/util/MultiType.cc	(revision 1716)
+++ code/branches/core3/src/util/MultiType.cc	(revision 1716)
@@ -0,0 +1,204 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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 "MultiType.h"
+#include "MultiTypeValue.h"
+/*
+int test()
+{
+    MultiType test1(10);
+
+//    test1.setValue(true);
+//    test1.setValue(10);
+//    test1.setValue<float>(10);
+
+//    orxonox::Vector3 test2;
+//    test1 = test2;
+
+    return 0;
+}
+
+int temp = test();
+*/
+void MultiType::setType(MT_Type type)
+{
+    switch (type)
+    {
+        case MT_char:
+            this->setType<char>(); break;
+        case MT_uchar:
+            this->setType<unsigned char>(); break;
+        case MT_short:
+            this->setType<short>(); break;
+        case MT_ushort:
+            this->setType<unsigned short>(); break;
+        case MT_int:
+            this->setType<int>(); break;
+        case MT_uint:
+            this->setType<unsigned int>(); break;
+        case MT_long:
+            this->setType<long>(); break;
+        case MT_ulong:
+            this->setType<unsigned long>(); break;
+        case MT_longlong:
+            this->setType<long long>(); break;
+        case MT_ulonglong:
+            this->setType<unsigned long long>(); break;
+        case MT_float:
+            this->setType<float>(); break;
+        case MT_double:
+            this->setType<double>(); break;
+        case MT_longdouble:
+            this->setType<long double>(); break;
+        case MT_bool:
+            this->setType<bool>(); break;
+        case MT_void:
+            this->setType<void*>(); break;
+        case MT_string:
+            this->setType<std::string>(); break;
+        case MT_vector2:
+            this->setType<orxonox::Vector2>(); break;
+        case MT_vector3:
+            this->setType<orxonox::Vector3>(); break;
+        case MT_vector4:
+            this->setType<orxonox::Vector4>(); break;
+        case MT_colourvalue:
+            this->setType<orxonox::ColourValue>(); break;
+        case MT_quaternion:
+            this->setType<orxonox::Quaternion>(); break;
+        case MT_radian:
+            this->setType<orxonox::Radian>(); break;
+        case MT_degree:
+            this->setType<orxonox::Degree>(); break;
+        default:
+            this->reset(); break;
+    };
+}
+
+std::string MultiType::getTypename() const
+{
+    switch (this->type_)
+    {
+        case MT_char:
+            return "char"; break;
+        case MT_uchar:
+            return "unsigned char"; break;
+        case MT_short:
+            return "short"; break;
+        case MT_ushort:
+            return "unsigned short"; break;
+        case MT_int:
+            return "int"; break;
+        case MT_uint:
+            return "unsigned int"; break;
+        case MT_long:
+            return "long"; break;
+        case MT_ulong:
+            return "unsigned long"; break;
+        case MT_longlong:
+            return "long long"; break;
+        case MT_ulonglong:
+            return "unsigned long long"; break;
+        case MT_float:
+            return "float"; break;
+        case MT_double:
+            return "double"; break;
+        case MT_longdouble:
+            return "long double"; break;
+        case MT_bool:
+            return "bool"; break;
+        case MT_void:
+            return "void*"; break;
+        case MT_string:
+            return "std::string"; break;
+        case MT_vector2:
+            return "orxonox::Vector2"; break;
+        case MT_vector3:
+            return "orxonox::Vector3"; break;
+        case MT_vector4:
+            return "orxonox::Vector4"; break;
+        case MT_colourvalue:
+            return "orxonox::ColourValue"; break;
+        case MT_quaternion:
+            return "orxonox::Quaternion"; break;
+        case MT_radian:
+            return "orxonox::Radian"; break;
+        case MT_degree:
+            return "orxonox::Degree"; break;
+        default:
+            return "unknown"; break;
+    };
+}
+
+MultiType::operator char()                 const { return (this->type_ == MT_char       ) ? ((MT_Value<char>                *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator unsigned char()        const { return (this->type_ == MT_uchar      ) ? ((MT_Value<unsigned char>       *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator short()                const { return (this->type_ == MT_short      ) ? ((MT_Value<short>               *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator unsigned short()       const { return (this->type_ == MT_ushort     ) ? ((MT_Value<unsigned short>      *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator int()                  const { return (this->type_ == MT_int        ) ? ((MT_Value<int>                 *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator unsigned int()         const { return (this->type_ == MT_uint       ) ? ((MT_Value<unsigned int>        *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator long()                 const { return (this->type_ == MT_long       ) ? ((MT_Value<long>                *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator unsigned long()        const { return (this->type_ == MT_ulong      ) ? ((MT_Value<unsigned long>       *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator long long()            const { return (this->type_ == MT_longlong   ) ? ((MT_Value<long long>           *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator unsigned long long()   const { return (this->type_ == MT_ulonglong  ) ? ((MT_Value<unsigned long long>  *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator float()                const { return (this->type_ == MT_float      ) ? ((MT_Value<float>               *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator double()               const { return (this->type_ == MT_double     ) ? ((MT_Value<double>              *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator long double()          const { return (this->type_ == MT_longdouble ) ? ((MT_Value<long double>         *)this->value_)->value_ : (this->value_) ? (*this->value_) : 0;                      }
+MultiType::operator bool()                 const { return (this->type_ == MT_bool       ) ? ((MT_Value<bool>                *)this->value_)->value_ : (this->value_) ? (*this->value_) : false;                  }
+MultiType::operator void*()                const { return (this->type_ == MT_void       ) ? ((MT_Value<void*>               *)this->value_)->value_ : (this->value_) ? (*this->value_) : (void*)0;               }
+MultiType::operator std::string()          const { return (this->type_ == MT_string     ) ? ((MT_Value<std::string>         *)this->value_)->value_ : (this->value_) ? (*this->value_) : std::string();          }
+MultiType::operator orxonox::Vector2()     const { return (this->type_ == MT_vector2    ) ? ((MT_Value<orxonox::Vector2>    *)this->value_)->value_ : (this->value_) ? (*this->value_) : orxonox::Vector2();     }
+MultiType::operator orxonox::Vector3()     const { return (this->type_ == MT_vector3    ) ? ((MT_Value<orxonox::Vector3>    *)this->value_)->value_ : (this->value_) ? (*this->value_) : orxonox::Vector3();     }
+MultiType::operator orxonox::Vector4()     const { return (this->type_ == MT_vector4    ) ? ((MT_Value<orxonox::Vector4>    *)this->value_)->value_ : (this->value_) ? (*this->value_) : orxonox::Vector4();     }
+MultiType::operator orxonox::ColourValue() const { return (this->type_ == MT_colourvalue) ? ((MT_Value<orxonox::ColourValue>*)this->value_)->value_ : (this->value_) ? (*this->value_) : orxonox::ColourValue(); }
+MultiType::operator orxonox::Quaternion()  const { return (this->type_ == MT_quaternion ) ? ((MT_Value<orxonox::Quaternion> *)this->value_)->value_ : (this->value_) ? (*this->value_) : orxonox::Quaternion();  }
+MultiType::operator orxonox::Radian()      const { return (this->type_ == MT_radian     ) ? ((MT_Value<orxonox::Radian>     *)this->value_)->value_ : (this->value_) ? (*this->value_) : orxonox::Radian();      }
+MultiType::operator orxonox::Degree()      const { return (this->type_ == MT_degree     ) ? ((MT_Value<orxonox::Degree>     *)this->value_)->value_ : (this->value_) ? (*this->value_) : orxonox::Degree();      }
+
+template <> void MultiType::createNewValueContainer(const char& value)                 { this->value_ = new MT_Value<char>                (value); }
+template <> void MultiType::createNewValueContainer(const unsigned char& value)        { this->value_ = new MT_Value<unsigned char>       (value); }
+template <> void MultiType::createNewValueContainer(const short& value)                { this->value_ = new MT_Value<short>               (value); }
+template <> void MultiType::createNewValueContainer(const unsigned short& value)       { this->value_ = new MT_Value<unsigned short>      (value); }
+template <> void MultiType::createNewValueContainer(const int& value)                  { this->value_ = new MT_Value<int>                 (value); }
+template <> void MultiType::createNewValueContainer(const unsigned int& value)         { this->value_ = new MT_Value<unsigned int>        (value); }
+template <> void MultiType::createNewValueContainer(const long& value)                 { this->value_ = new MT_Value<long>                (value); }
+template <> void MultiType::createNewValueContainer(const unsigned long& value)        { this->value_ = new MT_Value<unsigned long>       (value); }
+template <> void MultiType::createNewValueContainer(const long long& value)            { this->value_ = new MT_Value<long long>           (value); }
+template <> void MultiType::createNewValueContainer(const unsigned long long& value)   { this->value_ = new MT_Value<unsigned long long>  (value); }
+template <> void MultiType::createNewValueContainer(const float& value)                { this->value_ = new MT_Value<float>               (value); }
+template <> void MultiType::createNewValueContainer(const double& value)               { this->value_ = new MT_Value<double>              (value); }
+template <> void MultiType::createNewValueContainer(const long double& value)          { this->value_ = new MT_Value<long double>         (value); }
+template <> void MultiType::createNewValueContainer(const bool& value)                 { this->value_ = new MT_Value<bool>                (value); }
+template <> void MultiType::createNewValueContainer(      void* const& value)          { this->value_ = new MT_Value<void*>               (value); }
+template <> void MultiType::createNewValueContainer(const std::string& value)          { this->value_ = new MT_Value<std::string>         (value); }
+template <> void MultiType::createNewValueContainer(const orxonox::Vector2& value)     { this->value_ = new MT_Value<orxonox::Vector2>    (value); }
+template <> void MultiType::createNewValueContainer(const orxonox::Vector3& value)     { this->value_ = new MT_Value<orxonox::Vector3>    (value); }
+template <> void MultiType::createNewValueContainer(const orxonox::Vector4& value)     { this->value_ = new MT_Value<orxonox::Vector4>    (value); }
+template <> void MultiType::createNewValueContainer(const orxonox::ColourValue& value) { this->value_ = new MT_Value<orxonox::ColourValue>(value); }
+template <> void MultiType::createNewValueContainer(const orxonox::Quaternion& value)  { this->value_ = new MT_Value<orxonox::Quaternion> (value); }
+template <> void MultiType::createNewValueContainer(const orxonox::Radian& value)      { this->value_ = new MT_Value<orxonox::Radian>     (value); }
+template <> void MultiType::createNewValueContainer(const orxonox::Degree& value)      { this->value_ = new MT_Value<orxonox::Degree>     (value); }
Index: code/branches/core3/src/util/MultiType.h
===================================================================
--- code/branches/core3/src/util/MultiType.h	(revision 1610)
+++ code/branches/core3/src/util/MultiType.h	(revision 1716)
@@ -25,5 +25,4 @@
  *      ...
  *
- *   Inspiration: MultiType by Benjamin Grauer
  */
 
@@ -33,23 +32,33 @@
 #include "UtilPrereqs.h"
 
-enum _UtilExport MultiType
+#include <boost/static_assert.hpp>
+
+#include "Math.h"
+
+// disable annoying warning about multiple assignment operators
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#pragma warning(push)
+#pragma warning(disable:4522)
+#endif
+
+enum _UtilExport MT_Type
 {
     MT_null,
-    MT_void,
-    MT_int,
-    MT_uint,
     MT_char,
     MT_uchar,
     MT_short,
     MT_ushort,
+    MT_int,
+    MT_uint,
     MT_long,
     MT_ulong,
+    MT_longlong,
+    MT_ulonglong,
     MT_float,
     MT_double,
     MT_longdouble,
     MT_bool,
-    MT_constchar,
+    MT_void,
     MT_string,
-    MT_xmlelement,
     MT_vector2,
     MT_vector3,
@@ -57,24 +66,274 @@
     MT_colourvalue,
     MT_quaternion,
-    MT_degree,
-    MT_radian
+    MT_radian,
+    MT_degree
 };
 
-union _UtilExport MultiTypeValue
+class _UtilExport MultiType
 {
-    void*           void_;
-    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_;
+    friend std::ostream& operator<<(std::ostream& outstream, const MultiType& mt);
+
+    struct _UtilExport MT_ValueBase
+    {
+        virtual ~MT_ValueBase() {}
+
+        virtual MT_ValueBase* clone() const = 0;
+
+        virtual void setValue(const char& value)                 = 0;
+        virtual void setValue(const unsigned char& value)        = 0;
+        virtual void setValue(const short& value)                = 0;
+        virtual void setValue(const unsigned short& value)       = 0;
+        virtual void setValue(const int& value)                  = 0;
+        virtual void setValue(const unsigned int& value)         = 0;
+        virtual void setValue(const long& value)                 = 0;
+        virtual void setValue(const unsigned long& value)        = 0;
+        virtual void setValue(const long long& value)            = 0;
+        virtual void setValue(const unsigned long long& value)   = 0;
+        virtual void setValue(const float& value)                = 0;
+        virtual void setValue(const double& value)               = 0;
+        virtual void setValue(const long double& value)          = 0;
+        virtual void setValue(const bool& value)                 = 0;
+        virtual void setValue(      void* const& value)          = 0;
+        virtual void setValue(const std::string& value)          = 0;
+        virtual void setValue(const orxonox::Vector2& value)     = 0;
+        virtual void setValue(const orxonox::Vector3& value)     = 0;
+        virtual void setValue(const orxonox::Vector4& value)     = 0;
+        virtual void setValue(const orxonox::ColourValue& value) = 0;
+        virtual void setValue(const orxonox::Quaternion& value)  = 0;
+        virtual void setValue(const orxonox::Radian& value)      = 0;
+        virtual void setValue(const orxonox::Degree& value)      = 0;
+
+        virtual operator char()                 const = 0;
+        virtual operator unsigned char()        const = 0;
+        virtual operator short()                const = 0;
+        virtual operator unsigned short()       const = 0;
+        virtual operator int()                  const = 0;
+        virtual operator unsigned int()         const = 0;
+        virtual operator long()                 const = 0;
+        virtual operator unsigned long()        const = 0;
+        virtual operator long long()            const = 0;
+        virtual operator unsigned long long()   const = 0;
+        virtual operator float()                const = 0;
+        virtual operator double()               const = 0;
+        virtual operator long double()          const = 0;
+        virtual operator bool()                 const = 0;
+        virtual operator void*()                const = 0;
+        virtual operator std::string()          const = 0;
+        virtual operator orxonox::Vector2()     const = 0;
+        virtual operator orxonox::Vector3()     const = 0;
+        virtual operator orxonox::Vector4()     const = 0;
+        virtual operator orxonox::ColourValue() const = 0;
+        virtual operator orxonox::Quaternion()  const = 0;
+        virtual operator orxonox::Radian()      const = 0;
+        virtual operator orxonox::Degree()      const = 0;
+
+        virtual void toString(std::ostream& outstream) const = 0;
+    };
+
+    public:
+        inline                       MultiType()                       : value_(0), type_(MT_null) {}
+        template <typename V> inline MultiType(const V& value)         : value_(0), type_(MT_null) { this->assignValue(value); }
+        inline                       MultiType(const MultiType& other) : value_(0), type_(MT_null) { this->setValue(other); }
+        inline                       MultiType(MT_Type type)           : value_(0), type_(MT_null) { this->setType(type); }
+        ~MultiType() { if (this->value_) { delete this->value_; } }
+
+        template <typename V>             inline MultiType& operator=(const V& value)         { this->setValue(value);          return (*this); }
+        template <typename T, typename V> inline MultiType& operator=(const V& value)         { this->assignValue((T)value);    return (*this); }
+        inline                                   MultiType& operator=(const MultiType& other) { this->setValue(other);          return (*this); }
+        inline                                   MultiType& operator=(MT_Type type)           { this->setType(type);            return (*this); }
+
+        template <typename V> inline void             setValue(const V& value)         { if (this->value_) { this->value_->setValue(value); } else { this->createNewValueContainer(value); } }
+        template <typename V> inline void             setValue(V* value)               { if (this->value_) { this->value_->setValue((void*)value); } else { this->createNewValueContainer((void*)value); } }
+        inline void                                   setValue(const char* value);
+        inline void                                   setValue(const MultiType& other) { this->type_ = other.type_; this->value_ = (other.value_) ? other.value_->clone() : 0; }
+        template <typename T, typename V> inline void setValue(const V& value)         { this->assignValue((T)value); }
+
+        template <typename T> inline void convert() { this->setValue<T>(this->operator T()); }
+
+        inline void                       reset() { if (this->value_) { delete this->value_; this->value_ = 0; } this->type_ = MT_null; }
+
+        template <typename T> inline void setType()                       { this->assignValue(T()); }
+        inline void                       setType(const MultiType& other) { this->setType(other.type_); }
+        void                              setType(MT_Type type);
+
+        operator char()                  const;
+        operator unsigned char()         const;
+        operator short()                 const;
+        operator unsigned short()        const;
+        operator int()                   const;
+        operator unsigned int()          const;
+        operator long()                  const;
+        operator unsigned long()         const;
+        operator long long()             const;
+        operator unsigned long long()    const;
+        operator float()                 const;
+        operator double()                const;
+        operator long double()           const;
+        operator bool()                  const;
+        operator void*()                 const;
+        operator std::string()           const;
+        operator orxonox::Vector2()      const;
+        operator orxonox::Vector3()      const;
+        operator orxonox::Vector4()      const;
+        operator orxonox::ColourValue()  const;
+        operator orxonox::Quaternion()   const;
+        operator orxonox::Radian()       const;
+        operator orxonox::Degree()       const;
+        template <class T> operator T*() const { return ((T*)this->operator void*()); }
+
+        inline void getValue(char*                 value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(unsigned char*        value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(short*                value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(unsigned short*       value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(int*                  value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(unsigned int*         value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(long*                 value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(unsigned long*        value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(long long*            value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(unsigned long long*   value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(float*                value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(double*               value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(long double*          value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(bool*                 value) const { if (this->value_) { (*value) = (*this->value_); } }
+        inline void getValue(void*                 value) const { if (this->value_) {   value  = (*this->value_); } }
+        inline void getValue(std::string*          value) const { if (this->value_) { (*value) = this->value_->operator std::string();          } }
+        inline void getValue(orxonox::Vector2*     value) const { if (this->value_) { (*value) = this->value_->operator orxonox::Vector2();     } }
+        inline void getValue(orxonox::Vector3*     value) const { if (this->value_) { (*value) = this->value_->operator orxonox::Vector3();     } }
+        inline void getValue(orxonox::Vector4*     value) const { if (this->value_) { (*value) = this->value_->operator orxonox::Vector4();     } }
+        inline void getValue(orxonox::ColourValue* value) const { if (this->value_) { (*value) = this->value_->operator orxonox::ColourValue(); } }
+        inline void getValue(orxonox::Quaternion*  value) const { if (this->value_) { (*value) = this->value_->operator orxonox::Quaternion();  } }
+        inline void getValue(orxonox::Radian*      value) const { if (this->value_) { (*value) = this->value_->operator orxonox::Radian();      } }
+        inline void getValue(orxonox::Degree*      value) const { if (this->value_) { (*value) = this->value_->operator orxonox::Degree();      } }
+
+        inline MT_Type                    getType()            const { return this->type_; }
+        inline bool                       isType(MT_Type type) const { return (this->type_ == type); }
+        template <typename T> inline bool isType()             const { return false; }
+        std::string                       getTypename()        const;
+
+        inline std::string toString() const { return this->operator std::string(); }
+
+    private:
+        inline void assignValue(const char& value)                 { if (this->value_ && this->type_ == MT_char)        { this->value_->setValue(value); } else { this->changeValueContainer<char>(value);                 this->type_ = MT_char;        } }
+        inline void assignValue(const unsigned char& value)        { if (this->value_ && this->type_ == MT_uchar)       { this->value_->setValue(value); } else { this->changeValueContainer<unsigned char>(value);        this->type_ = MT_uchar;       } }
+        inline void assignValue(const short& value)                { if (this->value_ && this->type_ == MT_short)       { this->value_->setValue(value); } else { this->changeValueContainer<short>(value);                this->type_ = MT_short;       } }
+        inline void assignValue(const unsigned short& value)       { if (this->value_ && this->type_ == MT_ushort)      { this->value_->setValue(value); } else { this->changeValueContainer<unsigned short>(value);       this->type_ = MT_ushort;      } }
+        inline void assignValue(const int& value)                  { if (this->value_ && this->type_ == MT_int)         { this->value_->setValue(value); } else { this->changeValueContainer<int>(value);                  this->type_ = MT_int;         } }
+        inline void assignValue(const unsigned int& value)         { if (this->value_ && this->type_ == MT_uint)        { this->value_->setValue(value); } else { this->changeValueContainer<unsigned int>(value);         this->type_ = MT_uint;        } }
+        inline void assignValue(const long& value)                 { if (this->value_ && this->type_ == MT_long)        { this->value_->setValue(value); } else { this->changeValueContainer<long>(value);                 this->type_ = MT_long;        } }
+        inline void assignValue(const unsigned long& value)        { if (this->value_ && this->type_ == MT_ulong)       { this->value_->setValue(value); } else { this->changeValueContainer<unsigned long>(value);        this->type_ = MT_ulong;       } }
+        inline void assignValue(const long long& value)            { if (this->value_ && this->type_ == MT_longlong)    { this->value_->setValue(value); } else { this->changeValueContainer<long long>(value);            this->type_ = MT_longlong;    } }
+        inline void assignValue(const unsigned long long& value)   { if (this->value_ && this->type_ == MT_ulonglong)   { this->value_->setValue(value); } else { this->changeValueContainer<unsigned long long>(value);   this->type_ = MT_ulonglong;   } }
+        inline void assignValue(const float& value)                { if (this->value_ && this->type_ == MT_float)       { this->value_->setValue(value); } else { this->changeValueContainer<float>(value);                this->type_ = MT_float;       } }
+        inline void assignValue(const double& value)               { if (this->value_ && this->type_ == MT_double)      { this->value_->setValue(value); } else { this->changeValueContainer<double>(value);               this->type_ = MT_double;      } }
+        inline void assignValue(const long double& value)          { if (this->value_ && this->type_ == MT_longdouble)  { this->value_->setValue(value); } else { this->changeValueContainer<long double>(value);          this->type_ = MT_longdouble;  } }
+        inline void assignValue(const bool& value)                 { if (this->value_ && this->type_ == MT_bool)        { this->value_->setValue(value); } else { this->changeValueContainer<bool>(value);                 this->type_ = MT_bool;        } }
+        inline void assignValue(      void* const& value)          { if (this->value_ && this->type_ == MT_void)        { this->value_->setValue(value); } else { this->changeValueContainer<void*>(value);                this->type_ = MT_void;        } }
+        inline void assignValue(const std::string& value)          { if (this->value_ && this->type_ == MT_string)      { this->value_->setValue(value); } else { this->changeValueContainer<std::string>(value);          this->type_ = MT_string;      } }
+        inline void assignValue(const orxonox::Vector2& value)     { if (this->value_ && this->type_ == MT_vector2)     { this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector2>(value);     this->type_ = MT_vector2;     } }
+        inline void assignValue(const orxonox::Vector3& value)     { if (this->value_ && this->type_ == MT_vector3)     { this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector3>(value);     this->type_ = MT_vector3;     } }
+        inline void assignValue(const orxonox::Vector4& value)     { if (this->value_ && this->type_ == MT_vector4)     { this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector4>(value);     this->type_ = MT_vector4;     } }
+        inline void assignValue(const orxonox::ColourValue& value) { if (this->value_ && this->type_ == MT_colourvalue) { this->value_->setValue(value); } else { this->changeValueContainer<orxonox::ColourValue>(value); this->type_ = MT_colourvalue; } }
+        inline void assignValue(const orxonox::Quaternion& value)  { if (this->value_ && this->type_ == MT_quaternion)  { this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Quaternion>(value);  this->type_ = MT_quaternion;  } }
+        inline void assignValue(const orxonox::Radian& value)      { if (this->value_ && this->type_ == MT_radian)      { this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Radian>(value);      this->type_ = MT_radian;      } }
+        inline void assignValue(const orxonox::Degree& value)      { if (this->value_ && this->type_ == MT_degree)      { this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Degree>(value);      this->type_ = MT_degree;      } }
+        template <typename T> inline void changeValueContainer(const T& value) { if (this->value_) { delete this->value_; } this->createNewValueContainer<T>(value); }
+        template <typename T>        void createNewValueContainer(const T& value) { BOOST_STATIC_ASSERT(sizeof(T) == 0); }
+
+        MT_ValueBase* value_;
+        MT_Type type_;
 };
 
+_UtilExport inline std::ostream& operator<<(std::ostream& outstream, const MultiType& mt) { if (mt.value_) { mt.value_->toString(outstream); } return outstream; }
+
+template <> inline bool MultiType::isType<char>()                 const { return (this->type_ == MT_char);        }
+template <> inline bool MultiType::isType<unsigned char>()        const { return (this->type_ == MT_uchar);       }
+template <> inline bool MultiType::isType<short>()                const { return (this->type_ == MT_short);       }
+template <> inline bool MultiType::isType<unsigned short>()       const { return (this->type_ == MT_ushort);      }
+template <> inline bool MultiType::isType<int>()                  const { return (this->type_ == MT_int);         }
+template <> inline bool MultiType::isType<unsigned int>()         const { return (this->type_ == MT_uint);        }
+template <> inline bool MultiType::isType<long>()                 const { return (this->type_ == MT_long);        }
+template <> inline bool MultiType::isType<unsigned long>()        const { return (this->type_ == MT_ulong);       }
+template <> inline bool MultiType::isType<long long>()            const { return (this->type_ == MT_longlong);    }
+template <> inline bool MultiType::isType<unsigned long long>()   const { return (this->type_ == MT_ulonglong);   }
+template <> inline bool MultiType::isType<float>()                const { return (this->type_ == MT_float);       }
+template <> inline bool MultiType::isType<double>()               const { return (this->type_ == MT_double);      }
+template <> inline bool MultiType::isType<long double>()          const { return (this->type_ == MT_longdouble);  }
+template <> inline bool MultiType::isType<bool>()                 const { return (this->type_ == MT_bool);        }
+template <> inline bool MultiType::isType<void*>()                const { return (this->type_ == MT_void);        }
+template <> inline bool MultiType::isType<std::string>()          const { return (this->type_ == MT_string);      }
+template <> inline bool MultiType::isType<orxonox::Vector2>()     const { return (this->type_ == MT_vector2);     }
+template <> inline bool MultiType::isType<orxonox::Vector3>()     const { return (this->type_ == MT_vector3);     }
+template <> inline bool MultiType::isType<orxonox::Vector4>()     const { return (this->type_ == MT_vector4);     }
+template <> inline bool MultiType::isType<orxonox::ColourValue>() const { return (this->type_ == MT_colourvalue); }
+template <> inline bool MultiType::isType<orxonox::Quaternion>()  const { return (this->type_ == MT_quaternion);  }
+template <> inline bool MultiType::isType<orxonox::Radian>()      const { return (this->type_ == MT_radian);      }
+template <> inline bool MultiType::isType<orxonox::Degree>()      const { return (this->type_ == MT_degree);      }
+
+template <> inline void MultiType::convert<const std::string&>()          { this->convert<std::string>();          }
+template <> inline void MultiType::convert<const orxonox::Vector2&>()     { this->convert<orxonox::Vector2>();     }
+template <> inline void MultiType::convert<const orxonox::Vector3&>()     { this->convert<orxonox::Vector3>();     }
+template <> inline void MultiType::convert<const orxonox::Vector4&>()     { this->convert<orxonox::Vector4>();     }
+template <> inline void MultiType::convert<const orxonox::ColourValue&>() { this->convert<orxonox::ColourValue>(); }
+template <> inline void MultiType::convert<const orxonox::Quaternion&>()  { this->convert<orxonox::Quaternion>();  }
+template <> inline void MultiType::convert<const orxonox::Radian&>()      { this->convert<orxonox::Radian>();      }
+template <> inline void MultiType::convert<const orxonox::Degree&>()      { this->convert<orxonox::Degree>();      }
+
+template <> void MultiType::createNewValueContainer(const char& value);
+template <> void MultiType::createNewValueContainer(const unsigned char& value);
+template <> void MultiType::createNewValueContainer(const short& value);
+template <> void MultiType::createNewValueContainer(const unsigned short& value);
+template <> void MultiType::createNewValueContainer(const int& value);
+template <> void MultiType::createNewValueContainer(const unsigned int& value);
+template <> void MultiType::createNewValueContainer(const long& value);
+template <> void MultiType::createNewValueContainer(const unsigned long& value);
+template <> void MultiType::createNewValueContainer(const long long& value);
+template <> void MultiType::createNewValueContainer(const unsigned long long& value);
+template <> void MultiType::createNewValueContainer(const float& value);
+template <> void MultiType::createNewValueContainer(const double& value);
+template <> void MultiType::createNewValueContainer(const bool& value);
+template <> void MultiType::createNewValueContainer(const long double& value);
+template <> void MultiType::createNewValueContainer(      void* const& value);
+template <> void MultiType::createNewValueContainer(const std::string& value);
+template <> void MultiType::createNewValueContainer(const orxonox::Vector2& value);
+template <> void MultiType::createNewValueContainer(const orxonox::Vector3& value);
+template <> void MultiType::createNewValueContainer(const orxonox::Vector4& value);
+template <> void MultiType::createNewValueContainer(const orxonox::ColourValue& value);
+template <> void MultiType::createNewValueContainer(const orxonox::Quaternion& value);
+template <> void MultiType::createNewValueContainer(const orxonox::Radian& value);
+template <> void MultiType::createNewValueContainer(const orxonox::Degree& value);
+
+inline void MultiType::setValue(const char* value) { if (this->value_) { this->value_->setValue(std::string(value)); } else { this->createNewValueContainer(std::string(value)); } }
+
+/*
+
+(*) = funktion 2x:
+function(...) : bezieht sich auf aktuellen type
+function<T>(...) : bezieht sich auf type T
+
+constructor(V value) : zuweisung
+(*) operator=(V value) : zuweisung
+(*) setValue(V value) : zuweisung
+
+(*) == != > < <= >= : template
+
+(*) reset() : zurück auf 0 (bzw "")
+setType<T>() : setzt type und macht reset
+convert<T>() : setzt type und konvertiert
+
+(T) : return konvertiert
+
+isType<T>() : return bool
+getType() : return MT_Type
+getTypename() : return string
+
+toString() : return string
+(*) fromString(string value) : konvertiert string
+operator<< : toString()
+
+*/
+
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#pragma warning(pop)
+#endif
+
 #endif /* _MultiType_H__ */
Index: code/branches/core3/src/util/MultiTypeMath.cc
===================================================================
--- code/branches/core3/src/util/MultiTypeMath.cc	(revision 1610)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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_vector4)
-        this->vector4_ = orxonox::Vector4(0, 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_vector4)
-            return (this->vector4_ == mtm.vector4_);
-        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 MultiTypeString& mts) const
-{
-    return MultiTypeString::operator==(mts);
-}
-
-bool MultiTypeMath::operator==(const MultiTypePrimitive& mtp) const
-{
-    return MultiTypePrimitive::operator==(mtp);
-}
-
-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_vector4)
-            return (this->vector4_ != mtm.vector4_);
-        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;
-}
-
-bool MultiTypeMath::operator!=(const MultiTypeString& mts) const
-{
-    return MultiTypeString::operator!=(mts);
-}
-
-bool MultiTypeMath::operator!=(const MultiTypePrimitive& mtp) const
-{
-    return MultiTypePrimitive::operator!=(mtp);
-}
-
-MultiTypeMath::operator void*() const
-{ return (this->type_ == MT_void) ? this->value_.void_ : getConvertedValue<MultiTypeMath, void*>(*this, 0); }
-MultiTypeMath::operator int() const
-{ return (this->type_ == MT_int) ? this->value_.int_ : getConvertedValue<MultiTypeMath, int>(*this, 0); }
-MultiTypeMath::operator unsigned int() const
-{ return (this->type_ == MT_uint) ? this->value_.uint_ : getConvertedValue<MultiTypeMath, unsigned int>(*this, 0); }
-MultiTypeMath::operator char() const
-{ return (this->type_ == MT_char) ? this->value_.char_ : getConvertedValue<MultiTypeMath, char>(*this, 0); }
-MultiTypeMath::operator unsigned char() const
-{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : getConvertedValue<MultiTypeMath, unsigned char>(*this, 0); }
-MultiTypeMath::operator short() const
-{ return (this->type_ == MT_short) ? this->value_.short_ : getConvertedValue<MultiTypeMath, short>(*this, 0); }
-MultiTypeMath::operator unsigned short() const
-{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : getConvertedValue<MultiTypeMath, unsigned short>(*this, 0); }
-MultiTypeMath::operator long() const
-{ return (this->type_ == MT_long) ? this->value_.long_ : getConvertedValue<MultiTypeMath, long>(*this, 0); }
-MultiTypeMath::operator unsigned long() const
-{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : getConvertedValue<MultiTypeMath, unsigned long>(*this, 0); }
-MultiTypeMath::operator float() const
-{ return (this->type_ == MT_float) ? this->value_.float_ : getConvertedValue<MultiTypeMath, float>(*this, 0); }
-MultiTypeMath::operator double() const
-{ return (this->type_ == MT_double) ? this->value_.double_ : getConvertedValue<MultiTypeMath, double>(*this, 0); }
-MultiTypeMath::operator long double() const
-{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : getConvertedValue<MultiTypeMath, long double>(*this, 0); }
-MultiTypeMath::operator bool() const
-{ return (this->type_ == MT_bool) ? this->value_.bool_ : getConvertedValue<MultiTypeMath, bool>(*this, 0); }
-MultiTypeMath::operator std::string() const
-{ return (this->type_ == MT_string) ? this->string_ : getConvertedValue<MultiTypeMath, std::string>(*this); }
-MultiTypeMath::operator const char*() const
-{ return ((this->type_ == MT_constchar) ? this->string_ : getConvertedValue<MultiTypeMath, std::string>(*this)).c_str(); }
-MultiTypeMath::operator orxonox::Vector2() const
-{ return (this->type_ == MT_vector2) ? this->vector2_ : getConvertedValue<MultiTypeMath, orxonox::Vector2>(*this); }
-MultiTypeMath::operator orxonox::Vector3() const
-{ return (this->type_ == MT_vector3) ? this->vector3_ : getConvertedValue<MultiTypeMath, orxonox::Vector3>(*this); }
-MultiTypeMath::operator orxonox::Vector4() const
-{ return (this->type_ == MT_vector4) ? this->vector4_ : getConvertedValue<MultiTypeMath, orxonox::Vector4>(*this); }
-MultiTypeMath::operator orxonox::Quaternion() const
-{ return (this->type_ == MT_quaternion) ? this->quaternion_ : getConvertedValue<MultiTypeMath, orxonox::Quaternion>(*this); }
-MultiTypeMath::operator orxonox::ColourValue() const
-{ return (this->type_ == MT_colourvalue) ? this->colourvalue_ : getConvertedValue<MultiTypeMath, orxonox::ColourValue>(*this); }
-MultiTypeMath::operator orxonox::Radian() const
-{ return (this->type_ == MT_radian) ? this->radian_ : getConvertedValue<MultiTypeMath, orxonox::Radian>(*this); }
-MultiTypeMath::operator orxonox::Degree() const
-{ return (this->type_ == MT_degree) ? this->degree_ : getConvertedValue<MultiTypeMath, orxonox::Degree>(*this); }
-
-void MultiTypeMath::setValue(const MultiTypeMath& mtm)
-{
-    MultiTypeString::setValue(mtm);
-    this->vector2_ = mtm.vector2_;
-    this->vector3_ = mtm.vector3_;
-    this->vector4_ = mtm.vector4_;
-    this->quaternion_ = mtm.quaternion_;
-    this->colourvalue_ = mtm.colourvalue_;
-    this->radian_ = mtm.radian_;
-    this->degree_ = mtm.degree_;
-}
-
-void MultiTypeMath::setValue(const MultiTypeString& mts)
-{
-    MultiTypeString::setValue(mts);
-}
-
-void MultiTypeMath::setValue(const MultiTypePrimitive& mtp)
-{
-    MultiTypePrimitive::setValue(mtp);
-}
-
-std::string MultiTypeMath::getTypename() const
-{
-    if (this->type_ == MT_vector2)
-        return "Vector2";
-    else if (this->type_ == MT_vector3)
-        return "Vector3";
-    else if (this->type_ == MT_vector4)
-        return "Vector4";
-    else if (this->type_ == MT_colourvalue)
-        return "ColourValue";
-    else if (this->type_ == MT_quaternion)
-        return "Quaternion";
-    else if (this->type_ == MT_radian)
-        return "Radian";
-    else if (this->type_ == MT_degree)
-        return "Degree";
-    else
-        return MultiTypeString::getTypename();
-}
-
-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_vector4)
-        ConvertValue(&output, this->vector4_);
-    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_vector4)
-        return ConvertValue(&this->vector4_, value, orxonox::Vector4(0, 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);
-}
-
-bool MultiTypeMath::assimilate(const MultiTypeMath& mtm, const MultiTypeMath& defvalue)
-{
-    if (this->type_ == MT_void)
-        return ConvertValue(&this->value_.void_, mtm, defvalue.value_.void_);
-    else if (this->type_ == MT_int)
-        return ConvertValue(&this->value_.int_, mtm, defvalue.value_.int_);
-    else if (this->type_ == MT_uint)
-        return ConvertValue(&this->value_.uint_, mtm, defvalue.value_.uint_);
-    else if (this->type_ == MT_char)
-        return ConvertValue(&this->value_.char_, mtm, defvalue.value_.char_);
-    else if (this->type_ == MT_uchar)
-        return ConvertValue(&this->value_.uchar_, mtm, defvalue.value_.uchar_);
-    else if (this->type_ == MT_short)
-        return ConvertValue(&this->value_.short_, mtm, defvalue.value_.short_);
-    else if (this->type_ == MT_ushort)
-        return ConvertValue(&this->value_.ushort_, mtm, defvalue.value_.ushort_);
-    else if (this->type_ == MT_long)
-        return ConvertValue(&this->value_.long_, mtm, defvalue.value_.long_);
-    else if (this->type_ == MT_ulong)
-        return ConvertValue(&this->value_.ulong_, mtm, defvalue.value_.ulong_);
-    else if (this->type_ == MT_float)
-        return ConvertValue(&this->value_.float_, mtm, defvalue.value_.float_);
-    else if (this->type_ == MT_double)
-        return ConvertValue(&this->value_.double_, mtm, defvalue.value_.double_);
-    else if (this->type_ == MT_longdouble)
-        return ConvertValue(&this->value_.longdouble_, mtm, defvalue.value_.longdouble_);
-    else if (this->type_ == MT_bool)
-        return ConvertValue(&this->value_.bool_, mtm, defvalue.value_.bool_);
-    else if (this->type_ == MT_constchar)
-        return ConvertValue(&this->string_, mtm, defvalue.string_);
-    else if (this->type_ == MT_string)
-        return ConvertValue(&this->string_, mtm, defvalue.string_);
-    else if (this->type_ == MT_vector2)
-        return ConvertValue(&this->vector2_, mtm, defvalue.vector2_);
-    else if (this->type_ == MT_vector3)
-        return ConvertValue(&this->vector3_, mtm, defvalue.vector3_);
-    else if (this->type_ == MT_vector4)
-        return ConvertValue(&this->vector4_, mtm, defvalue.vector4_);
-    else if (this->type_ == MT_colourvalue)
-        return ConvertValue(&this->colourvalue_, mtm, defvalue.colourvalue_);
-    else if (this->type_ == MT_quaternion)
-        return ConvertValue(&this->quaternion_, mtm, defvalue.quaternion_);
-    else if (this->type_ == MT_radian)
-        return ConvertValue(&this->radian_, mtm, defvalue.radian_);
-    else if (this->type_ == MT_degree)
-        return ConvertValue(&this->degree_, mtm, defvalue.degree_);
-    else
-        return false;
-}
-
-std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm)
-{
-    out << mtm.toString();
-    return out;
-}
Index: code/branches/core3/src/util/MultiTypeMath.h
===================================================================
--- code/branches/core3/src/util/MultiTypeMath.h	(revision 1610)
+++ 	(revision )
@@ -1,194 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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"
-
-// disable annoying warning about multiple assignment operators
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-#pragma warning(push)
-#pragma warning(disable:4522)
-#endif
-
-class _UtilExport MultiTypeMath : public MultiTypeString
-{
-    public:
-        MultiTypeMath(MultiType type = MT_null);
-        inline MultiTypeMath(void*          value) : MultiTypeString(value) {}
-        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::Vector4&     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);   }
-        inline MultiTypeMath(const MultiTypeString& mts)        { this->setValue(mts);   }
-        inline MultiTypeMath(const MultiTypePrimitive& mtp)     { this->setValue(mtp);   }
-        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::Vector4&     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; }
-        inline MultiTypeMath& operator=(const MultiTypeString& mts)        { this->setValue(mts);   return *this; }
-        inline MultiTypeMath& operator=(const MultiTypePrimitive mtp)      { this->setValue(mtp);   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::Vector4&     value) const { return (this->vector4_     == 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;
-        bool operator==(const MultiTypeString& mts) const;
-        bool operator==(const MultiTypePrimitive& mtp) 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::Vector4&     value) const { return (this->vector4_     != 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;
-        bool operator!=(const MultiTypeString& mts) const;
-        bool operator!=(const MultiTypePrimitive& mtp) const;
-
-        virtual operator void*()                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::Vector4()     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::Vector4&     value) { this->type_ = MT_vector4;     this->vector4_     = 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);
-        void setValue(const MultiTypeString& mts);
-        void setValue(const MultiTypePrimitive& mtp);
-
-        inline orxonox::Vector2     getVector2()     const { return this->vector2_;     }
-        inline orxonox::Vector3     getVector3()     const { return this->vector3_;     }
-        inline orxonox::Vector4     getVector4()     const { return this->vector4_;     }
-        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::Vector4&     getVector4()     { return this->vector4_;     }
-        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::Vector4*     variable) const { (*variable) = orxonox::Vector4     (this->vector4_);     }
-        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 getTypename() const;
-
-        virtual std::string toString() const;
-        virtual bool fromString(const std::string value);
-
-        virtual bool assimilate(const MultiTypeMath& mtm, const MultiTypeMath& defvalue = MultiTypeMath());
-
-    protected:
-        orxonox::Vector2      vector2_;
-        orxonox::Vector3      vector3_;
-        orxonox::Vector4      vector4_;
-        orxonox::ColourValue  colourvalue_;
-        orxonox::Quaternion   quaternion_;
-        orxonox::Radian       radian_;
-        orxonox::Degree       degree_;
-};
-
-_UtilExport std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm);
-
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-#pragma warning(pop)
-#endif
-
-#endif /* _MultiTypeMath_H__ */
Index: code/branches/core3/src/util/MultiTypePrimitive.cc
===================================================================
--- code/branches/core3/src/util/MultiTypePrimitive.cc	(revision 1610)
+++ 	(revision )
@@ -1,305 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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_void)
-        this->value_.void_ = 0;
-    else 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_.void_ = 0;
-}
-
-bool MultiTypePrimitive::operator==(const MultiTypePrimitive& mtp) const
-{
-    if (this->type_ == mtp.type_)
-    {
-        if (this->type_ == MT_void)
-            return (this->value_.void_ == mtp.value_.void_);
-        else 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_void)
-            return (this->value_.void_ != mtp.value_.void_);
-        else 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 void*() const
-{ return (this->type_ == MT_void) ? this->value_.void_ : getConvertedValue<MultiTypePrimitive, void*>(*this, 0); }
-MultiTypePrimitive::operator int() const
-{ return (this->type_ == MT_int) ? this->value_.int_ : getConvertedValue<MultiTypePrimitive, int>(*this, 0); }
-MultiTypePrimitive::operator unsigned int() const
-{ return (this->type_ == MT_uint) ? this->value_.uint_ : getConvertedValue<MultiTypePrimitive, unsigned int>(*this, 0); }
-MultiTypePrimitive::operator char() const
-{ return (this->type_ == MT_char) ? this->value_.char_ : getConvertedValue<MultiTypePrimitive, char>(*this, 0); }
-MultiTypePrimitive::operator unsigned char() const
-{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : getConvertedValue<MultiTypePrimitive, unsigned char>(*this, 0); }
-MultiTypePrimitive::operator short() const
-{ return (this->type_ == MT_short) ? this->value_.short_ : getConvertedValue<MultiTypePrimitive, short>(*this, 0); }
-MultiTypePrimitive::operator unsigned short() const
-{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : getConvertedValue<MultiTypePrimitive, unsigned short>(*this, 0); }
-MultiTypePrimitive::operator long() const
-{ return (this->type_ == MT_long) ? this->value_.long_ : getConvertedValue<MultiTypePrimitive, long>(*this, 0); }
-MultiTypePrimitive::operator unsigned long() const
-{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : getConvertedValue<MultiTypePrimitive, unsigned long>(*this, 0); }
-MultiTypePrimitive::operator float() const
-{ return (this->type_ == MT_float) ? this->value_.float_ : getConvertedValue<MultiTypePrimitive, float>(*this, 0); }
-MultiTypePrimitive::operator double() const
-{ return (this->type_ == MT_double) ? this->value_.double_ : getConvertedValue<MultiTypePrimitive, double>(*this, 0); }
-MultiTypePrimitive::operator long double() const
-{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : getConvertedValue<MultiTypePrimitive, long double>(*this, 0); }
-MultiTypePrimitive::operator bool() const
-{ return (this->type_ == MT_bool) ? this->value_.bool_ : getConvertedValue<MultiTypePrimitive, bool>(*this, 0); }
-
-void MultiTypePrimitive::setValue(const MultiTypePrimitive& mtp)
-{
-    this->type_ = mtp.type_;
-    this->value_ = mtp.value_;
-}
-
-std::string MultiTypePrimitive::getTypename() const
-{
-    if (this->type_ == MT_void)
-        return "pointer";
-    else if (this->type_ == MT_int)
-        return "int";
-    else if (this->type_ == MT_uint)
-        return "unsigned int";
-    else if (this->type_ == MT_char)
-        return "char";
-    else if (this->type_ == MT_uchar)
-        return "unsigned char";
-    else if (this->type_ == MT_short)
-        return "short";
-    else if (this->type_ == MT_ushort)
-        return "unsigned short";
-    else if (this->type_ == MT_long)
-        return "long";
-    else if (this->type_ == MT_ulong)
-        return "unsigned long";
-    else if (this->type_ == MT_float)
-        return "float";
-    else if (this->type_ == MT_double)
-        return "double";
-    else if (this->type_ == MT_longdouble)
-        return "long double";
-    else if (this->type_ == MT_bool)
-        return "bool";
-    else
-        return "unknown";
-}
-
-std::string MultiTypePrimitive::toString() const
-{
-    std::string output;
-
-    if (this->type_ == MT_void)
-        ConvertValue(&output, this->value_.void_);
-    else 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_void)
-        return ConvertValue(&this->value_.void_, value, (void*)0);
-    else 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;
-}
-
-bool MultiTypePrimitive::assimilate(const MultiTypePrimitive& mtp, const MultiTypePrimitive& defvalue)
-{
-    if (this->type_ == MT_void)
-        return ConvertValue(&this->value_.void_, mtp, defvalue.value_.void_);
-    else if (this->type_ == MT_int)
-        return ConvertValue(&this->value_.int_, mtp, defvalue.value_.int_);
-    else if (this->type_ == MT_uint)
-        return ConvertValue(&this->value_.uint_, mtp, defvalue.value_.uint_);
-    else if (this->type_ == MT_char)
-        return ConvertValue(&this->value_.char_, mtp, defvalue.value_.char_);
-    else if (this->type_ == MT_uchar)
-        return ConvertValue(&this->value_.uchar_, mtp, defvalue.value_.uchar_);
-    else if (this->type_ == MT_short)
-        return ConvertValue(&this->value_.short_, mtp, defvalue.value_.short_);
-    else if (this->type_ == MT_ushort)
-        return ConvertValue(&this->value_.ushort_, mtp, defvalue.value_.ushort_);
-    else if (this->type_ == MT_long)
-        return ConvertValue(&this->value_.long_, mtp, defvalue.value_.long_);
-    else if (this->type_ == MT_ulong)
-        return ConvertValue(&this->value_.ulong_, mtp, defvalue.value_.ulong_);
-    else if (this->type_ == MT_float)
-        return ConvertValue(&this->value_.float_, mtp, defvalue.value_.float_);
-    else if (this->type_ == MT_double)
-        return ConvertValue(&this->value_.double_, mtp, defvalue.value_.double_);
-    else if (this->type_ == MT_longdouble)
-        return ConvertValue(&this->value_.longdouble_, mtp, defvalue.value_.longdouble_);
-    else if (this->type_ == MT_bool)
-        return ConvertValue(&this->value_.bool_, mtp, defvalue.value_.bool_);
-    else
-        return false;
-
-}
-
-std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp)
-{
-    out << mtp.toString();
-    return out;
-}
Index: code/branches/core3/src/util/MultiTypePrimitive.h
===================================================================
--- code/branches/core3/src/util/MultiTypePrimitive.h	(revision 1610)
+++ 	(revision )
@@ -1,198 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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 "UtilPrereqs.h"
-
-#include <ostream>
-
-#include "MultiType.h"
-
-namespace orxonox
-{
-    class BaseObject;
-}
-class _UtilExport MultiTypePrimitive
-{
-    public:
-        MultiTypePrimitive(MultiType type = MT_null);
-        inline MultiTypePrimitive(void*          value) { this->setValue(value); }
-        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=(void*          value) { this->setValue(value); 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==(void*          value) const { return (this->value_.void_       == value); }
-        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!=(void*          value) const { return (this->value_.void_       != 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;
-
-        template <class T>
-        operator T*()                     const
-        { return ((T*)this->value_.void_); }
-        virtual operator void*()          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(void*          value) { this->type_ = MT_void;       this->value_.void_       = value; }
-        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 void*          getVoid()          const { return this->value_.void_;       }
-        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(void*           variable) const { variable    = this->value_.void_;       }
-        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 getTypename() const;
-
-        virtual std::string toString() const;
-        virtual bool fromString(const std::string value);
-
-        virtual bool assimilate(const MultiTypePrimitive& mtp, const MultiTypePrimitive& defvalue = MultiTypePrimitive());
-
-    protected:
-        MultiTypeValue  value_;
-        MultiType       type_;
-};
-
-_UtilExport std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp);
-
-#endif /* _MultiTypePrimitive_H__ */
Index: code/branches/core3/src/util/MultiTypeString.cc
===================================================================
--- code/branches/core3/src/util/MultiTypeString.cc	(revision 1610)
+++ 	(revision )
@@ -1,193 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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)
-{
-    // Nothing to do for 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 MultiTypePrimitive& mtp) const
-{
-    return MultiTypePrimitive::operator==(mtp);
-}
-
-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;
-}
-
-bool MultiTypeString::operator!=(const MultiTypePrimitive& mtp) const
-{
-    return MultiTypePrimitive::operator!=(mtp);
-}
-
-MultiTypeString::operator void*() const
-{ return (this->type_ == MT_void) ? this->value_.void_ : getConvertedValue<MultiTypeString, void*>(*this, 0); }
-MultiTypeString::operator int() const
-{ return (this->type_ == MT_int) ? this->value_.int_ : getConvertedValue<MultiTypeString, int>(*this, 0); }
-MultiTypeString::operator unsigned int() const
-{ return (this->type_ == MT_uint) ? this->value_.uint_ : getConvertedValue<MultiTypeString, unsigned int>(*this, 0); }
-MultiTypeString::operator char() const
-{ return (this->type_ == MT_char) ? this->value_.char_ : getConvertedValue<MultiTypeString, char>(*this, 0); }
-MultiTypeString::operator unsigned char() const
-{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : getConvertedValue<MultiTypeString, unsigned char>(*this, 0); }
-MultiTypeString::operator short() const
-{ return (this->type_ == MT_short) ? this->value_.short_ : getConvertedValue<MultiTypeString, short>(*this, 0); }
-MultiTypeString::operator unsigned short() const
-{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : getConvertedValue<MultiTypeString, unsigned short>(*this, 0); }
-MultiTypeString::operator long() const
-{ return (this->type_ == MT_long) ? this->value_.long_ : getConvertedValue<MultiTypeString, long>(*this, 0); }
-MultiTypeString::operator unsigned long() const
-{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : getConvertedValue<MultiTypeString, unsigned long>(*this, 0); }
-MultiTypeString::operator float() const
-{ return (this->type_ == MT_float) ? this->value_.float_ : getConvertedValue<MultiTypeString, float>(*this, 0); }
-MultiTypeString::operator double() const
-{ return (this->type_ == MT_double) ? this->value_.double_ : getConvertedValue<MultiTypeString, double>(*this, 0); }
-MultiTypeString::operator long double() const
-{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : getConvertedValue<MultiTypeString, long double>(*this, 0); }
-MultiTypeString::operator bool() const
-{ return (this->type_ == MT_bool) ? this->value_.bool_ : getConvertedValue<MultiTypeString, bool>(*this, 0); }
-MultiTypeString::operator std::string() const
-{ return (this->type_ == MT_string) ? this->string_ : getConvertedValue<MultiTypeString, std::string>(*this); }
-MultiTypeString::operator const char*() const
-{ return ((this->type_ == MT_constchar) ? this->string_ : getConvertedValue<MultiTypeString, std::string>(*this)).c_str(); }
-
-void MultiTypeString::setValue(const MultiTypeString& mts)
-{
-    MultiTypePrimitive::setValue(mts);
-    this->string_ = mts.string_;
-}
-
-void MultiTypeString::setValue(const MultiTypePrimitive& mtp)
-{
-    MultiTypePrimitive::setValue(mtp);
-}
-
-std::string MultiTypeString::getTypename() const
-{
-    if (this->type_ == MT_constchar)
-        return "string";
-    else if (this->type_ == MT_string)
-        return "string";
-    else
-        return MultiTypePrimitive::getTypename();
-}
-
-std::string MultiTypeString::toString() const
-{
-    std::string output;
-
-    if (this->type_ == MT_constchar)
-        return this->string_;
-    else if (this->type_ == MT_string)
-        return this->string_;
-    else
-        return MultiTypePrimitive::toString();
-
-    // FIXME: unreachable code
-    // return output;
-}
-
-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;
-}
-
-bool MultiTypeString::assimilate(const MultiTypeString& mts, const MultiTypeString& defvalue)
-{
-    if (this->type_ == MT_void)
-        return ConvertValue(&this->value_.void_, mts, defvalue.value_.void_);
-    else if (this->type_ == MT_int)
-        return ConvertValue(&this->value_.int_, mts, defvalue.value_.int_);
-    else if (this->type_ == MT_uint)
-        return ConvertValue(&this->value_.uint_, mts, defvalue.value_.uint_);
-    else if (this->type_ == MT_char)
-        return ConvertValue(&this->value_.char_, mts, defvalue.value_.char_);
-    else if (this->type_ == MT_uchar)
-        return ConvertValue(&this->value_.uchar_, mts, defvalue.value_.uchar_);
-    else if (this->type_ == MT_short)
-        return ConvertValue(&this->value_.short_, mts, defvalue.value_.short_);
-    else if (this->type_ == MT_ushort)
-        return ConvertValue(&this->value_.ushort_, mts, defvalue.value_.ushort_);
-    else if (this->type_ == MT_long)
-        return ConvertValue(&this->value_.long_, mts, defvalue.value_.long_);
-    else if (this->type_ == MT_ulong)
-        return ConvertValue(&this->value_.ulong_, mts, defvalue.value_.ulong_);
-    else if (this->type_ == MT_float)
-        return ConvertValue(&this->value_.float_, mts, defvalue.value_.float_);
-    else if (this->type_ == MT_double)
-        return ConvertValue(&this->value_.double_, mts, defvalue.value_.double_);
-    else if (this->type_ == MT_longdouble)
-        return ConvertValue(&this->value_.longdouble_, mts, defvalue.value_.longdouble_);
-    else if (this->type_ == MT_bool)
-        return ConvertValue(&this->value_.bool_, mts, defvalue.value_.bool_);
-    else if (this->type_ == MT_constchar)
-        return ConvertValue(&this->string_, mts, defvalue.string_);
-    else if (this->type_ == MT_string)
-        return ConvertValue(&this->string_, mts, defvalue.string_);
-    else
-        return false;
-}
-
-std::ostream& operator<<(std::ostream& out, MultiTypeString& mts)
-{
-    out << mts.toString();
-    return out;
-}
Index: code/branches/core3/src/util/MultiTypeString.h
===================================================================
--- code/branches/core3/src/util/MultiTypeString.h	(revision 1610)
+++ 	(revision )
@@ -1,136 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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 "UtilPrereqs.h"
-
-#include <string>
-#include <iostream>
-
-#include "MultiTypePrimitive.h"
-
-// disable annoying warning about multiple assignment operators
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-#pragma warning(push)
-#pragma warning(disable:4522)
-#endif
-
-class _UtilExport MultiTypeString : public MultiTypePrimitive
-{
-    public:
-        MultiTypeString(MultiType type = MT_null);
-        inline MultiTypeString(void*          value) : MultiTypePrimitive(value) {}
-        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);   }
-        inline MultiTypeString(const MultiTypePrimitive& mtp)  { this->setValue(mtp);   }
-        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; }
-        inline MultiTypeString& operator=(const MultiTypePrimitive& mtp) { this->setValue(mtp);   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;
-        bool operator==(const MultiTypePrimitive& mtp) 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;
-        bool operator!=(const MultiTypePrimitive& mtp) const;
-
-        virtual operator void*()          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);
-        void setValue(const MultiTypePrimitive& mtp);
-
-        inline std::string getString()     const { return this->string_;         }
-        inline const char*  getConstChar() const { return this->string_.c_str(); }
-
-        inline 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 getTypename() const;
-
-        virtual std::string toString() const;
-        virtual bool fromString(const std::string value);
-
-        virtual bool assimilate(const MultiTypeString& mts, const MultiTypeString& defvalue = MultiTypeString());
-
-    protected:
-        std::string      string_;
-};
-
-_UtilExport std::ostream& operator<<(std::ostream& out, MultiTypeString& mts);
-
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-#pragma warning(pop)
-#endif
-
-#endif /* _MultiTypeString_H__ */
Index: code/branches/core3/src/util/MultiTypeValue.h
===================================================================
--- code/branches/core3/src/util/MultiTypeValue.h	(revision 1716)
+++ code/branches/core3/src/util/MultiTypeValue.h	(revision 1716)
@@ -0,0 +1,166 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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 _MultiTypeValue_H__
+#define _MultiTypeValue_H__
+
+#include "UtilPrereqs.h"
+#include "Convert.h"
+
+template <typename T>
+struct MT_Value : public MultiType::MT_ValueBase
+{
+/*
+    template <class A, class B, class Btest = B>
+    class StaticConversion
+    {
+        private:
+            template <class V, bool convertable> struct Convert
+            {   static inline A convert(const V& value) { return A(); }   };
+            template <class V>                   struct Convert<V, true>
+            {   static inline A convert(const V& value) { return ((A)value); }   };
+
+            template <typename V, bool convertable> struct Compare
+            {
+                static inline bool compare_equal       (const A& value, const V& other) { return false; }
+                static inline bool compare_notequal    (const A& value, const V& other) { return true;  }
+                static inline bool compare_smaller     (const A& value, const V& other) { return false; }
+                static inline bool compare_smallerequal(const A& value, const V& other) { return false; }
+                static inline bool compare_greater     (const A& value, const V& other) { return false; }
+                static inline bool compare_greaterequal(const A& value, const V& other) { return false; }
+            };
+            template <typename V>                   struct Compare<V, true>
+            {
+                static inline bool compare_equal       (const A& value, const V& other) { return (value == other); }
+                static inline bool compare_notequal    (const A& value, const V& other) { return (value != other); }
+                static inline bool compare_smaller     (const A& value, const V& other) { return (value <  other); }
+                static inline bool compare_smallerequal(const A& value, const V& other) { return (value <= other); }
+                static inline bool compare_greater     (const A& value, const V& other) { return (value >  other); }
+                static inline bool compare_greaterequal(const A& value, const V& other) { return (value >= other); }
+            };
+
+            class Small { char dummy[1]; };
+            class Big   { char dummy[1024]; };
+            static Small Test(A);
+            static Big   Test(...);
+            static Btest MakeB();
+            enum { exists = sizeof(Test(MakeB())) == sizeof(Small) };
+
+        public:
+            static inline A    convert(const B& value)                              { return Convert<B, exists>::convert(value); }
+            static inline bool compare_equal       (const B& value, const A& other) { return Compare<B, exists>::compare_equal       (value, other); }
+            static inline bool compare_notequal    (const B& value, const A& other) { return Compare<B, exists>::compare_notequal    (value, other); }
+            static inline bool compare_smaller     (const B& value, const A& other) { return Compare<B, exists>::compare_smaller     (value, other); }
+            static inline bool compare_smallerequal(const B& value, const A& other) { return Compare<B, exists>::compare_smallerequal(value, other); }
+            static inline bool compare_greater     (const B& value, const A& other) { return Compare<B, exists>::compare_greater     (value, other); }
+            static inline bool compare_greaterequal(const B& value, const A& other) { return Compare<B, exists>::compare_greaterequal(value, other); }
+    };
+*/
+    MT_Value() {}
+    MT_Value(const T& value) : value_(value) {}
+
+    inline MT_ValueBase* clone() const { return new MT_Value<T>(this->value_); }
+/*
+    inline void setValue(const char& value)                 { this->value_ = StaticConversion<T, char>::convert(value);                 }
+    inline void setValue(const unsigned char& value)        { this->value_ = StaticConversion<T, unsigned char>::convert(value);        }
+    inline void setValue(const short& value)                { this->value_ = StaticConversion<T, short>::convert(value);                }
+    inline void setValue(const unsigned short& value)       { this->value_ = StaticConversion<T, unsigned short>::convert(value);       }
+    inline void setValue(const int& value)                  { this->value_ = StaticConversion<T, int>::convert(value);                  }
+    inline void setValue(const unsigned int& value)         { this->value_ = StaticConversion<T, unsigned int>::convert(value);         }
+    inline void setValue(const long& value)                 { this->value_ = StaticConversion<T, long>::convert(value);                 }
+    inline void setValue(const unsigned long& value)        { this->value_ = StaticConversion<T, unsigned long>::convert(value);        }
+    inline void setValue(const long long& value)            { this->value_ = StaticConversion<T, long long>::convert(value);            }
+    inline void setValue(const unsigned long long& value)   { this->value_ = StaticConversion<T, unsigned long long>::convert(value);   }
+    inline void setValue(const float& value)                { this->value_ = StaticConversion<T, float, int>::convert(value);           }
+    inline void setValue(const double& value)               { this->value_ = StaticConversion<T, double, int>::convert(value);          }
+    inline void setValue(const long double& value)          { this->value_ = StaticConversion<T, long double, int>::convert(value);     }
+    inline void setValue(const bool& value)                 { this->value_ = StaticConversion<T, bool>::convert(value);                 }
+    inline void setValue(      void* const& value)          { this->value_ = StaticConversion<T, void*>::convert(value);                }
+    inline void setValue(const std::string& value)          { this->value_ = StaticConversion<T, std::string>::convert(value);          }
+    inline void setValue(const orxonox::Vector2& value)     { this->value_ = StaticConversion<T, orxonox::Vector2>::convert(value);     }
+    inline void setValue(const orxonox::Vector3& value)     { this->value_ = StaticConversion<T, orxonox::Vector3>::convert(value);     }
+    inline void setValue(const orxonox::Vector4& value)     { this->value_ = StaticConversion<T, orxonox::Vector4>::convert(value);     }
+    inline void setValue(const orxonox::ColourValue& value) { this->value_ = StaticConversion<T, orxonox::ColourValue>::convert(value); }
+    inline void setValue(const orxonox::Quaternion& value)  { this->value_ = StaticConversion<T, orxonox::Quaternion>::convert(value);  }
+    inline void setValue(const orxonox::Radian& value)      { this->value_ = StaticConversion<T, orxonox::Radian>::convert(value);      }
+    inline void setValue(const orxonox::Degree& value)      { this->value_ = StaticConversion<T, orxonox::Degree>::convert(value);      }
+*/
+    inline void setValue(const char& value)                 { this->value_ = getConvertedValue<char,                 T>(value); }
+    inline void setValue(const unsigned char& value)        { this->value_ = getConvertedValue<unsigned char,        T>(value); }
+    inline void setValue(const short& value)                { this->value_ = getConvertedValue<short,                T>(value); }
+    inline void setValue(const unsigned short& value)       { this->value_ = getConvertedValue<unsigned short,       T>(value); }
+    inline void setValue(const int& value)                  { this->value_ = getConvertedValue<int,                  T>(value); }
+    inline void setValue(const unsigned int& value)         { this->value_ = getConvertedValue<unsigned int,         T>(value); }
+    inline void setValue(const long& value)                 { this->value_ = getConvertedValue<long,                 T>(value); }
+    inline void setValue(const unsigned long& value)        { this->value_ = getConvertedValue<unsigned long,        T>(value); }
+    inline void setValue(const long long& value)            { this->value_ = getConvertedValue<long long,            T>(value); }
+    inline void setValue(const unsigned long long& value)   { this->value_ = getConvertedValue<unsigned long long,   T>(value); }
+    inline void setValue(const float& value)                { this->value_ = getConvertedValue<float,                T>(value); }
+    inline void setValue(const double& value)               { this->value_ = getConvertedValue<double,               T>(value); }
+    inline void setValue(const long double& value)          { this->value_ = getConvertedValue<long double,          T>(value); }
+    inline void setValue(const bool& value)                 { this->value_ = getConvertedValue<bool,                 T>(value); }
+    inline void setValue(      void* const& value)          { this->value_ = getConvertedValue<void*,                T>(value); }
+    inline void setValue(const std::string& value)          { this->value_ = getConvertedValue<std::string,          T>(value); }
+    inline void setValue(const orxonox::Vector2& value)     { this->value_ = getConvertedValue<orxonox::Vector2,     T>(value); }
+    inline void setValue(const orxonox::Vector3& value)     { this->value_ = getConvertedValue<orxonox::Vector3,     T>(value); }
+    inline void setValue(const orxonox::Vector4& value)     { this->value_ = getConvertedValue<orxonox::Vector4,     T>(value); }
+    inline void setValue(const orxonox::ColourValue& value) { this->value_ = getConvertedValue<orxonox::ColourValue, T>(value); }
+    inline void setValue(const orxonox::Quaternion& value)  { this->value_ = getConvertedValue<orxonox::Quaternion,  T>(value); }
+    inline void setValue(const orxonox::Radian& value)      { this->value_ = getConvertedValue<orxonox::Radian,      T>(value); }
+    inline void setValue(const orxonox::Degree& value)      { this->value_ = getConvertedValue<orxonox::Degree,      T>(value); }
+
+    inline operator char()                 const { return getConvertedValue<T, char>                (this->value_, 0); }
+    inline operator unsigned char()        const { return getConvertedValue<T, unsigned char>       (this->value_, 0); }
+    inline operator short()                const { return getConvertedValue<T, short>               (this->value_, 0); }
+    inline operator unsigned short()       const { return getConvertedValue<T, unsigned short>      (this->value_, 0); }
+    inline operator int()                  const { return getConvertedValue<T, int>                 (this->value_, 0); }
+    inline operator unsigned int()         const { return getConvertedValue<T, unsigned int>        (this->value_, 0); }
+    inline operator long()                 const { return getConvertedValue<T, long>                (this->value_, 0); }
+    inline operator unsigned long()        const { return getConvertedValue<T, unsigned long>       (this->value_, 0); }
+    inline operator long long()            const { return getConvertedValue<T, long long>           (this->value_, 0); }
+    inline operator unsigned long long()   const { return getConvertedValue<T, unsigned long long>  (this->value_, 0); }
+    inline operator float()                const { return getConvertedValue<T, float>               (this->value_, 0); }
+    inline operator double()               const { return getConvertedValue<T, double>              (this->value_, 0); }
+    inline operator long double()          const { return getConvertedValue<T, long double>         (this->value_, 0); }
+    inline operator bool()                 const { return getConvertedValue<T, bool>                (this->value_, false); }
+    inline operator void*()                const { return getConvertedValue<T, void*>               (this->value_, 0); }
+    inline operator std::string()          const { return getConvertedValue<T, std::string>         (this->value_); }
+    inline operator orxonox::Vector2()     const { return getConvertedValue<T, orxonox::Vector2>    (this->value_); }
+    inline operator orxonox::Vector3()     const { return getConvertedValue<T, orxonox::Vector3>    (this->value_); }
+    inline operator orxonox::Vector4()     const { return getConvertedValue<T, orxonox::Vector4>    (this->value_); }
+    inline operator orxonox::ColourValue() const { return getConvertedValue<T, orxonox::ColourValue>(this->value_); }
+    inline operator orxonox::Quaternion()  const { return getConvertedValue<T, orxonox::Quaternion> (this->value_); }
+    inline operator orxonox::Radian()      const { return getConvertedValue<T, orxonox::Radian>     (this->value_); }
+    inline operator orxonox::Degree()      const { return getConvertedValue<T, orxonox::Degree>     (this->value_); }
+
+    inline void toString(std::ostream& outstream) const { outstream << this->value_; }
+
+    T value_;
+};
+
+#endif /* _MultiTypeValue_H__ */
Index: code/branches/core3/src/util/OutputBuffer.h
===================================================================
--- code/branches/core3/src/util/OutputBuffer.h	(revision 1610)
+++ code/branches/core3/src/util/OutputBuffer.h	(revision 1716)
@@ -66,5 +66,5 @@
             inline OutputBuffer& operator<<(const OutputBuffer& object)
             {
-                this->stream_ << object.stream_;
+                this->stream_ << object.stream_.rdbuf();
                 this->callListeners();
                 return *this;
Index: code/branches/core3/src/util/UtilPrereqs.h
===================================================================
--- code/branches/core3/src/util/UtilPrereqs.h	(revision 1610)
+++ code/branches/core3/src/util/UtilPrereqs.h	(revision 1716)
@@ -63,7 +63,5 @@
 class Convert;
 class ExprParser;
-class MultiTypePrimitive;
-class MultiTypeString;
-class MultiTypeMath;
+class MultiType;
 class SubString;
 
