Index: code/branches/core/src/util/MultiTypeMath.cc
===================================================================
--- code/branches/core/src/util/MultiTypeMath.cc	(revision 855)
+++ code/branches/core/src/util/MultiTypeMath.cc	(revision 869)
@@ -88,33 +88,44 @@
 }
 
+MultiTypeMath::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeMath, int>(*this); }
+MultiTypeMath::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeMath, unsigned int>(*this); }
+MultiTypeMath::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeMath, char>(*this); }
+MultiTypeMath::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeMath, unsigned char>(*this); }
+MultiTypeMath::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeMath, short>(*this); }
+MultiTypeMath::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeMath, unsigned short>(*this); }
+MultiTypeMath::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeMath, long>(*this); }
+MultiTypeMath::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeMath, unsigned long>(*this); }
+MultiTypeMath::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeMath, float>(*this); }
+MultiTypeMath::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeMath, double>(*this); }
+MultiTypeMath::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeMath, long double>(*this); }
+MultiTypeMath::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeMath, bool>(*this); }
+MultiTypeMath::operator std::string() const
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this); }
+MultiTypeMath::operator const char*() const
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this)).c_str(); }
 MultiTypeMath::operator orxonox::Vector2() const
-{
-    return (this->type_ == MT_vector2) ? this->vector2_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector2>(*this);
-}
-
+{ return (this->type_ == MT_vector2) ? this->vector2_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector2>(*this); }
 MultiTypeMath::operator orxonox::Vector3() const
-{
-    return (this->type_ == MT_vector3) ? this->vector3_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector3>(*this);
-}
-
+{ return (this->type_ == MT_vector3) ? this->vector3_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector3>(*this); }
 MultiTypeMath::operator orxonox::Quaternion() const
-{
-    return (this->type_ == MT_quaternion) ? this->quaternion_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Quaternion>(*this);
-}
-
+{ return (this->type_ == MT_quaternion) ? this->quaternion_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Quaternion>(*this); }
 MultiTypeMath::operator orxonox::ColourValue() const
-{
-    return (this->type_ == MT_colourvalue) ? this->colourvalue_ : ConvertValueAndReturn<MultiTypeMath, orxonox::ColourValue>(*this);
-}
-
+{ return (this->type_ == MT_colourvalue) ? this->colourvalue_ : ConvertValueAndReturn<MultiTypeMath, orxonox::ColourValue>(*this); }
 MultiTypeMath::operator orxonox::Radian() const
-{
-    return (this->type_ == MT_radian) ? this->radian_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Radian>(*this);
-}
-
+{ return (this->type_ == MT_radian) ? this->radian_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Radian>(*this); }
 MultiTypeMath::operator orxonox::Degree() const
-{
-    return (this->type_ == MT_degree) ? this->degree_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Degree>(*this);
-}
+{ return (this->type_ == MT_degree) ? this->degree_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Degree>(*this); }
 
 void MultiTypeMath::setValue(const MultiTypeMath& mtm)
@@ -171,19 +182,5 @@
 std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm)
 {
-    if (mtm.isA(MT_vector2))
-        out << mtm.getVector2();
-    else if (mtm.isA(MT_vector3))
-        out << mtm.getVector3();
-    else if (mtm.isA(MT_colourvalue))
-        out << mtm.getColourValue();
-    else if (mtm.isA(MT_quaternion))
-        out << mtm.getQuaternion();
-    else if (mtm.isA(MT_radian))
-        out << mtm.getRadian();
-    else if (mtm.isA(MT_degree))
-        out << mtm.getDegree();
-    else
-        out << ((MultiTypeString)mtm);
-
+    out << mtm.toString();
     return out;
 }
Index: code/branches/core/src/util/MultiTypeMath.h
===================================================================
--- code/branches/core/src/util/MultiTypeMath.h	(revision 855)
+++ code/branches/core/src/util/MultiTypeMath.h	(revision 869)
@@ -60,4 +60,5 @@
         inline MultiTypeMath(const orxonox::Degree&      value) { this->setValue(value); }
         inline MultiTypeMath(const MultiTypeMath& mtm)          { this->setValue(mtm);   }
+        virtual inline ~MultiTypeMath() {}
 
         using MultiTypeString::operator=;
@@ -88,10 +89,24 @@
         bool operator!=(const MultiTypeMath& mtm) const;
 
-        operator orxonox::Vector2()     const;
-        operator orxonox::Vector3()     const;
-        operator orxonox::ColourValue() const;
-        operator orxonox::Quaternion()  const;
-        operator orxonox::Radian()      const;
-        operator orxonox::Degree()      const;
+        virtual operator int()                  const;
+        virtual operator unsigned int()         const;
+        virtual operator char()                 const;
+        virtual operator unsigned char()        const;
+        virtual operator short()                const;
+        virtual operator unsigned short()       const;
+        virtual operator long()                 const;
+        virtual operator unsigned long()        const;
+        virtual operator float ()               const;
+        virtual operator double ()              const;
+        virtual operator long double()          const;
+        virtual operator bool()                 const;
+        virtual operator std::string()          const;
+        virtual operator const char*()          const;
+        virtual operator orxonox::Vector2()     const;
+        virtual operator orxonox::Vector3()     const;
+        virtual operator orxonox::ColourValue() const;
+        virtual operator orxonox::Quaternion()  const;
+        virtual operator orxonox::Radian()      const;
+        virtual operator orxonox::Degree()      const;
 
         using MultiTypeString::setValue;
@@ -126,6 +141,6 @@
         inline void getValue(orxonox::Degree*      variable) const { (*variable) = orxonox::Degree      (this->degree_);      }
 
-        std::string toString() const;
-        bool fromString(const std::string value);
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
 
     protected:
Index: code/branches/core/src/util/MultiTypePrimitive.cc
===================================================================
--- code/branches/core/src/util/MultiTypePrimitive.cc	(revision 855)
+++ code/branches/core/src/util/MultiTypePrimitive.cc	(revision 869)
@@ -129,62 +129,27 @@
 
 MultiTypePrimitive::operator int() const
-{
-    return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypePrimitive, int>(*this);
-}
-
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypePrimitive, int>(*this); }
 MultiTypePrimitive::operator unsigned int() const
-{
-    return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned int>(*this);
-}
-
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned int>(*this); }
 MultiTypePrimitive::operator char() const
-{
-    return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypePrimitive, char>(*this);
-}
-
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypePrimitive, char>(*this); }
 MultiTypePrimitive::operator unsigned char() const
-{
-    return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned char>(*this);
-}
-
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned char>(*this); }
 MultiTypePrimitive::operator short() const
-{
-    return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypePrimitive, short>(*this);
-}
-
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypePrimitive, short>(*this); }
 MultiTypePrimitive::operator unsigned short() const
-{
-    return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned short>(*this);
-}
-
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned short>(*this); }
 MultiTypePrimitive::operator long() const
-{
-    return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypePrimitive, long>(*this);
-}
-
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypePrimitive, long>(*this); }
 MultiTypePrimitive::operator unsigned long() const
-{
-    return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned long>(*this);
-}
-
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned long>(*this); }
 MultiTypePrimitive::operator float() const
-{
-    return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypePrimitive, float>(*this);
-}
-
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypePrimitive, float>(*this); }
 MultiTypePrimitive::operator double() const
-{
-    return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypePrimitive, double>(*this);
-}
-
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypePrimitive, double>(*this); }
 MultiTypePrimitive::operator long double() const
-{
-    return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypePrimitive, long double>(*this);
-}
-
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypePrimitive, long double>(*this); }
 MultiTypePrimitive::operator bool() const
-{
-    return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypePrimitive, bool>(*this);
-}
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypePrimitive, bool>(*this); }
 
 void MultiTypePrimitive::setValue(const MultiTypePrimitive& mtp)
@@ -258,29 +223,5 @@
 std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp)
 {
-    if (mtp.isA(MT_int))
-        out << mtp.getInt();
-    else if (mtp.isA(MT_uint))
-        out << mtp.getUnsignedInt();
-    else if (mtp.isA(MT_char))
-        out << mtp.getChar();
-    else if (mtp.isA(MT_uchar))
-        out << mtp.getUnsignedChar();
-    else if (mtp.isA(MT_short))
-        out << mtp.getShort();
-    else if (mtp.isA(MT_ushort))
-        out << mtp.getUnsignedShort();
-    else if (mtp.isA(MT_long))
-        out << mtp.getLong();
-    else if (mtp.isA(MT_ulong))
-        out << mtp.getUnsignedLong();
-    else if (mtp.isA(MT_float))
-        out << mtp.getFloat();
-    else if (mtp.isA(MT_double))
-        out << mtp.getDouble();
-    else if (mtp.isA(MT_longdouble))
-        out << mtp.getLongDouble();
-    else if (mtp.isA(MT_bool))
-        out << mtp.getBool();
-
+    out << mtp.toString();
     return out;
 }
Index: code/branches/core/src/util/MultiTypePrimitive.h
===================================================================
--- code/branches/core/src/util/MultiTypePrimitive.h	(revision 855)
+++ code/branches/core/src/util/MultiTypePrimitive.h	(revision 869)
@@ -53,4 +53,5 @@
         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; }
@@ -97,16 +98,16 @@
         bool operator!=(const MultiTypePrimitive& mtp) const;
 
-        operator int()            const;
-        operator unsigned int()   const;
-        operator char()           const;
-        operator unsigned char()  const;
-        operator short()          const;
-        operator unsigned short() const;
-        operator long()           const;
-        operator unsigned long()  const;
-        operator float ()         const;
-        operator double ()        const;
-        operator long double()    const;
-        operator bool()           const;
+        virtual operator int()            const;
+        virtual operator unsigned int()   const;
+        virtual operator char()           const;
+        virtual operator unsigned char()  const;
+        virtual operator short()          const;
+        virtual operator unsigned short() const;
+        virtual operator long()           const;
+        virtual operator unsigned long()  const;
+        virtual operator float ()         const;
+        virtual operator double ()        const;
+        virtual operator long double()    const;
+        virtual operator bool()           const;
 
         inline void setValue(int            value) { this->type_ = MT_int;        this->value_.int_        = value; }
@@ -166,6 +167,6 @@
         inline bool      isA(MultiType type) const { return (this->type_ == type); }
 
-        std::string toString() const;
-        bool fromString(const std::string value);
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
 
     protected:
Index: code/branches/core/src/util/MultiTypeString.cc
===================================================================
--- code/branches/core/src/util/MultiTypeString.cc	(revision 855)
+++ code/branches/core/src/util/MultiTypeString.cc	(revision 869)
@@ -64,13 +64,32 @@
 }
 
+MultiTypeString::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeString, int>(*this); }
+MultiTypeString::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeString, unsigned int>(*this); }
+MultiTypeString::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeString, char>(*this); }
+MultiTypeString::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeString, unsigned char>(*this); }
+MultiTypeString::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeString, short>(*this); }
+MultiTypeString::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeString, unsigned short>(*this); }
+MultiTypeString::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeString, long>(*this); }
+MultiTypeString::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeString, unsigned long>(*this); }
+MultiTypeString::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeString, float>(*this); }
+MultiTypeString::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeString, double>(*this); }
+MultiTypeString::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeString, long double>(*this); }
+MultiTypeString::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeString, bool>(*this); }
 MultiTypeString::operator std::string() const
-{
-    return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this);
-}
-
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this); }
 MultiTypeString::operator const char*() const
-{
-    return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this)).c_str();
-}
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this)).c_str(); }
 
 void MultiTypeString::setValue(const MultiTypeString& mts)
@@ -104,11 +123,5 @@
 std::ostream& operator<<(std::ostream& out, MultiTypeString& mts)
 {
-    if (mts.isA(MT_constchar))
-        out << mts.getConstChar();
-    else if (mts.isA(MT_string))
-        out << mts.getString();
-    else
-        out << ((MultiTypePrimitive)mts);
-
+    out << mts.toString();
     return out;
 }
Index: code/branches/core/src/util/MultiTypeString.h
===================================================================
--- code/branches/core/src/util/MultiTypeString.h	(revision 855)
+++ code/branches/core/src/util/MultiTypeString.h	(revision 869)
@@ -55,4 +55,5 @@
         inline MultiTypeString(const std::string& value)   { this->setValue(value); }
         inline MultiTypeString(const MultiTypeString& mts) { this->setValue(mts);   }
+        virtual inline ~MultiTypeString() {}
 
         using MultiTypePrimitive::operator=;
@@ -71,6 +72,18 @@
         bool operator!=(const MultiTypeString& mts) const;
 
-        operator std::string() const;
-        operator const char*() 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;
@@ -89,6 +102,6 @@
         inline void getValue(const char** variable) const { (*variable) = this->string_.c_str(); }
 
-        std::string toString() const;
-        bool fromString(const std::string value);
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
 
     protected:
