Index: /code/trunk/bin/levels/sample.oxw
===================================================================
--- /code/trunk/bin/levels/sample.oxw	(revision 870)
+++ /code/trunk/bin/levels/sample.oxw	(revision 871)
@@ -1,15 +1,3 @@
-<?xml version="1.0"?>
-<orxonoxworld name="Orxonox sample level" image="textures/menu/moonstation_512x512.jpg">
-  <description>
-    This is an orxonox sample level.
-  </description>
-
-  <loading>
-    <background color="000000" image="textures/load_screens/ambush.png" />
-    <bar top="200" left="50" width="300" height="20" image="textures/load_screens/ambush-loadbar.png" />
-  </loading>
-
-
-
+<!--
  <audio>
 		<ambient>
@@ -21,33 +9,34 @@
 		</ambient>
   </audio>
-
-  <!-- Keep a minimum distance of >100 to the object, otherwise the camara thinks it's in the object -->
-  <!-- the value has to negative, as we want the camara behind the object -->
-<!--
-    <Camera name="Camera" pos="0,50,-150" lookat="0,20,0" node="2OgreHeadNode" />
-    <SpaceShip camera="true" position="0,0,0" scale="10" yaw="-90" pitch="-90" mesh="assf3.mesh"  forward="250" rotateupdown="100" rotaterightleft="100" looprightleft="100" />
 -->
-  <world>
-    <Ambient colourvalue="1,1,1" />
-    <Skybox src="Orxonox/StarSkyBox" />
-
-    <!--Fighter camera="true" position="0,0,0" scale="10" yaw="-90" pitch="-90" mesh="assf3.mesh"  forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /-->
-    <SpaceShip camera="true" position="0,0,0" scale="10" yaw="-90" pitch="-90" mesh="assf3.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
-
-    <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
-    <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
-    <NPC position="0,-100,500" scale="1" mesh="razor.mesh"/>
-    <NPC position="0,-200,450" scale="1" mesh="razor.mesh"/>
-    <NPC position="100,0,400" scale="1" mesh="razor.mesh"/>
-<!--
-    <Model position="200,0,500" scale="10" mesh="starship.mesh" yaw="-90" pitch="-90" />
-    <Model position="-200,0,500" scale="10" mesh="drone.mesh" yaw="-90" pitch="-90" />
--->
-    <Model position="-200,1000,500" scale="10" mesh="hoover_body.mesh" yaw="-90" pitch="-90" />
-    <Model position="-200,1000,500" scale="10" mesh="hoover_gear0.mesh" yaw="-90" pitch="-90" />
-    <Model position="-200,1000,500" scale="10" mesh="hoover_gear1.mesh" yaw="-90" pitch="-90" />
-    <Model position="-200,1000,500" scale="10" mesh="hoover_gear2.mesh" yaw="-90" pitch="-90" />
-    <Model position="-200,1000,500" scale="10" mesh="hoover_turbine.mesh" yaw="-90" pitch="-90" />
-
+
+<Ambient colourvalue="1,1,1" />
+<Skybox src="Orxonox/StarSkyBox" />
+
+<!--Fighter camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh"  forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /-->
+<SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf5.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
+
+<NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
+<NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
+<NPC position="0,-100,500" scale="1" mesh="razor.mesh"/>
+<NPC position="0,-200,450" scale="1" mesh="razor.mesh"/>
+<NPC position="100,0,400" scale="1" mesh="razor.mesh"/>
+
+<Model name="starship" position="200,0,500" scale="10" mesh="starship.mesh" yawpitchroll="-90,-90,0" />
+<Model name="drone" position="-200,0,500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0">
+  <attached>
+    <Model name="drone2" position="200,-100,-500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0">
+      <attached>
+        <Model name="starship2" position="500,200,-500" scale="10" mesh="starship.mesh" yawpitchroll="-90,-90,0" />
+      </attached>
+    </Model>
+  </attached>
+</Model>
+
+<Model position="-200,1000,500" scale="10" mesh="hoover_body.mesh" yawpitchroll="-90,-90,0" />
+<Model position="-200,1000,500" scale="10" mesh="hoover_gear0.mesh" yawpitchroll="-90,-90,0" />
+<Model position="-200,1000,500" scale="10" mesh="hoover_gear1.mesh" yawpitchroll="-90,-90,0" />
+<Model position="-200,1000,500" scale="10" mesh="hoover_gear2.mesh" yawpitchroll="-90,-90,0" />
+<Model position="-200,1000,500" scale="10" mesh="hoover_turbine.mesh" yawpitchroll="-90,-90,0" />
 
     <Model position="-16779,42,11043" scale="95" mesh="ast2.mesh" rotationAxis="0.281711,0.152518,0" rotationRate="27" />
@@ -278,13 +267,2 @@
     <Model position="-6787,1792,287" scale="71" mesh="ast6.mesh" rotationAxis="0.161019,0.130015,0" rotationRate="36" />
     <Model position="-7223,-13574,-11873" scale="24" mesh="ast4.mesh" rotationAxis="0.792203,0,0.177188" rotationRate="38" />
-
-
-  </world>
-
-  <!-- Unused at the moment -->
-<!--  <SpaceshipSteeringObject node="OgreHeadNode" forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /> -->
-
-  <scripts>
-    <script file="intro.lua" />
-  </scripts>
-</orxonoxworld>
Index: /code/trunk/src/CMakeLists.txt
===================================================================
--- /code/trunk/src/CMakeLists.txt	(revision 870)
+++ /code/trunk/src/CMakeLists.txt	(revision 871)
@@ -6,4 +6,4 @@
 ADD_SUBDIRECTORY(audio)
 ADD_SUBDIRECTORY(network)
-ADD_SUBDIRECTORY(loader)
+#ADD_SUBDIRECTORY(loader)
 ADD_SUBDIRECTORY(orxonox)
Index: /code/trunk/src/network/GameStateClient.cc
===================================================================
--- /code/trunk/src/network/GameStateClient.cc	(revision 870)
+++ /code/trunk/src/network/GameStateClient.cc	(revision 871)
@@ -82,5 +82,5 @@
         // bad luck ;)
         // delete the synchronisable (obviously seems to be deleted on the server)
-        while(it != 0 && it->objectID!=sync.objectID){
+        while(it && it->objectID!=sync.objectID){
           removeObject(it);
         }
Index: /code/trunk/src/network/GameStateManager.cc
===================================================================
--- /code/trunk/src/network/GameStateManager.cc	(revision 870)
+++ /code/trunk/src/network/GameStateManager.cc	(revision 871)
@@ -109,5 +109,5 @@
     int offset=0;
     // go through all Synchronisables
-    for(it = orxonox::ObjectList<Synchronisable>::start(); it != 0; ++it){
+    for(it = orxonox::ObjectList<Synchronisable>::start(); it; ++it){
       //std::cout << "gamestatemanager: in for loop" << std::endl;
       //get size of the synchronisable
Index: /code/trunk/src/network/Synchronisable.cc
===================================================================
--- /code/trunk/src/network/Synchronisable.cc	(revision 870)
+++ /code/trunk/src/network/Synchronisable.cc	(revision 871)
@@ -14,4 +14,5 @@
 
 #include "Synchronisable.h"
+#include "core/CoreIncludes.h"
 
 namespace network
Index: /code/trunk/src/network/Synchronisable.h
===================================================================
--- /code/trunk/src/network/Synchronisable.h	(revision 870)
+++ /code/trunk/src/network/Synchronisable.h	(revision 871)
@@ -2,5 +2,5 @@
 // C++ Interface: synchronisable
 //
-// Description: 
+// Description:
 //
 //
@@ -16,5 +16,5 @@
 
 #include "NetworkPrereqs.h"
-#include "core/CoreIncludes.h"
+#include "core/OrxonoxClass.h"
 
 namespace network
@@ -47,5 +47,5 @@
   public:
 
-    virtual ~Synchronisable();
+      virtual ~Synchronisable();
     int objectID;
     int classID;
@@ -66,11 +66,4 @@
     int datasize;
   };
-
-}
-
-namespace orxonox
-{
-  template class _NetworkExport ClassIdentifier<network::Synchronisable>;
-  template class _NetworkExport ObjectList<network::Synchronisable>;
 }
 
Index: /code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/CMakeLists.txt	(revision 870)
+++ /code/trunk/src/orxonox/CMakeLists.txt	(revision 871)
@@ -3,4 +3,5 @@
   Main.cc
   Orxonox.cc
+  objects/Tickable.cc
   SpaceshipSteering.cc
   hud/HUD.cc
@@ -9,4 +10,5 @@
   tools/Light.cc
   tools/Mesh.cc
+  tools/Timer.cc
   objects/Ambient.cc
   objects/Camera.cc
@@ -18,8 +20,8 @@
   objects/Skybox.cc
   objects/SpaceShip.cc
-# objects/SpaceshipSteeringObject.cc
-# objects/test1.cc
-# objects/test2.cc
-# objects/test3.cc
+#  objects/SpaceshipSteeringObject.cc
+#  objects/test1.cc
+#  objects/test2.cc
+#  objects/test3.cc
   objects/WorldEntity.cc
   objects/weapon/AmmunitionDump.cc
@@ -42,5 +44,5 @@
   audio
   network
-  loader
+#  loader
 )
 
Index: /code/trunk/src/orxonox/Orxonox.cc
===================================================================
--- /code/trunk/src/orxonox/Orxonox.cc	(revision 870)
+++ /code/trunk/src/orxonox/Orxonox.cc	(revision 871)
@@ -57,5 +57,5 @@
 
 // loader and audio
-#include "loader/LevelLoader.h"
+//#include "loader/LevelLoader.h"
 #include "audio/AudioManager.h"
 
@@ -72,4 +72,5 @@
 #include "core/Factory.h"
 #include "core/Debug.h"
+#include "core/Loader.h"
 #include "hud/HUD.h"
 #include "objects/weapon/BulletManager.h"
@@ -131,5 +132,5 @@
     this->ogre_ = new GraphicsEngine();
     this->dataPath_ = "";
-    this->loader_ = 0;
+//    this->loader_ = 0;
     this->auMan_ = 0;
     this->singletonRef_ = 0;
@@ -379,6 +380,8 @@
 
     // load this file from config
-    loader_ = new loader::LevelLoader("sample.oxw");
-    loader_->loadLevel();
+//    loader_ = new loader::LevelLoader("sample.oxw");
+//    loader_->loadLevel();
+    Level* startlevel = new Level("levels/sample.oxw");
+    Loader::open(startlevel);
 
     Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
Index: /code/trunk/src/orxonox/Orxonox.h
===================================================================
--- /code/trunk/src/orxonox/Orxonox.h	(revision 870)
+++ /code/trunk/src/orxonox/Orxonox.h	(revision 871)
@@ -14,5 +14,5 @@
 
 #include "OrxonoxPrereqs.h"
-#include "loader/LoaderPrereqs.h"
+//#include "loader/LoaderPrereqs.h"
 #include "audio/AudioPrereqs.h"
 
@@ -69,5 +69,5 @@
       GraphicsEngine*       ogre_;          //!< our dearest graphics engine <3
       std::string           dataPath_;      //!< path to data
-      loader::LevelLoader*  loader_;        //!< level loader builds the scene
+//      loader::LevelLoader*  loader_;        //!< level loader builds the scene
       audio::AudioManager*  auMan_;         //!< audio manager
       BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
Index: /code/trunk/src/orxonox/OrxonoxStableHeaders.h
===================================================================
--- /code/trunk/src/orxonox/OrxonoxStableHeaders.h	(revision 870)
+++ /code/trunk/src/orxonox/OrxonoxStableHeaders.h	(revision 871)
@@ -73,5 +73,5 @@
 //#include "audio/AudioManager.h"
 
-#include "core/CoreIncludes.h"
+//#include "core/CoreIncludes.h"
 #include "core/BaseObject.h"
 //#include "core/ArgReader.h"
Index: /code/trunk/src/orxonox/core/BaseObject.cc
===================================================================
--- /code/trunk/src/orxonox/core/BaseObject.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/BaseObject.cc	(revision 871)
@@ -20,5 +20,5 @@
  *
  *   Author:
- *      ...
+ *      Fabian 'x3n' Landau
  *   Co-authors:
  *      ...
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file BaseObject.cc
     @brief Implementation of the BaseObject class.
@@ -33,5 +33,8 @@
 #include "util/tinyxml/tinyxml.h"
 
+#include "core/CoreIncludes.h"
 #include "BaseObject.h"
+#include "XMLPort.h"
+#include "Level.h"
 
 namespace orxonox
@@ -45,4 +48,8 @@
     {
         RegisterRootObject(BaseObject);
+
+        this->bActive_ = true;
+        this->bVisible_ = true;
+        this->level_ = 0;
     }
 
@@ -64,3 +71,23 @@
         }
     }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void BaseObject::XMLPort(Element& xmlelement, bool loading)
+    {
+        XMLPortParam(BaseObject, "name", setName, getName, xmlelement, loading);
+    }
+
+    /**
+        @brief Returns the levelfile that loaded this object.
+        @return The levelfile
+    */
+    const std::string& BaseObject::getLevelfile() const
+    {
+        return this->level_->getFile();
+    }
 }
Index: /code/trunk/src/orxonox/core/BaseObject.h
===================================================================
--- /code/trunk/src/orxonox/core/BaseObject.h	(revision 870)
+++ /code/trunk/src/orxonox/core/BaseObject.h	(revision 871)
@@ -1,3 +1,30 @@
-/*!
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
     @file BaseObject.h
     @brief Definition of the BaseObject class.
@@ -10,7 +37,7 @@
 
 #include "CorePrereqs.h"
-#include "util/tinyxml/TinyXMLPrereqs.h"
+#include "util/XMLIncludes.h"
 
-#include "CoreIncludes.h"
+#include "OrxonoxClass.h"
 
 namespace orxonox
@@ -23,6 +50,45 @@
             virtual ~BaseObject();
             virtual void loadParams(TiXmlElement* xmlElem);
+            virtual void XMLPort(Element& xmlelement, bool loading);
+
+            /** @brief Sets the name of the object. @param name The name */
+            inline void setName(const std::string& name) { this->name_ = name; this->changedName(); }
+            /** @brief Returns the name of the object. @return The name */
+            inline const std::string& getName() const { return this->name_; }
+            /** @brief This function gets called if the name of the object changes. */
+            virtual void changedName() {}
+
+            /** @brief Sets the state of the objects activity. @param bActive True = active */
+            inline void setActivity(bool bActive) { this->bActive_ = bActive; this->changedActivity(); }
+            /** @brief Returns the state of the objects activity. @return The state of the activity */
+            inline const bool isActive() const { return this->bActive_; }
+            /** @brief This function gets called if the activity of the object changes. */
+            virtual void changedActivity() {}
+
+            /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
+            inline void setVisibility(bool bVisible) { this->bVisible_ = bVisible; this->changedVisibility(); }
+            /** @brief Returns the state of the objects visibility. @return The state of the visibility */
+            inline const bool isVisible() const { return this->bVisible_; }
+            /** @brief This function gets called if the visibility of the object changes. */
+            virtual void changedVisibility() {}
+
+            /** @brief Sets a pointer to the level that loaded this object. @param level The pointer to the level */
+            inline void setLevel(const Level* level) { this->level_ = level; }
+            /** @brief Returns a pointer to the level that loaded this object. @return The level */
+            inline const Level* getLevel() const { return this->level_; }
+            const std::string& getLevelfile() const;
+
+            /** @brief Sets the indentation of the debug output in the Loader. @param indentation The indentation */
+            inline void setLoaderIndentation(const std::string& indentation) { this->loaderIndentation_ = indentation; }
+            /** @brief Returns the indentation of the debug output in the Loader. @return The indentation */
+            inline const std::string& getLoaderIndentation() const { return this->loaderIndentation_; }
+
+        private:
+            std::string name_;                          //!< The name of the object
+            bool bActive_;                              //!< True = the object is active
+            bool bVisible_;                             //!< True = the object is visible
+            const Level* level_;                        //!< The level that loaded this object
+            std::string loaderIndentation_;             //!< Indentation of the debug output in the Loader
     };
-    ExportClass(BaseObject, Core);
 }
 
Index: /code/trunk/src/orxonox/core/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/core/CMakeLists.txt	(revision 870)
+++ /code/trunk/src/orxonox/core/CMakeLists.txt	(revision 871)
@@ -1,9 +1,9 @@
 SET( CORE_SRC_FILES
+  OrxonoxClass.cc
   BaseObject.cc
   Factory.cc
-  IdentifierList.cc
   Identifier.cc
+  IdentifierDistributor.cc
   MetaObjectList.cc
-  OrxonoxClass.cc
   ConfigValueContainer.cc
   Error.cc
@@ -13,4 +13,8 @@
   OutputHandler.cc
   Language.cc
+  ClassTreeMask.cc
+  Loader.cc
+  Executor.cc
+  XMLPort.cc
 )
 
Index: /code/trunk/src/orxonox/core/ClassFactory.h
===================================================================
--- /code/trunk/src/orxonox/core/ClassFactory.h	(revision 870)
+++ /code/trunk/src/orxonox/core/ClassFactory.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file ClassFactory.h
     @brief Definition and implementation of the ClassFactory class
@@ -72,7 +72,7 @@
     bool ClassFactory<T>::create(const std::string& name)
     {
-        COUT(4) << "*** Create entry for " << name << " in Factory." << std::endl;
-        ClassIdentifier<T>::getIdentifier()->addFactory(new ClassFactory<T>);
-        Factory::add(name, ClassIdentifier<T>::getIdentifier());
+        COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
+        ClassManager<T>::getIdentifier()->addFactory(new ClassFactory<T>);
+        Factory::add(name, ClassManager<T>::getIdentifier());
 
         return true;
Index: /code/trunk/src/orxonox/core/ClassManager.h
===================================================================
--- /code/trunk/src/orxonox/core/ClassManager.h	(revision 871)
+++ /code/trunk/src/orxonox/core/ClassManager.h	(revision 871)
@@ -0,0 +1,155 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file ClassManager.h
+    @brief Definition and Implementation of the ClassManager template.
+
+    The ClassManager is a helper-class for ClassIdentifier. Because ClassIdentifiers must
+    be unique, they are created through the IdentifierDistributor-class to assure the
+    uniqueness of the ClassIdentifier. But accessing Identifiers through IdentifierDistributor
+    is slow, because it uses strings and a map. Thats why we use the ClassManager-template: It's
+    a singleton like ClassIdentifier, but it doesn't hurt if there are multiple instances in
+    different libraries, because they all store the same pointer to the unique ClassIdentifier
+    which they've retrieved through IdentifierDistributor.
+*/
+
+#ifndef _ClassManager_H__
+#define _ClassManager_H__
+
+#include <string>
+
+#include "Identifier.h"
+#include "IdentifierDistributor.h"
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    //! ClassManager is a helper class to allow faster access on the ClassIdentifiers.
+    /**
+        Because accessing the IdentifierDistributor is slow, the ClassManager accesses it once
+        and stores the result in a member-variable. IdentifierDistributor assures the uniqueness
+        of the ClassIdentifier, even if there are multiple instances of the ClassManager-template
+        in different libraries.
+    */
+    template <class T>
+    class ClassManager
+    {
+        public:
+            static ClassManager<T>* getSingleton();
+            static ClassIdentifier<T>* getIdentifier();
+            static const std::string& getName();
+
+        private:
+            ClassManager();
+            ClassManager(const ClassIdentifier<T>& identifier) {}    // don't copy
+            ~ClassManager() {}                                       // don't delete
+
+            bool bInitialized_;                 //!< This is false until the ClassIdentifier gets assigned
+            ClassIdentifier<T>* identifier_;    //!< The unique ClassIdentifier for the class T
+    };
+
+    /**
+        @brief Constructor: Marks the ClassManager as uninitialized.
+    */
+    template <class T>
+    ClassManager<T>::ClassManager()
+    {
+        this->bInitialized_ = false;
+    }
+
+    /**
+        @brief Returns the one and only instance of this class for the template parameter T.
+        @return The instance
+    */
+    template <class T>
+    ClassManager<T>* ClassManager<T>::getSingleton()
+    {
+        static ClassManager<T> theOneAndOnlyInstance = ClassManager<T>();
+        return &theOneAndOnlyInstance;
+    }
+
+    /**
+        @brief Creates the only instance of this class for the template class T and retrieves a unique Identifier for the given name.
+        @return The unique Identifier
+    */
+    template <class T>
+    ClassIdentifier<T>* ClassManager<T>::getIdentifier()
+    {
+        // Check if the ClassManager is already initialized
+        if (!ClassManager<T>::getSingleton()->bInitialized_)
+        {
+            // Get the name of the class
+            std::string name = typeid(T).name();
+
+            // It's not -> retrieve the ClassIdentifier through IdentifierDistributor
+            COUT(4) << "*** ClassManager: Request Identifier Singleton for " << name << "." << std::endl;
+
+            // First create a ClassIdentifier in case there's no instance existing yet
+            ClassIdentifier<T>* temp = new ClassIdentifier<T>();
+
+            // Ask the IdentifierDistributor for the unique ClassIdentifier
+            ClassManager<T>::getSingleton()->identifier_ = (ClassIdentifier<T>*)IdentifierDistributor::getIdentifier(name, temp);
+
+            // If the retrieved Identifier differs from our proposal, we don't need the proposal any more
+            if (temp != ClassManager<T>::getSingleton()->identifier_)
+            {
+                COUT(4) << "*** ClassManager: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;
+
+                // Delete the unnecessary proposal
+                delete temp;
+            }
+            else
+            {
+                COUT(4) << "*** ClassManager: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;
+            }
+
+            ClassManager<T>::getSingleton()->bInitialized_ = true;
+        }
+
+        // Finally return the unique ClassIdentifier
+        return ClassManager<T>::getSingleton()->identifier_;
+    }
+
+    /**
+        @brief Returns the name of the class the ClassManager belongs to.
+        @return The name
+    */
+    template <class T>
+    const std::string& ClassManager<T>::getName()
+    {
+        static std::string unknownClassName = std::string("unknown");
+
+        if (ClassManager<T>::getSingleton()->bInitialized_)
+            return ClassManager<T>::getSingleton()->identifier_->getName();
+        else
+            return unknownClassName;
+    }
+}
+
+#endif /* _ClassManager_H__ */
Index: /code/trunk/src/orxonox/core/ClassTreeMask.cc
===================================================================
--- /code/trunk/src/orxonox/core/ClassTreeMask.cc	(revision 871)
+++ /code/trunk/src/orxonox/core/ClassTreeMask.cc	(revision 871)
@@ -0,0 +1,821 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file ClassTreeMask.cc
+    @brief Implementation of the ClassTreeMask, ClassTreeMaskNode and ClassTreeMaskIterator classes.
+*/
+
+#include "ClassTreeMask.h"
+#include "Identifier.h"
+#include "BaseObject.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###    ClassTreeMaskNode    ###
+    // ###############################
+    /**
+        @brief Constructor: Creates the node, sets the subclass and the rule.
+        @param subclass The subclass the rule refers to
+        @param bIncluded The rule: included (true) or excluded (false)
+    */
+    ClassTreeMaskNode::ClassTreeMaskNode(const Identifier* subclass, bool bIncluded)
+    {
+        this->subclass_ = subclass;
+        this->bIncluded_ = bIncluded;
+    }
+
+    /**
+        @brief Destructor: Deletes all subnodes.
+    */
+    ClassTreeMaskNode::~ClassTreeMaskNode()
+    {
+        // Go through the list of all subnodes and delete them
+        this->deleteAllSubnodes();
+    }
+
+    /**
+        @brief Sets the rule for the node to "included".
+        @param overwrite True = overwrite previously added rules for inheriting classes
+    */
+    void ClassTreeMaskNode::include(bool overwrite)
+    {
+        this->setIncluded(true, overwrite);
+    }
+
+    /**
+        @brief Sets the rule for the node to "excluded".
+        @param overwrite True = overwrite previously added rules for inheriting classes
+    */
+    void ClassTreeMaskNode::exclude(bool overwrite)
+    {
+        this->setIncluded(false, overwrite);
+    }
+
+    /**
+        @brief Sets the rule for the node to a given value and erases all following rules.
+        @param bIncluded The rule: included (true) or excluded (false)
+        @param overwrite True = overwrite previously added rules for inheriting classes
+    */
+    void ClassTreeMaskNode::setIncluded(bool bIncluded, bool overwrite)
+    {
+        if (overwrite)
+            this->deleteAllSubnodes();
+
+        this->bIncluded_ = bIncluded;
+    }
+
+    /**
+        @brief Adds a new subnode to the list of subnodes.
+        @param subnode The new subnode
+    */
+    void ClassTreeMaskNode::addSubnode(ClassTreeMaskNode* subnode)
+    {
+        this->subnodes_.insert(this->subnodes_.end(), subnode);
+    }
+
+    /**
+        @brief Tells if the rule is "included" or not.
+        @return The rule: true = included, false = excluded
+    */
+    bool ClassTreeMaskNode::isIncluded() const
+    {
+        return this->bIncluded_;
+    }
+
+    /**
+        @brief Tells if the rule is "excluded" or not.
+        @return The inverted rule: true = excluded, false = included
+    */
+    bool ClassTreeMaskNode::isExcluded() const
+    {
+        return (!this->bIncluded_);
+    }
+
+    /**
+        @brief Returns the Identifier of the class the rule refers to.
+        @return The Identifier representing the class
+    */
+    const Identifier* ClassTreeMaskNode::getClass() const
+    {
+        return this->subclass_;
+    }
+
+    /**
+        @brief Deletes all subnodes of this node.
+    */
+    void ClassTreeMaskNode::deleteAllSubnodes()
+    {
+        // Go through the list of all subnodes and delete them
+        for (std::list<ClassTreeMaskNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
+            delete (*(it++));
+
+        // Clear the list
+        this->subnodes_.clear();
+    }
+
+
+    // ###############################
+    // ###  ClassTreeMaskIterator  ###
+    // ###############################
+    /**
+        @brief Constructor: Initializes the iterator by creating a helper-list with the root-node and putting it to the stack.
+        @param node The root-node
+    */
+    ClassTreeMaskIterator::ClassTreeMaskIterator(ClassTreeMaskNode* node)
+    {
+        // Create a list and put the root-note into it
+        std::list<ClassTreeMaskNode*>::iterator it = this->rootlist_.insert(this->rootlist_.end(), node);
+
+        // Put the iterator to the only element of the list and the corresponding end()-iterator on the stack
+        this->nodes_.push(std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>(it, this->rootlist_.end()));
+    }
+
+    /**
+        @brief Destructor: Does nothing.
+    */
+    ClassTreeMaskIterator::~ClassTreeMaskIterator()
+    {
+    }
+
+    /**
+        @brief Iterates through the rule-tree.
+        @return A reference to the iterator itself
+    */
+    ClassTreeMaskIterator& ClassTreeMaskIterator::operator++()
+    {
+        // Check if the actual node has subnodes
+        if ((*this->nodes_.top().first)->subnodes_.begin() != (*this->nodes_.top().first)->subnodes_.end())
+        {
+            // Yes it has: Push an iterator, pointing at the first subnode, on the stack
+            this->nodes_.push(std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>((*this->nodes_.top().first)->subnodes_.begin(), (*this->nodes_.top().first)->subnodes_.end()));
+        }
+        else
+        {
+            // No subnodes, meaning we reached a leaf: Go to the next node
+            do
+            {
+                // Iterate one step in the current list
+                ++this->nodes_.top().first;
+
+                // Check if we reached the end of the list (the second item in the stored pair always represents the end)
+                if (this->nodes_.top().first == this->nodes_.top().second)
+                {
+                    // Yes we've reached the end: Pop the list-iterator from the stack
+                    this->nodes_.pop();
+
+                    // Continue with the loop, meaning: Try to iterate through the previous list
+                    continue;
+                }
+
+                // If we reached this point, we aren't yet at the end of the list: Leave the loop
+                break;
+            } while (!this->nodes_.empty()); // Stop looping if the stack is empty, meaning: We've iterated to the end
+        }
+
+        // Finally return a reference to the iterator itself
+        return *this;
+    }
+
+    /**
+        @brief Returns a pointer to the ClassTreeMaskNode whereon the iterator points.
+        @return The pointer to the node
+    */
+    ClassTreeMaskNode* ClassTreeMaskIterator::operator*() const
+    {
+        return (*this->nodes_.top().first);
+    }
+
+    /**
+        @brief Returns a pointer to the ClassTreeMaskNode whereon the iterator points.
+        @return The pointer to the node
+    */
+    ClassTreeMaskNode* ClassTreeMaskIterator::operator->() const
+    {
+        return (*this->nodes_.top().first);
+    }
+
+    /**
+        @brief Returns true if the stack is empty, meaning we've reached the end of the tree.
+        @return True if we've reached the end of the tree
+    */
+    ClassTreeMaskIterator::operator bool()
+    {
+        return (!this->nodes_.empty());
+    }
+
+    /**
+        @brief Compares the current node with the given one and returns true if they match.
+        @param compare The node to compare with
+        @return The result of the comparison (true if they match)
+    */
+    bool ClassTreeMaskIterator::operator==(ClassTreeMaskNode* compare)
+    {
+        if (!this->nodes_.empty())
+            return ((*this->nodes_.top().first) == compare);
+        else
+            return (compare == 0);
+    }
+
+    /**
+        @brief Compares the current node with the given one and returns true if they don't match.
+        @param compare The node to compare with
+        @return The result of the comparison (true if they don't match)
+    */
+    bool ClassTreeMaskIterator::operator!=(ClassTreeMaskNode* compare)
+    {
+        if (!this->nodes_.empty())
+            return ((*this->nodes_.top().first) != compare);
+        else
+            return (compare != 0);
+    }
+
+
+    // ###############################
+    // ###      ClassTreeMask      ###
+    // ###############################
+    /**
+        @brief Constructor: Adds the root-node of the tree with the first rule ("include everything").
+    */
+    ClassTreeMask::ClassTreeMask()
+    {
+        this->root_ = new ClassTreeMaskNode(ClassManager<BaseObject>::getIdentifier(), true);
+    }
+
+    /**
+        @brief Copyconstructor: Adds the root-node of the tree with the first rule ("include everything") and adds all rules from the other mask.
+        @param other The other mask
+    */
+    ClassTreeMask::ClassTreeMask(const ClassTreeMask& other)
+    {
+        this->root_ = new ClassTreeMaskNode(ClassManager<BaseObject>::getIdentifier(), true);
+        for (ClassTreeMaskIterator it = other.root_; it; ++it)
+            this->add(it->getClass(), it->isIncluded(), false);
+    }
+
+    /**
+        @brief Destructor: Deletes the root node (which will delete all subnodes too).
+    */
+    ClassTreeMask::~ClassTreeMask()
+    {
+        delete this->root_;
+    }
+
+    /**
+        @brief Adds a new "include" rule for a given subclass to the mask.
+        @param subclass The subclass
+        @param overwrite True = overwrite previously added rules for inheriting classes
+        @param clean True = clean the tree after adding the new rule
+    */
+    void ClassTreeMask::include(const Identifier* subclass, bool overwrite, bool clean)
+    {
+        this->add(subclass, true, overwrite, clean);
+    }
+
+    /**
+        @brief Adds a new "exclude" rule for a given subclass to the mask.
+        @param subclass The subclass
+        @param overwrite True = overwrite previously added rules for inheriting classes
+        @param clean True = clean the tree after adding the new rule
+    */
+    void ClassTreeMask::exclude(const Identifier* subclass, bool overwrite, bool clean)
+    {
+        this->add(subclass, false, overwrite, clean);
+    }
+
+    /**
+        @brief Adds a new rule for a given subclass to the mask.
+        @param subclass The subclass
+        @param bInclude The rule: include (true) or exclude (false)
+        @param overwrite True = overwrite previously added rules for inheriting classes
+        @param clean True = clean the tree after adding the new rule
+    */
+    void ClassTreeMask::add(const Identifier* subclass, bool bInclude, bool overwrite, bool clean)
+    {
+        // Check if the given subclass is a child of our root-class
+        if (subclass->isA(this->root_->getClass()))
+        {
+            // Yes it is: Just add the rule to the three
+            this->add(this->root_, subclass, bInclude, overwrite);
+        }
+        else
+        {
+            // No it's not: Search for classes inheriting from the given class and add the rules for them
+            for (std::list<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
+                if ((*it)->isA(this->root_->getClass()))
+                    if (overwrite || (!this->nodeExists(*it))) // If we don't want to overwrite, only add nodes that don't already exist
+                        this->add(this->root_, *it, bInclude, overwrite);
+        }
+
+        // Clean the rule-tree
+        if (clean)
+            this->clean();
+    }
+
+    /**
+        @brief Adds a new rule for a given subclass to a node of the internal rule-tree (recursive function).
+        @param node The node
+        @param subclass The subclass
+        @param bInclude The rule: include (true) or exclude (false)
+        @param overwrite True = overwrite previously added rules for inheriting classes
+    */
+    void ClassTreeMask::add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite)
+    {
+        // Check if the current node contains exactly the subclass we want to add
+        if (subclass == node->getClass())
+        {
+            // We're at the right place, just change the mask and return
+            node->setIncluded(bInclude, overwrite);
+            return;
+        }
+        else if (subclass->isA(node->getClass()))
+        {
+            // Search for an already existing node, containing the subclass we want to add
+            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
+            {
+                if (subclass->isA((*it)->getClass()))
+                {
+                    // We've found an existing node -> delegate the work with a recursive function-call and return
+                    this->add(*it, subclass, bInclude, overwrite);
+                    return;
+                }
+            }
+
+            // There is no existing node satisfying our needs -> we create a new node
+            ClassTreeMaskNode* newnode = new ClassTreeMaskNode(subclass, bInclude);
+
+            // Search for nodes that should actually be subnodes of our new node and erase them
+            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
+            {
+                if ((*it)->getClass()->isChildOf(subclass))
+                {
+                    // We've found a subnode: add it to the new node and erase it from the current node
+                    if (!overwrite)
+                        newnode->addSubnode(*it);
+                    else
+                        delete (*it);
+
+                    node->subnodes_.erase(it++);
+                }
+                else
+                {
+                    ++it;
+                }
+            }
+
+            // Finally add the new node as a subnode to the current node
+            node->addSubnode(newnode);
+        }
+    }
+
+    /**
+        @brief Adds a new "include" rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
+        @param subclass The subclass
+        @param clean True = clean the tree after adding the new rule
+    */
+    void ClassTreeMask::includeSingle(const Identifier* subclass, bool clean)
+    {
+        this->addSingle(subclass, true, clean);
+    }
+
+    /**
+        @brief Adds a new "exclude" rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
+        @param subclass The subclass
+        @param clean True = clean the tree after adding the new rule
+    */
+    void ClassTreeMask::excludeSingle(const Identifier* subclass, bool clean)
+    {
+        this->addSingle(subclass, false, clean);
+    }
+
+    /**
+        @brief Adds a new rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
+        @param bInclude The rule: include (true) or exclude (false)
+        @param subclass The subclass
+        @param clean True = clean the tree after adding the new rule
+    */
+    void ClassTreeMask::addSingle(const Identifier* subclass, bool bInclude, bool clean)
+    {
+        for (std::list<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
+            this->add(*it, this->isIncluded(*it), false, false);
+
+        this->add(subclass, bInclude, false, clean);
+    }
+
+    /**
+        @brief Resets the mask to "include everything".
+    */
+    void ClassTreeMask::reset()
+    {
+        delete this->root_;
+        this->root_ = new ClassTreeMaskNode(ClassManager<BaseObject>::getIdentifier(), true);
+    }
+
+    /**
+        @brief Tells if a given subclass is included or not.
+        @param subclass The subclass
+        @return Included (true) or excluded (false)
+    */
+    bool ClassTreeMask::isIncluded(const Identifier* subclass) const
+    {
+        return this->isIncluded(this->root_, subclass);
+    }
+
+    /**
+        @brief Tells if a given subclass of a node in the rule-tree is included or not (recursive function).
+        @param node The node
+        @param subclass The subclass
+        @return Included (true) or excluded (false)
+    */
+    bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const
+    {
+        // Check if the searched subclass is of the same type as the class in the current node or a derivative
+        if (subclass->isA(node->getClass()))
+        {
+            // Check for the special case
+            if (subclass == node->getClass())
+                return node->isIncluded();
+
+            // Go through the list of subnodes and look for a node containing the searched subclass and delegate the request by a recursive function-call.
+            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
+                if (subclass->isA((*it)->getClass()))
+                    return isIncluded(*it, subclass);
+
+            // There is no subnode containing our class -> the rule of the current node takes in effect
+            return node->isIncluded();
+        }
+        else
+        {
+            // The class is not included in the mask: return false
+            return false;
+        }
+    }
+
+    /**
+        @brief Tells if a given subclass is excluded or not.
+        @param subclass The subclass
+        @return The inverted rule: Excluded (true) or included (false)
+    */
+    bool ClassTreeMask::isExcluded(const Identifier* subclass) const
+    {
+        return (!this->isIncluded(subclass));
+    }
+
+    /**
+        @brief Removes all unneeded rules that don't change the information of the mask.
+    */
+    void ClassTreeMask::clean()
+    {
+        this->clean(this->root_);
+    }
+
+    /**
+        @brief Removes all unneded rules that don't change the information of a node of a mask (recursive function).
+        @param node The node
+    */
+    void ClassTreeMask::clean(ClassTreeMaskNode* node)
+    {
+        // Iterate through all subnodes of the given node
+        for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
+        {
+            // Recursive function-call: Clean the subnode
+            this->clean(*it);
+
+            // Now check if the subnode contains the same rule as the current node
+            if ((*it)->isIncluded() == node->isIncluded())
+            {
+                // It does: Move all subnodes of the redundant subnode to the current node
+                node->subnodes_.insert(node->subnodes_.end(), (*it)->subnodes_.begin(), (*it)->subnodes_.end());
+                (*it)->subnodes_.clear();
+
+                // Remove the redundant subnode from the current node
+                node->subnodes_.erase(it++);
+            }
+            else
+            {
+                // The subnode is necessary: Move on to the next subnode
+                ++it;
+            }
+        }
+    }
+
+    /**
+        @brief Checks if a node for the given subclass exists.
+        @param subclass The Identifier of the subclass
+        @return True = the node exists
+    */
+    bool ClassTreeMask::nodeExists(const Identifier* subclass)
+    {
+        for (ClassTreeMaskIterator it = this->root_; it; ++it)
+            if ((*it)->getClass() == subclass)
+                return true;
+
+        return false;
+    }
+
+    /**
+        @brief Assignment operator: Adds all rules of the other mask.
+        @param other The other mask
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator=(const ClassTreeMask& other)
+    {
+        // Make a copy to avoid troubles with self-assignments (like A = A).
+        ClassTreeMask temp(other);
+
+        // Removes all current rules
+        this->reset();
+
+        // Copy all rules from the other mask
+        for (ClassTreeMaskIterator it = temp.root_; it; ++it)
+            this->add(it->getClass(), it->isIncluded(), false, false);
+
+        // Return a reference to the mask itself
+        return (*this);
+    }
+
+    /**
+        @brief Prefix operator + does nothing.
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator+()
+    {
+        return (*this);
+    }
+
+    /**
+        @brief Prefix operator - inverts the mask.
+        @return The inverted mask
+    */
+    ClassTreeMask ClassTreeMask::operator-() const
+    {
+        return (!(*this));
+    }
+
+    /**
+        @brief Adds two masks in the sense of a union (all classes that are included in at least one of the masks will be included in the resulting mask too).
+        @param other The mask to unite with
+        @return The union
+    */
+    ClassTreeMask ClassTreeMask::operator+(const ClassTreeMask& other) const
+    {
+        // Create a new mask
+        ClassTreeMask newmask;
+
+        // Add all nodes from the first mask, calculate the rule with the or-operation
+        for (ClassTreeMaskIterator it = this->root_; it; ++it)
+        {
+            const Identifier* subclass = it->getClass();
+            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
+        }
+
+        // Add all nodes from the second mask, calculate the rule with the or-operation
+        for (ClassTreeMaskIterator it = other.root_; it; ++it)
+        {
+            const Identifier* subclass = it->getClass();
+            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
+        }
+
+        // Drop all redundant rules
+        newmask.clean();
+
+        // Return the new mask
+        return newmask;
+    }
+
+    /**
+        @brief Intersects two masks (only classes that are included in both masks will be included in the resulting mask too).
+        @param other The mask to intersect with
+        @return The intersection
+    */
+    ClassTreeMask ClassTreeMask::operator*(const ClassTreeMask& other) const
+    {
+        // Create a new mask
+        ClassTreeMask newmask;
+
+        // Add all nodes from the first mask, calculate the rule with the and-operation
+        for (ClassTreeMaskIterator it = this->root_; it; ++it)
+        {
+            const Identifier* subclass = it->getClass();
+            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
+        }
+
+        // Add all nodes from the second mask, calculate the rule with the and-operation
+        for (ClassTreeMaskIterator it = other.root_; it; ++it)
+        {
+            const Identifier* subclass = it->getClass();
+            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
+        }
+
+        // Drop all redundant rules
+        newmask.clean();
+
+        // Return the new mask
+        return newmask;
+    }
+
+    /**
+        @brief Removes all elements of the second mask from the first mask (all classes that are included in the first mask stay included, except those that are included in the second mask too).
+        @param other The mask to subtract.
+        @return The difference
+    */
+    ClassTreeMask ClassTreeMask::operator-(const ClassTreeMask& other) const
+    {
+        return ((*this) * (!other));
+    }
+
+    /**
+        @brief Inverts the mask (all included classes are now excluded and vice versa).
+        @return The complement
+    */
+    ClassTreeMask ClassTreeMask::operator!() const
+    {
+        // Create a new mask
+        ClassTreeMask newmask;
+
+        // Add all nodes from the other mask, inverting the rules
+        for (ClassTreeMaskIterator it = this->root_; it; ++it)
+        {
+            const Identifier* subclass = it->getClass();
+            newmask.add(subclass, !this->isIncluded(subclass), false, false);
+        }
+
+        // Return the new mask
+        return newmask;
+    }
+
+    /**
+        @brief Unites this mask with another mask.
+        @param other The other mask
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator+=(const ClassTreeMask& other)
+    {
+        (*this) = (*this) + other;
+        return (*this);
+    }
+
+    /**
+        @brief Intersects this mask with another mask.
+        @param other The other mask
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator*=(const ClassTreeMask& other)
+    {
+        (*this) = (*this) * other;
+        return (*this);
+    }
+
+    /**
+        @brief Subtracts another mask from this mask.
+        @param other The other mask
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator-=(const ClassTreeMask& other)
+    {
+        (*this) = (*this) - other;
+        return (*this);
+    }
+
+    /**
+        @brief Intersects two masks (only classes that are included in both masks will be included in the resulting mask too).
+        @param other The mask to intersect with
+        @return The intersection
+    */
+    ClassTreeMask ClassTreeMask::operator&(const ClassTreeMask& other) const
+    {
+        return ((*this) * other);
+    }
+
+    /**
+        @brief Adds two masks in the sense of a union (all classes that are included in at least one of the masks will be included in the resulting mask too).
+        @param other The mask to unite with
+        @return The union
+    */
+    ClassTreeMask ClassTreeMask::operator|(const ClassTreeMask& other) const
+    {
+        return ((*this) + other);
+    }
+
+    /**
+        @brief Joins two masks in the sense of a xor (exclusivity) operation (all classes that are included in exactly one of the masks, but not in both, will be included in the resulting mask too).
+        @param other The mask to join with
+        @return The result
+    */
+    ClassTreeMask ClassTreeMask::operator^(const ClassTreeMask& other) const
+    {
+        // Create a new mask
+        ClassTreeMask newmask;
+
+        // Add all nodes from the first mask, calculate the rule with the xor-operation
+        for (ClassTreeMaskIterator it = this->root_; it; ++it)
+        {
+            const Identifier* subclass = it->getClass();
+            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
+        }
+
+        // Add all nodes from the second mask, calculate the rule with the xor-operation
+        for (ClassTreeMaskIterator it = other.root_; it; ++it)
+        {
+            const Identifier* subclass = it->getClass();
+            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
+        }
+
+        // Drop all redundant rules
+        newmask.clean();
+
+        // Return the new mask
+        return newmask;
+    }
+
+    /**
+        @brief Inverts the mask (all included classes are now excluded and vice versa).
+        @return The complement
+    */
+    ClassTreeMask ClassTreeMask::operator~() const
+    {
+        return (!(*this));
+    }
+
+    /**
+        @brief Intersects this mask with another mask (and-operation)
+        @param other The other mask
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator&=(const ClassTreeMask& other)
+    {
+        (*this) = (*this) & other;
+        return (*this);
+    }
+
+    /**
+        @brief Unites this mask with another mask (or-operation).
+        @param other The other mask
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator|=(const ClassTreeMask& other)
+    {
+        (*this) = (*this) | other;
+        return (*this);
+    }
+
+    /**
+        @brief Joins this mask with another mask with a xor-operation.
+        @param other The other mask
+        @return A reference to the mask itself
+    */
+    ClassTreeMask& ClassTreeMask::operator^=(const ClassTreeMask& other)
+    {
+        (*this) = (*this) ^ other;
+        return (*this);
+    }
+
+    /**
+        @brief Converts the content of a mask into a human readable string and puts it on the ostream.
+        @param out The ostream
+        @param mask The mask
+        @return A reference to the ostream
+    */
+    std::ostream& operator<<(std::ostream& out, const ClassTreeMask& mask)
+    {
+        // Iterate through all rules
+        for (ClassTreeMaskIterator it = mask.root_; it; ++it)
+        {
+            // Calculate the prefix: + means included, - means excluded
+            if (it->isIncluded())
+                out << "+";
+            else
+                out << "-";
+
+            // Put the name of the corresponding class on the stream
+            out << it->getClass()->getName() << " ";
+        }
+
+        return out;
+    }
+}
Index: /code/trunk/src/orxonox/core/ClassTreeMask.h
===================================================================
--- /code/trunk/src/orxonox/core/ClassTreeMask.h	(revision 871)
+++ /code/trunk/src/orxonox/core/ClassTreeMask.h	(revision 871)
@@ -0,0 +1,214 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file ClassTreeMask.h
+    @brief Definition of the ClassTreeMask, ClassTreeMaskNode and ClassTreeMaskIterator classes.
+
+    ClassTreeMask is a class to define a mask of the class-tree beginning with BaseObject.
+    You can include or exclude classes by calling the corresponding functions with the
+    Identifier of the class.
+
+    You can work with a ClassTreeMask in the sense of the set-theory, meaning that you can create
+    unions, intersections, complements and differences by using overloaded operators.
+
+
+
+    The ClassTreeMask is internally represented by a tree. The nodes in the tree are
+    ClassTreeMaskNodes, containing the rule (included or excluded) for this class and all
+    subclasses and a list of all subnodes. To minimize the size, the tree contains only
+    nodes changing the mask. By adding new rules, the tree gets reordered dynamically.
+
+    Adding a new rule overwrites all rules assigned to inherited classes. Use overwrite = false
+    if you don't like this feature. Useless rules that don't change the information of the mask
+    aren't saved in the internal tree. Use clean = false if you wan't to save them.
+
+    With overwrite = false and clean = false it doesn't matter in which way you create the mask.
+    You can manually drop useless rules from the tree by calling clean().
+
+
+
+    Because of the complicated shape of the internal tree, there is an iterator to iterate
+    through all ClassTreeMaskNodes of a mask. It starts with the BaseObject and moves on to
+    the first subclass until it reaches a leaf of the tree. Then the iterator moves one step
+    back and iterates to the second subclass. If there are no more subclasses, it steps another
+    step back, and so on.
+
+    Example: A and B are childs of BaseObject, A1 and A2 are childs of A, B1 and B2 are childs of B.
+    The ClassTreeMaskIterator would move trough the tree in the following order:
+    BaseObject, A, A1, A2, B, B1, B2.
+
+    Note that the iterator doesn't move trough the whole class-tree, but only through the
+    internal tree of the mask, containing the minimal needed set of nodes to describe the mask.
+*/
+
+#ifndef _ClassTreeMask_H__
+#define _ClassTreeMask_H__
+
+#include <list>
+#include <stack>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###    ClassTreeMaskNode    ###
+    // ###############################
+    //! The ClassTreeMaskNode is a node in the internal tree of the ClassTreeMask, containing the rules of the mask.
+    /**
+        The ClassTreeMaskNode is used to store the rule (included or excluded) for a given
+        class (described by the corresponding Identifier). The nodes are used in the internal
+        tree of ClassTreeMask. To build a tree, they store a list of all subnodes.
+    */
+    class _CoreExport ClassTreeMaskNode
+    {
+        friend class ClassTreeMask;
+        friend class ClassTreeMaskIterator;
+
+        public:
+            ClassTreeMaskNode(const Identifier* subclass, bool bIncluded = true);
+            ~ClassTreeMaskNode();
+
+            void include(bool overwrite = true);
+            void exclude(bool overwrite = true);
+            void setIncluded(bool bIncluded, bool overwrite = true);
+
+            void addSubnode(ClassTreeMaskNode* subnode);
+
+            bool isIncluded() const;
+            bool isExcluded() const;
+
+            const Identifier* getClass() const;
+
+        private:
+            void deleteAllSubnodes();
+
+            const Identifier* subclass_;                //!< The Identifier of the subclass the rule refers to
+            bool bIncluded_;                            //!< The rule: included or excluded
+            std::list<ClassTreeMaskNode*> subnodes_;    //!< A list containing all subnodes in the tree
+    };
+
+
+    // ###############################
+    // ###  ClassTreeMaskIterator  ###
+    // ###############################
+    //! The ClassTreeMaskIterator moves through all ClassTreeMaskNodes of the internal tree of a ClassTreeMask, containing the rules.
+    /**
+        Because of the complicated shape of the internal rule-tree of ClassTreeMask, an
+        iterator is used to move through all nodes of the tree. It starts with the BaseObject
+        and moves on to the first subclass until it reaches a leaf of the tree. Then the
+        iterator moves one step back and iterates to the second subclass. If there are no more
+        subclasses, it steps another step back, and so on.
+    */
+    class _CoreExport ClassTreeMaskIterator
+    {
+        public:
+            ClassTreeMaskIterator(ClassTreeMaskNode* node);
+            ~ClassTreeMaskIterator();
+
+            ClassTreeMaskIterator& operator++();
+            ClassTreeMaskNode* operator*() const;
+            ClassTreeMaskNode* operator->() const;
+            operator bool();
+            bool operator==(ClassTreeMaskNode* compare);
+            bool operator!=(ClassTreeMaskNode* compare);
+
+        private:
+            std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator> > nodes_;    //!< A stack to store list-iterators
+            std::list<ClassTreeMaskNode*> rootlist_;                                                                            //!< A list for internal use (it only stores the root-node)
+    };
+
+
+    // ###############################
+    // ###      ClassTreeMask      ###
+    // ###############################
+    //! The ClassTreeMask is a set of rules, containing the information for each class whether it's included or not.
+    /**
+        With a ClassTreeMask, you can include or exclude subtrees of the class-tree, starting
+        with a given subclass, described by the corresponding Identifier. To minimize the size
+        of the mask, the mask saves only relevant rules. But you can manually add rules that
+        don't change the information of the mask by using clean = false. If you want to drop
+        useless rules, call the clean() function.
+    */
+    class _CoreExport ClassTreeMask
+    {
+        public:
+            ClassTreeMask();
+            ClassTreeMask(const ClassTreeMask& other);
+            ~ClassTreeMask();
+
+            void include(const Identifier* subclass, bool overwrite = true, bool clean = true);
+            void exclude(const Identifier* subclass, bool overwrite = true, bool clean = true);
+            void add(const Identifier* subclass, bool bInclude, bool overwrite = true, bool clean = true);
+
+            void includeSingle(const Identifier* subclass, bool clean = true);
+            void excludeSingle(const Identifier* subclass, bool clean = true);
+            void addSingle(const Identifier* subclass, bool bInclude, bool clean = true);
+
+            void reset();
+            void clean();
+
+            bool isIncluded(const Identifier* subclass) const;
+            bool isExcluded(const Identifier* subclass) const;
+
+            ClassTreeMask& operator=(const ClassTreeMask& other);
+
+            ClassTreeMask& operator+();
+            ClassTreeMask operator-() const;
+
+            ClassTreeMask operator+(const ClassTreeMask& other) const;
+            ClassTreeMask operator*(const ClassTreeMask& other) const;
+            ClassTreeMask operator-(const ClassTreeMask& other) const;
+            ClassTreeMask operator!() const;
+
+            ClassTreeMask& operator+=(const ClassTreeMask& other);
+            ClassTreeMask& operator*=(const ClassTreeMask& other);
+            ClassTreeMask& operator-=(const ClassTreeMask& other);
+
+            ClassTreeMask operator&(const ClassTreeMask& other) const;
+            ClassTreeMask operator|(const ClassTreeMask& other) const;
+            ClassTreeMask operator^(const ClassTreeMask& other) const;
+            ClassTreeMask operator~() const;
+
+            ClassTreeMask& operator&=(const ClassTreeMask& other);
+            ClassTreeMask& operator|=(const ClassTreeMask& other);
+            ClassTreeMask& operator^=(const ClassTreeMask& other);
+
+            friend std::ostream& operator<<(std::ostream& out, const ClassTreeMask& mask);
+
+        private:
+            void add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite = true);
+            bool isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const;
+            void clean(ClassTreeMaskNode* node);
+            bool nodeExists(const Identifier* subclass);
+
+            ClassTreeMaskNode* root_;   //!< The root-node of the internal rule-tree, usually BaseObject
+    };
+}
+
+#endif /* _ClassTreeMask_H__ */
Index: /code/trunk/src/orxonox/core/ConfigValueContainer.cc
===================================================================
--- /code/trunk/src/orxonox/core/ConfigValueContainer.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/ConfigValueContainer.cc	(revision 871)
@@ -26,9 +26,15 @@
  */
 
+/**
+    @file ConfigValueContainer.cc
+    @brief Implementation of the ConfigValueContainer class.
+*/
+
 #include <fstream>
 
+#include "ConfigValueContainer.h"
 #include "util/Tokenizer.h"
 #include "util/Convert.h"
-#include "ConfigValueContainer.h"
+#include "Language.h"
 
 #define CONFIGFILEPATH "orxonox.ini"
@@ -43,298 +49,129 @@
         @param defvalue The default-value
     */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue)
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, MultiTypeMath defvalue)
     {
         this->bAddedDescription_ = false;
         this->classname_ = classname;
         this->varname_ = varname;
-        this->type_ = VT_Int;
-
-        ConvertValue(&this->defvalueString_, defvalue, std::string("0"));           // Try to convert the default-value to a string
+
+        this->valueToString(&this->defvalueString_, defvalue);                      // Try to convert the default-value to a string
         this->searchConfigFileLine();                                               // Search the entry in the config-file
 
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+        std::string valueString = this->parseValueString(!(defvalue.isA(MT_string) || defvalue.isA(MT_constchar)));     // Parses the value string from the config-file-entry
+        if (!this->parseString(valueString, defvalue))                              // Try to convert the string to a value
             this->resetConfigFileEntry();                                           // The conversion failed
     }
 
     /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_uInt;
-
-        ConvertValue(&this->defvalueString_, defvalue, std::string("0"));           // Try to convert the default-value to a string
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_Char;
-
-        ConvertValue(&this->defvalueString_, (int)defvalue, std::string("0"));      // Try to convert the default-value to a string
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_uChar;
-
-        ConvertValue(&this->defvalueString_, (unsigned int)defvalue, std::string("0"));     // Try to convert the default-value to a string
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_Float;
-
-        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_Double;
-
-        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_LongDouble;
-
-        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_Bool;
-
-        // Convert the default-value from bool to string
-        if (defvalue)
-            this->defvalueString_ = "true";
-        else
-            this->defvalueString_ = "false";
-
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_String;
-
-        this->defvalueString_ = "\"" + defvalue + "\"";                             // Convert the string to a "config-file-string" with quotes
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_ConstChar;
-
-        this->defvalueString_ = "\"" + std::string(defvalue) + "\"";                // Convert the string to a "config-file-string" with quotes
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_Vector2;
-
-        // Try to convert the default-value from Vector2 to string
-        std::ostringstream ostream;
-        if (ostream << "(" << defvalue.x << "," << defvalue.y << ")")
-            this->defvalueString_ = ostream.str();
-        else
-            this->defvalueString_ = "(0,0)";
-
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_Vector3;
-
-        // Try to convert the default-value from Vector3 to string
-        std::ostringstream ostream;
-        if (ostream << "(" << defvalue.x << "," << defvalue.y << "," << defvalue.z << ")")
-            this->defvalueString_ = ostream.str();
-        else
-            this->defvalueString_ = "(0,0,0)";
-
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
-    }
-
-    /**
-        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-        @param value This is only needed to determine the right type.
-        @param classname The name of the class the variable belongs to
-        @param varname The name of the variable
-        @param defvalue The default-value
-    */
-    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue)
-    {
-        this->bAddedDescription_ = false;
-        this->classname_ = classname;
-        this->varname_ = varname;
-        this->type_ = VT_ColourValue;
-
-        // Try to convert the default-value from ColourValue to string
-        std::ostringstream ostream;
-        if (ostream << "(" << defvalue.r << "," << defvalue.g << "," << defvalue.b << "," << defvalue.a << ")")
-            this->defvalueString_ = ostream.str();
-        else
-            this->defvalueString_ = "(0,0,0,0)";
-
-        this->searchConfigFileLine();                                               // Search the entry in the config-file
-        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
-        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
-            this->resetConfigFileEntry();                                           // The conversion failed
+        @brief Converts a value to a string.
+        @param output The string to write to
+        @param input The value to convert
+        @return True if the converson was successful
+    */
+    bool ConfigValueContainer::valueToString(std::string* output, MultiTypeMath& input)
+    {
+        if (input.getType() == MT_int)
+            return ConvertValue(output, input.getInt(), std::string("0"));
+        else if (input.getType() == MT_uint)
+            return ConvertValue(output, input.getUnsignedInt(), std::string("0"));
+        else if (input.getType() == MT_char)
+            return ConvertValue(output, (int)input.getChar(), std::string("0"));
+        else if (input.getType() == MT_uchar)
+            return ConvertValue(output, (unsigned int)input.getUnsignedChar(), std::string("0"));
+        else if (input.getType() == MT_short)
+            return ConvertValue(output, input.getShort(), std::string("0"));
+        else if (input.getType() == MT_ushort)
+            return ConvertValue(output, input.getUnsignedShort(), std::string("0"));
+        else if (input.getType() == MT_long)
+            return ConvertValue(output, input.getLong(), std::string("0"));
+        else if (input.getType() == MT_ulong)
+            return ConvertValue(output, input.getUnsignedLong(), std::string("0"));
+        else if (input.getType() == MT_float)
+            return ConvertValue(output, input.getFloat(), std::string("0.000000"));
+        else if (input.getType() == MT_double)
+            return ConvertValue(output, input.getDouble(), std::string("0.000000"));
+        else if (input.getType() == MT_longdouble)
+            return ConvertValue(output, input.getChar(), std::string("0.000000"));
+        else if (input.getType() == MT_bool)
+        {
+            if (input.getBool())
+                (*output) = "true";
+            else
+                (*output) = "false";
+
+            return true;
+        }
+        else if (input.getType() == MT_constchar)
+        {
+            (*output) = "\"" + input.getString() + "\"";
+            return true;
+        }
+        else if (input.getType() == MT_string)
+        {
+            (*output) = "\"" + input.getString() + "\"";
+            return true;
+        }
+        else if (input.getType() == MT_vector2)
+        {
+            std::ostringstream ostream;
+            if (ostream << "(" << input.getVector2().x << "," << input.getVector2().y << ")")
+            {
+                (*output) = ostream.str();
+                return true;
+            }
+            else
+            {
+                (*output) = "(0,0)";
+                return false;
+            }
+        }
+        else if (input.getType() == MT_vector3)
+        {
+            std::ostringstream ostream;
+            if (ostream << "(" << input.getVector3().x << "," << input.getVector3().y << "," << input.getVector3().z << ")")
+            {
+                (*output) = ostream.str();
+                return true;
+            }
+            else
+            {
+                (*output) = "(0,0,0)";
+                return false;
+            }
+        }
+        else if (input.getType() == MT_colourvalue)
+        {
+            std::ostringstream ostream;
+            if (ostream << "(" << input.getColourValue().r << "," << input.getColourValue().g << "," << input.getColourValue().b << "," << input.getColourValue().a << ")")
+            {
+                (*output) = ostream.str();
+                return true;
+            }
+            else
+            {
+                (*output) = "(0,0,0,0)";
+                return false;
+            }
+        }
+        else if (input.getType() == MT_quaternion)
+        {
+            std::ostringstream ostream;
+            if (ostream << "(" << input.getQuaternion().w << "," << input.getQuaternion().x << "," << input.getQuaternion().y << "," << input.getQuaternion().z << ")")
+            {
+                (*output) = ostream.str();
+                return true;
+            }
+            else
+            {
+                (*output) = "(0,0,0,0)";
+                return false;
+            }
+        }
+        else if (input.getType() == MT_radian)
+            return ConvertValue(output, input.getRadian(), std::string("0.000000"));
+        else if (input.getType() == MT_degree)
+            return ConvertValue(output, input.getDegree(), std::string("0.000000"));
+
+        return false;
     }
 
@@ -344,32 +181,46 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input)
-    {
-        if (this->type_ == ConfigValueContainer::VT_Int)
-            return this->parseSting(input, this->value_.value_int_);
-        else if (this->type_ == ConfigValueContainer::VT_uInt)
-            return this->parseSting(input, this->value_.value_uint_);
-        else if (this->type_ == ConfigValueContainer::VT_Char)
-            return this->parseSting(input, this->value_.value_char_);
-        else if (this->type_ == ConfigValueContainer::VT_uChar)
-            return this->parseSting(input, this->value_.value_uchar_);
-        else if (this->type_ == ConfigValueContainer::VT_Float)
-            return this->parseSting(input, this->value_.value_float_);
-        else if (this->type_ == ConfigValueContainer::VT_Double)
-            return this->parseSting(input, this->value_.value_double_);
-        else if (this->type_ == ConfigValueContainer::VT_LongDouble)
-            return this->parseSting(input, this->value_.value_long_double_);
-        else if (this->type_ == ConfigValueContainer::VT_Bool)
-            return this->parseSting(input, this->value_.value_bool_);
-        else if (this->type_ == ConfigValueContainer::VT_String)
-            return this->parseSting(input, this->value_string_);
-        else if (this->type_ == ConfigValueContainer::VT_ConstChar)
-            return this->parseSting(input, this->value_string_);
-        else if (this->type_ == ConfigValueContainer::VT_Vector2)
-            return this->parseSting(input, this->value_vector2_);
-        else if (this->type_ == ConfigValueContainer::VT_Vector3)
-            return this->parseSting(input, this->value_vector3_);
-        else if (this->type_ == ConfigValueContainer::VT_ColourValue)
-            return this->parseSting(input, this->value_colourvalue_);
+    bool ConfigValueContainer::parseString(const std::string& input, MultiTypeMath& defvalue)
+    {
+        if (defvalue.getType() == MT_int)
+            return this->parseString(input, defvalue.getInt());
+        else if (defvalue.getType() == MT_uint)
+            return this->parseString(input, defvalue.getUnsignedInt());
+        else if (defvalue.getType() == MT_char)
+            return this->parseString(input, defvalue.getChar());
+        else if (defvalue.getType() == MT_uchar)
+            return this->parseString(input, defvalue.getUnsignedChar());
+        else if (defvalue.getType() == MT_short)
+            return this->parseString(input, defvalue.getShort());
+        else if (defvalue.getType() == MT_ushort)
+            return this->parseString(input, defvalue.getUnsignedShort());
+        else if (defvalue.getType() == MT_long)
+            return this->parseString(input, defvalue.getLong());
+        else if (defvalue.getType() == MT_ulong)
+            return this->parseString(input, defvalue.getUnsignedLong());
+        else if (defvalue.getType() == MT_float)
+            return this->parseString(input, defvalue.getFloat());
+        else if (defvalue.getType() == MT_double)
+            return this->parseString(input, defvalue.getDouble());
+        else if (defvalue.getType() == MT_longdouble)
+            return this->parseString(input, defvalue.getLongDouble());
+        else if (defvalue.getType() == MT_bool)
+            return this->parseString(input, defvalue.getBool());
+        else if (defvalue.getType() == MT_constchar)
+            return this->parseString(input, defvalue.getString());
+        else if (defvalue.getType() == MT_string)
+            return this->parseString(input, defvalue.getString());
+        else if (defvalue.getType() == MT_vector2)
+            return this->parseString(input, defvalue.getVector2());
+        else if (defvalue.getType() == MT_vector3)
+            return this->parseString(input, defvalue.getVector3());
+        else if (defvalue.getType() == MT_colourvalue)
+            return this->parseString(input, defvalue.getColourValue());
+        else if (defvalue.getType() == MT_quaternion)
+            return this->parseString(input, defvalue.getQuaternion());
+        else if (defvalue.getType() == MT_radian)
+            return this->parseString(input, defvalue.getRadian());
+        else if (defvalue.getType() == MT_degree)
+            return this->parseString(input, defvalue.getDegree());
 
         return false;
@@ -382,7 +233,10 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, int defvalue)
-    {
-        return ConvertValue(&this->value_.value_int_, input, defvalue);
+    bool ConfigValueContainer::parseString(const std::string& input, int defvalue)
+    {
+        int temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
     }
 
@@ -393,7 +247,10 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, unsigned int defvalue)
-    {
-        return ConvertValue(&this->value_.value_uint_, input, defvalue);
+    bool ConfigValueContainer::parseString(const std::string& input, unsigned int defvalue)
+    {
+        unsigned int temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
     }
 
@@ -404,8 +261,11 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, char defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, char defvalue)
     {
         // I used value_int_ instead of value_char_ to avoid number <-> char confusion in the config-file
-        return ConvertValue(&this->value_.value_int_, input, (int)defvalue);
+        int temp;
+        bool success = ConvertValue(&temp, input, (int)defvalue);
+        this->value_.setValue((char)temp);
+        return success;
     }
 
@@ -416,8 +276,67 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, unsigned char defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, unsigned char defvalue)
     {
         // I used value_uint_ instead of value_uchar_ to avoid number <-> char confusion in the config-file
-        return ConvertValue(&this->value_.value_uint_, input, (unsigned int)defvalue);
+        unsigned int temp;
+        bool success = ConvertValue(&temp, input, (unsigned int)defvalue);
+        this->value_.setValue((unsigned char)temp);
+        return success;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type short and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseString(const std::string& input, short defvalue)
+    {
+        short temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type unsigned short and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseString(const std::string& input, unsigned short defvalue)
+    {
+        unsigned short temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type long and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseString(const std::string& input, long defvalue)
+    {
+        long temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type unsigned long and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseString(const std::string& input, unsigned long defvalue)
+    {
+        unsigned long temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
     }
 
@@ -428,7 +347,10 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, float defvalue)
-    {
-        return ConvertValue(&this->value_.value_float_, input, defvalue);
+    bool ConfigValueContainer::parseString(const std::string& input, float defvalue)
+    {
+        float temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
     }
 
@@ -439,7 +361,10 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, double defvalue)
-    {
-        return ConvertValue(&this->value_.value_double_, input, defvalue);
+    bool ConfigValueContainer::parseString(const std::string& input, double defvalue)
+    {
+        double temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
     }
 
@@ -450,7 +375,10 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, long double defvalue)
-    {
-        return ConvertValue(&this->value_.value_long_double_, input, defvalue);
+    bool ConfigValueContainer::parseString(const std::string& input, long double defvalue)
+    {
+        long double temp;
+        bool success = ConvertValue(&temp, input, defvalue);
+        this->value_.setValue(temp);
+        return success;
     }
 
@@ -461,5 +389,5 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, bool defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, bool defvalue)
     {
         // Try to parse the value-string - is it a word?
@@ -468,14 +396,17 @@
          || input.find("yes") < input.size()
          || input.find("Yes") < input.size())
-            this->value_.value_bool_ = true;
+            this->value_.setValue(true);
         else if (input.find("false") < input.size()
               || input.find("False") < input.size()
               || input.find("no") < input.size()
               || input.find("No") < input.size())
-            this->value_.value_bool_ = false;
+            this->value_.setValue(false);
         else
         {
             // Its not a known word - is it a number?
-            return ConvertValue(&this->value_.value_bool_, input, defvalue);
+            bool temp;
+            bool success = ConvertValue(&temp, input, defvalue);
+            this->value_.setValue(temp);
+            return success;
         }
 
@@ -489,5 +420,5 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, const std::string& defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, const std::string& defvalue)
     {
         // Strip the quotes
@@ -499,10 +430,10 @@
         {
             // It was - get the string between the quotes
-            this->value_string_ = input.substr(pos1, pos2 - pos1);
+            this->value_.setValue(input.substr(pos1, pos2 - pos1));
             return true;
         }
 
         // It wasn't - use the default-value and restore the entry in the config-file.
-        this->value_string_ = defvalue;
+        this->value_.setValue(defvalue);
         return false;
     }
@@ -514,5 +445,5 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, const char* defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, const char* defvalue)
     {
         // Strip the quotes
@@ -524,10 +455,10 @@
         {
             // It was - get the string between the quotes
-            this->value_string_ = input.substr(pos1, pos2 - pos1);
+            this->value_.setValue(input.substr(pos1, pos2 - pos1));
             return true;
         }
 
         // It wasn't - use the default-value and restore the entry in the config-file.
-        this->value_string_ = defvalue;
+        this->value_.setValue(defvalue);
         return false;
     }
@@ -539,5 +470,5 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, const Vector2& defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, const Vector2& defvalue)
     {
         // Strip the value-string
@@ -549,12 +480,12 @@
         {
             std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
-            if (!ConvertValue(&this->value_vector2_.x, tokens[0]))
-            {
-                this->value_vector2_ = defvalue;
-                return false;
-            }
-            if (!ConvertValue(&this->value_vector2_.y, tokens[1]))
-            {
-                this->value_vector2_ = defvalue;
+            if (!ConvertValue(&this->value_.getVector2().x, tokens[0]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getVector2().y, tokens[1]))
+            {
+                this->value_.setValue(defvalue);
                 return false;
             }
@@ -563,5 +494,5 @@
         }
 
-        this->value_vector2_ = defvalue;
+        this->value_.setValue(defvalue);
         return false;
     }
@@ -573,5 +504,5 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, const Vector3& defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, const Vector3& defvalue)
     {
         // Strip the value-string
@@ -583,17 +514,17 @@
         {
             std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
-            if (!ConvertValue(&this->value_vector3_.x, tokens[0]))
-            {
-                this->value_vector3_ = defvalue;
-                return false;
-            }
-            if (!ConvertValue(&this->value_vector3_.y, tokens[1]))
-            {
-                this->value_vector3_ = defvalue;
-                return false;
-            }
-            if (!ConvertValue(&this->value_vector3_.z, tokens[2]))
-            {
-                this->value_vector3_ = defvalue;
+            if (!ConvertValue(&this->value_.getVector3().x, tokens[0]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getVector3().y, tokens[1]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getVector3().z, tokens[2]))
+            {
+                this->value_.setValue(defvalue);
                 return false;
             }
@@ -602,5 +533,5 @@
         }
 
-        this->value_vector3_ = defvalue;
+        this->value_.setValue(defvalue);
         return false;
     }
@@ -612,5 +543,5 @@
         @return True if the string was successfully parsed
     */
-    bool ConfigValueContainer::parseSting(const std::string& input, const ColourValue& defvalue)
+    bool ConfigValueContainer::parseString(const std::string& input, const ColourValue& defvalue)
     {
         // Strip the value-string
@@ -622,22 +553,22 @@
         {
             std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
-            if (!ConvertValue(&this->value_colourvalue_.r, tokens[0]))
-            {
-                this->value_colourvalue_ = defvalue;
-                return false;
-            }
-            if (!ConvertValue(&this->value_colourvalue_.g, tokens[1]))
-            {
-                this->value_colourvalue_ = defvalue;
-                return false;
-            }
-            if (!ConvertValue(&this->value_colourvalue_.b, tokens[2]))
-            {
-                this->value_colourvalue_ = defvalue;
-                return false;
-            }
-            if (!ConvertValue(&this->value_colourvalue_.a, tokens[3]))
-            {
-                this->value_colourvalue_ = defvalue;
+            if (!ConvertValue(&this->value_.getColourValue().r, tokens[0]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getColourValue().g, tokens[1]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getColourValue().b, tokens[2]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getColourValue().a, tokens[3]))
+            {
+                this->value_.setValue(defvalue);
                 return false;
             }
@@ -646,6 +577,72 @@
         }
 
-        this->value_colourvalue_ = defvalue;
+        this->value_.setValue(defvalue);
         return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type Quaternion and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseString(const std::string& input, const Quaternion& defvalue)
+    {
+        // Strip the value-string
+        unsigned int pos1 = input.find("(") + 1;
+        unsigned int pos2 = input.find(")", pos1);
+
+        // Try to convert the stripped value-string to Vector3
+        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
+        {
+            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
+            if (!ConvertValue(&this->value_.getQuaternion().w, tokens[0]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getQuaternion().x, tokens[1]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getQuaternion().y, tokens[2]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+            if (!ConvertValue(&this->value_.getQuaternion().z, tokens[3]))
+            {
+                this->value_.setValue(defvalue);
+                return false;
+            }
+
+            return true;
+        }
+
+        this->value_.setValue(defvalue);
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseString(const std::string& input, const Radian& defvalue)
+    {
+        return ConvertValue(&this->value_.getRadian(), input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseString(const std::string& input, const Degree& defvalue)
+    {
+        return ConvertValue(&this->value_.getDegree(), input, defvalue);
     }
 
@@ -664,5 +661,5 @@
     void ConfigValueContainer::resetConfigValue()
     {
-        this->parseSting(this->defvalueString_);
+        this->parseString(this->defvalueString_, this->value_);
         this->resetConfigFileEntry();
     }
@@ -837,5 +834,6 @@
 
     /**
-        @returns a list, containing all entrys in the config-file.
+        @brief Rreturns a list, containing all entrys in the config-file.
+        @return The list
     */
     std::list<std::string>& ConfigValueContainer::getConfigFileLines()
@@ -879,4 +877,5 @@
         if (!file.is_open())
         {
+            COUT(1) << "An error occurred in ConfigValueContainer.cc:" << std::endl;
             COUT(1) << "Error: Couldn't open config-file " << filename << " to read the config values!" << std::endl;
             return;
@@ -925,4 +924,5 @@
         if (!file.is_open())
         {
+            COUT(1) << "An error occurred in ConfigValueContainer.cc:" << std::endl;
             COUT(1) << "Error: Couldn't open config-file " << filename << " to write the config values!" << std::endl;
             return;
@@ -948,7 +948,16 @@
         {
             this->description_ = std::string("ConfigValueDescription::" + this->classname_ + "::" + this->varname_);
-            Language::getLanguage().addEntry(this->description_, description);
+            AddLanguageEntry(this->description_, description);
             this->bAddedDescription_ = true;
         }
     }
+
+    /**
+        @brief Returns the description of the config-value.
+        @return The description
+    */
+    const std::string& ConfigValueContainer::getDescription() const
+    {
+        return GetLocalisation(this->description_);
+    }
 }
Index: /code/trunk/src/orxonox/core/ConfigValueContainer.h
===================================================================
--- /code/trunk/src/orxonox/core/ConfigValueContainer.h	(revision 870)
+++ /code/trunk/src/orxonox/core/ConfigValueContainer.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file ConfigValueContainer.h
     @brief Definition of the ConfigValueContainer class.
@@ -49,5 +49,5 @@
 
 #include "util/Math.h"
-#include "Language.h"
+#include "util/MultiTypeMath.h"
 
 namespace orxonox
@@ -72,65 +72,36 @@
     {
         public:
-            enum VariableType
-            {
-                VT_Int,
-                VT_uInt,
-                VT_Char,
-                VT_uChar,
-                VT_Float,
-                VT_Double,
-                VT_LongDouble,
-                VT_Bool,
-                VT_ConstChar,
-                VT_String,
-                VT_Vector2,
-                VT_Vector3,
-                VT_ColourValue
-            };
+            ConfigValueContainer(const std::string& classname, const std::string& varname, MultiTypeMath defvalue);
 
-            ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue);
-            ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue);
-
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(int& value)                           { value = this->value_.value_int_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(unsigned int& value)                  { value = this->value_.value_uint_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(char& value)                          { value = this->value_.value_char_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(unsigned char& value)                 { value = this->value_.value_uchar_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(float& value)                         { value = this->value_.value_float_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(double& value)                        { value = this->value_.value_double_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(long double& value)                   { value = this->value_.value_long_double_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(bool& value)                          { value = this->value_.value_bool_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(std::string& value)                   { value = this->value_string_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(const char* value)                    { value = this->value_string_.c_str(); return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(Vector2& value)                       { value = this->value_vector2_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(Vector3& value)                       { value = this->value_vector3_; return *this; }
-            /** @returns the value. @param value This is only needed to determine the right type. */
-            inline ConfigValueContainer& getValue(ColourValue& value)                   { value = this->value_colourvalue_; return *this; }
+            /** @brief Returns the configured value. @param value This is only needed to determine the right type. @return The value */
+/*            template <typename T>
+            inline ConfigValueContainer& getValue(T& value)                           { this->value_.getValue(value); return *this; }
+*/
+            inline ConfigValueContainer& getValue(int* value)            { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(unsigned int* value)   { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(char* value)           { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(unsigned char* value)  { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(short* value)          { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(unsigned short* value) { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(long* value)           { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(unsigned long* value)  { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(float* value)          { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(double* value)         { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(long double* value)    { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(bool* value)           { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(std::string* value)    { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(const char** value)    { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(Vector2* value)        { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(Vector3* value)        { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(ColourValue* value)    { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(Quaternion* value)     { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(Radian* value)         { this->value_.getValue(value); return *this; }
+            inline ConfigValueContainer& getValue(Degree* value)         { this->value_.getValue(value); return *this; }
 
             void description(const std::string& description);
+            const std::string& getDescription() const;
 
-            bool parseSting(const std::string& input);
+            bool parseString(const std::string& input, MultiTypeMath& defvalue);
+            bool valueToString(std::string* output, MultiTypeMath& input);
             void resetConfigFileEntry();
             void resetConfigValue();
@@ -141,17 +112,24 @@
 
         private:
-            bool parseSting(const std::string& input, int defvalue);
-            bool parseSting(const std::string& input, unsigned int defvalue);
-            bool parseSting(const std::string& input, char defvalue);
-            bool parseSting(const std::string& input, unsigned char defvalue);
-            bool parseSting(const std::string& input, float defvalue);
-            bool parseSting(const std::string& input, double defvalue);
-            bool parseSting(const std::string& input, long double defvalue);
-            bool parseSting(const std::string& input, bool defvalue);
-            bool parseSting(const std::string& input, const std::string& defvalue);
-            bool parseSting(const std::string& input, const char* defvalue);
-            bool parseSting(const std::string& input, const Vector2& defvalue);
-            bool parseSting(const std::string& input, const Vector3& defvalue);
-            bool parseSting(const std::string& input, const ColourValue& defvalue);
+            bool parseString(const std::string& input, int defvalue);
+            bool parseString(const std::string& input, unsigned int defvalue);
+            bool parseString(const std::string& input, char defvalue);
+            bool parseString(const std::string& input, unsigned char defvalue);
+            bool parseString(const std::string& input, short defvalue);
+            bool parseString(const std::string& input, unsigned short defvalue);
+            bool parseString(const std::string& input, long defvalue);
+            bool parseString(const std::string& input, unsigned long defvalue);
+            bool parseString(const std::string& input, float defvalue);
+            bool parseString(const std::string& input, double defvalue);
+            bool parseString(const std::string& input, long double defvalue);
+            bool parseString(const std::string& input, bool defvalue);
+            bool parseString(const std::string& input, const std::string& defvalue);
+            bool parseString(const std::string& input, const char* defvalue);
+            bool parseString(const std::string& input, const Vector2& defvalue);
+            bool parseString(const std::string& input, const Vector3& defvalue);
+            bool parseString(const std::string& input, const ColourValue& defvalue);
+            bool parseString(const std::string& input, const Quaternion& defvalue);
+            bool parseString(const std::string& input, const Radian& defvalue);
+            bool parseString(const std::string& input, const Degree& defvalue);
 
             static std::list<std::string>& getConfigFileLines();
@@ -167,26 +145,10 @@
             std::string         defvalueString_;                //!< The string of the default-variable
 
-            union MultiType
-            {
-                int                 value_int_;                 //!< The value, if the variable is of the type int
-                unsigned int        value_uint_;                //!< The value, if the variable is of the type unsigned int
-                char                value_char_;                //!< The value, if the variable is of the type char
-                unsigned char       value_uchar_;               //!< The value, if the variable is of the type unsigned char
-                float               value_float_;               //!< The value, if the variable is of the type float
-                double              value_double_;              //!< The value, if the variable is of the type double
-                long double         value_long_double_;         //!< The value, if the variable is of the type long double
-                bool                value_bool_;                //!< The value, if the variable is of the type bool
-            } value_;                                           //!< The value of the variable
-
-            std::string         value_string_;                  //!< The value, if the variable is of the type string
-            Vector2             value_vector2_;                 //!< The value, if the variable is of the type Vector2
-            Vector3             value_vector3_;                 //!< The value, if the variable is of the type Vector3
-            ColourValue         value_colourvalue_;             //!< The value, if the variable is of the type ColourValue
+            MultiTypeMath       value_;                         //!< The value
 
             std::list<std::string>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
 
-            VariableType type_;                                 //!< The type of the variable
             bool bAddedDescription_;                            //!< True if a description was added
-            LanguageEntryName description_;                     //!< The description
+            LanguageEntryLabel description_;                    //!< The description
     };
 }
Index: /code/trunk/src/orxonox/core/CoreIncludes.h
===================================================================
--- /code/trunk/src/orxonox/core/CoreIncludes.h	(revision 870)
+++ /code/trunk/src/orxonox/core/CoreIncludes.h	(revision 871)
@@ -44,4 +44,5 @@
 // All needed header-files
 #include "Identifier.h"
+#include "ClassManager.h"
 #include "Factory.h"
 #include "ClassFactory.h"
@@ -51,4 +52,6 @@
 #include "Debug.h"
 
+
+// All needed macros
 /**
     @brief Intern macro, containing the common parts of RegisterObject and RegisterRootObject.
@@ -57,8 +60,8 @@
 */
 #define InternRegisterObject(ClassName, bRootClass) \
-    this->setIdentifier(orxonox::ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \
+    this->setIdentifier(orxonox::ClassManager<ClassName>::getIdentifier()->registerClass(this->getParents(), #ClassName, bRootClass)); \
     if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \
-        this->getParents()->add(this->getIdentifier()); \
-    orxonox::ClassIdentifier<ClassName>::addObject(this)
+        this->getParents()->insert(this->getParents()->end(), this->getIdentifier()); \
+    orxonox::ClassManager<ClassName>::getIdentifier()->addObject(this)
 
 /**
@@ -68,5 +71,5 @@
 #define InternRegisterRootObject(ClassName) \
     if (orxonox::Identifier::isCreatingHierarchy() && !this->getParents()) \
-        this->setParents(new orxonox::IdentifierList()); \
+        this->createParents(); \
     InternRegisterObject(ClassName, true)
 
@@ -76,5 +79,5 @@
 */
 #define RegisterObject(ClassName) \
-    COUT(4) << "*** Register Object: " << #ClassName << std::endl; \
+    COUT(5) << "*** Register Object: " << #ClassName << std::endl; \
     InternRegisterObject(ClassName, false)
 
@@ -84,25 +87,6 @@
 */
 #define RegisterRootObject(ClassName) \
-    COUT(4) << "*** Register Root-Object: " << #ClassName << std::endl; \
+    COUT(5) << "*** Register Root-Object: " << #ClassName << std::endl; \
     InternRegisterRootObject(ClassName)
-
-/**
-    @brief Exports the necessary templates in order to make them available to all libraries.
-    @param ClassName The name of the Class
-    @param LibraryName The name of the Library
-*/
-#define ExportClass(ClassName, LibraryName) \
-    template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
-    template class _##LibraryName##Export orxonox::ObjectList<ClassName>; \
-    template class _##LibraryName##Export orxonox::ClassFactory<ClassName>
-
-/**
-    @brief Exports the necessary templates in order to make them available to all libraries.
-    @param ClassName The name of the Class
-    @param LibraryName The name of the Library
-*/
-#define ExportAbstractClass(ClassName, LibraryName) \
-    template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
-    template class _##LibraryName##Export orxonox::ObjectList<ClassName>
 
 /**
@@ -111,5 +95,5 @@
 */
 #define Class(ClassName) \
-    ClassIdentifier<ClassName>::getIdentifier()
+    ClassManager<ClassName>::getIdentifier()
 
 /**
@@ -137,7 +121,7 @@
     { \
         container##varname = new orxonox::ConfigValueContainer(this->getIdentifier()->getName(), #varname, varname = defvalue); \
-        this->getIdentifier()->setConfigValueContainer(#varname, container##varname); \
+        this->getIdentifier()->addConfigValueContainer(#varname, container##varname); \
     } \
-    container##varname->getValue(varname)
+    container##varname->getValue(&varname)
 
 /**
@@ -150,5 +134,5 @@
     { \
         container##varname##reset->resetConfigValue(); \
-        container##varname##reset->getValue(varname); \
+        container##varname##reset->getValue(&varname); \
     } \
     else \
Index: /code/trunk/src/orxonox/core/CorePrereqs.h
===================================================================
--- /code/trunk/src/orxonox/core/CorePrereqs.h	(revision 870)
+++ /code/trunk/src/orxonox/core/CorePrereqs.h	(revision 871)
@@ -27,10 +27,12 @@
 
 /**
- @file  OrxonoxPrereq.h
- @brief Contains all the necessary forward declarations for all classes, structs and enums.
- */
+    @file  CorePrereq.h
+    @brief Contains all the necessary forward declarations for all classes, structs and enums.
+*/
 
 #ifndef _CorePrereqs_H__
 #define _CorePrereqs_H__
+
+#include <string>
 
 #include "orxonox/OrxonoxPlatform.h"
@@ -63,4 +65,6 @@
 namespace orxonox
 {
+  typedef std::string LanguageEntryLabel;
+
   class ArgReader;
   class BaseFactory;
@@ -70,15 +74,21 @@
   template <class T>
   class ClassIdentifier;
+  template <class T>
+  class ClassManager;
+  class ClassTreeMask;
+  class ClassTreeMaskIterator;
+  class ClassTreeMaskNode;
   class ConfigValueContainer;
   class DebugLevel;
   class Error;
+  class Executor;
   class Factory;
   class Identifier;
-  class IdentifierList;
-  class IdentifierListElement;
+  class IdentifierDistributor;
   template <class T>
   class Iterator;
   class Language;
   class LanguageEntry;
+  class Level;
   class Loader;
   class MetaObjectList;
@@ -93,4 +103,10 @@
   template <class T>
   class SubclassIdentifier;
+  template <class T, class O>
+  class XMLPortClassObjectContainer;
+  template <class T>
+  class XMLPortClassParamContainer;
+  class XMLPortObjectContainer;
+  class XMLPortParamContainer;
 }
 
Index: /code/trunk/src/orxonox/core/Debug.h
===================================================================
--- /code/trunk/src/orxonox/core/Debug.h	(revision 870)
+++ /code/trunk/src/orxonox/core/Debug.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
  * @file Debug.h
  * @brief Handles the output for different verbose-modes.
@@ -55,5 +55,5 @@
 #define ORX_PRINT_DEBUG_OUTPUT 1 // <-- fix that! should be a configurable setting
 
-#define ORX_HARD_DEBUG_LEVEL ORX_DEBUG
+#define ORX_HARD_DEBUG_LEVEL ORX_vDEBUG
 //#define ORX_SOFT_DEBUG_LEVEL ORX_WARNING // <-- fix that! should be a configurable setting
 
Index: /code/trunk/src/orxonox/core/DebugLevel.cc
===================================================================
--- /code/trunk/src/orxonox/core/DebugLevel.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/DebugLevel.cc	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file DebugLevel.cc
     @brief Implementation of the DebugLevel class.
@@ -32,4 +32,5 @@
 
 #include "DebugLevel.h"
+#include "CoreIncludes.h"
 
 namespace orxonox
@@ -99,5 +100,6 @@
 
 /**
-    @returns the soft debug level, stored in the only existing instance of the DebugLevel class, configured in the config-file.
+    @brief Returns the soft debug level, stored in the only existing instance of the DebugLevel class, configured in the config-file.
+    @return The soft debug level
 */
 int getSoftDebugLevel()
Index: /code/trunk/src/orxonox/core/DebugLevel.h
===================================================================
--- /code/trunk/src/orxonox/core/DebugLevel.h	(revision 870)
+++ /code/trunk/src/orxonox/core/DebugLevel.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file DebugLevel.h
     @brief Definition of the DebugLevel class.
@@ -41,5 +41,4 @@
 #include "OrxonoxClass.h"
 #include "OutputHandler.h"
-#include "CoreIncludes.h"
 
 namespace orxonox
@@ -66,5 +65,4 @@
             ConfigValueContainer* softDebugLevelContainer_; //!< The config value container for the debug level
     };
-    ExportAbstractClass(DebugLevel, Core);
 }
 
Index: /code/trunk/src/orxonox/core/Error.cc
===================================================================
--- /code/trunk/src/orxonox/core/Error.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/Error.cc	(revision 871)
@@ -25,4 +25,9 @@
  *
  */
+
+/**
+    @file Error.cc
+    @brief Implementation of the Error class.
+*/
 
 #include "Debug.h"
Index: /code/trunk/src/orxonox/core/Error.h
===================================================================
--- /code/trunk/src/orxonox/core/Error.h	(revision 870)
+++ /code/trunk/src/orxonox/core/Error.h	(revision 871)
@@ -26,4 +26,9 @@
  */
 
+/**
+    @file Error.h
+    @brief Definition of the Error class.
+*/
+
 #ifndef _Error_H__
 #define _Error_H__
Index: /code/trunk/src/orxonox/core/Executor.cc
===================================================================
--- /code/trunk/src/orxonox/core/Executor.cc	(revision 871)
+++ /code/trunk/src/orxonox/core/Executor.cc	(revision 871)
@@ -0,0 +1,118 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: Executor by Benjamin Grauer
+ */
+
+#include "Executor.h"
+#include "Language.h"
+#include "util/String.h"
+
+namespace orxonox
+{
+    Executor::Executor(Functor* functor, const std::string& name)
+    {
+        this->functor_ = functor;
+        this->name_ = name;
+        this->bAddedDescription_ = false;
+        this->bAddedDescriptionReturnvalue_ = false;
+        this->bAddedDescriptionParam_[0] = false;
+        this->bAddedDescriptionParam_[1] = false;
+        this->bAddedDescriptionParam_[2] = false;
+        this->bAddedDescriptionParam_[3] = false;
+        this->bAddedDescriptionParam_[4] = false;
+    }
+
+    Executor::~Executor()
+    {
+    }
+
+    void Executor::setName(const std::string name)
+    {
+        this->name_ = name;
+    }
+
+    const std::string& Executor::getName() const
+    {
+        return this->name_;
+    }
+
+    void Executor::description(const std::string& description)
+    {
+        if (!this->bAddedDescription_)
+        {
+            this->description_ = std::string("ExecutorDescription::" + this->name_ + "::function");
+            AddLanguageEntry(this->description_, description);
+            this->bAddedDescription_ = true;
+        }
+    }
+
+    const std::string& Executor::getDescription() const
+    {
+        return GetLocalisation(this->description_);
+    }
+
+    void Executor::descriptionParam(int param, const std::string& description)
+    {
+        if (param > 0 && param <= 5)
+        {
+            if (!this->bAddedDescriptionParam_[param])
+            {
+                std::string paramnumber;
+                if (!Convert::ToString(&paramnumber, param))
+                    return;
+
+                this->descriptionParam_[param] = std::string("ExecutorDescription::" + this->name_ + "::param" + paramnumber);
+                AddLanguageEntry(this->descriptionParam_[param], description);
+                this->bAddedDescriptionParam_[param] = true;
+            }
+        }
+    }
+
+    const std::string& Executor::getDescriptionParam(int param) const
+    {
+        if (param > 0 && param <= 5)
+        {
+            return GetLocalisation(this->descriptionParam_[param]);
+        }
+
+        return this->descriptionParam_[0];
+    }
+
+    void Executor::descriptionReturnvalue(const std::string& description)
+    {
+        if (!this->bAddedDescriptionReturnvalue_)
+        {
+            this->descriptionReturnvalue_ = std::string("ExecutorDescription::" + this->name_ + "::returnvalue");
+            AddLanguageEntry(this->descriptionReturnvalue_, description);
+            this->bAddedDescriptionReturnvalue_ = true;
+        }
+    }
+
+    const std::string& Executor::getDescriptionReturnvalue(int param) const
+    {
+        return GetLocalisation(this->descriptionReturnvalue_);
+    }
+}
Index: /code/trunk/src/orxonox/core/Executor.h
===================================================================
--- /code/trunk/src/orxonox/core/Executor.h	(revision 871)
+++ /code/trunk/src/orxonox/core/Executor.h	(revision 871)
@@ -0,0 +1,117 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: Executor by Benjamin Grauer
+ */
+
+#ifndef _Executor_H__
+#define _Executor_H__
+
+#include "CorePrereqs.h"
+#include "Functor.h"
+
+namespace orxonox
+{
+    class _CoreExport Executor
+    {
+        public:
+            Executor(Functor* functor, const std::string& name = "");
+            virtual ~Executor();
+
+            inline virtual void operator()(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null)
+                { (*this->functor_)(param1, param2, param3, param4, param5); }
+
+            void setName(const std::string name);
+            const std::string& getName() const;
+
+            void description(const std::string& description);
+            const std::string& getDescription() const;
+
+            void descriptionParam(int param, const std::string& description);
+            const std::string& getDescriptionParam(int param) const;
+
+            void descriptionReturnvalue(const std::string& description);
+            const std::string& getDescriptionReturnvalue(int param) const;
+
+            inline int getParamCount() const
+                { return this->functor_->getParamCount(); }
+            inline bool hasReturnvalue() const
+                { return this->functor_->hasReturnvalue(); }
+            inline FunctionType getType() const
+                { return this->functor_->getType(); }
+            inline MultiTypeMath getReturnvalue() const
+                { return this->functor_->getReturnvalue(); }
+            inline std::string getTypenameParam(int param) const
+                { return this->functor_->getTypenameParam(param); }
+            inline std::string getTypenameReturnvalue() const
+                { return this->functor_->getTypenameReturnvalue(); }
+
+        protected:
+            Functor* functor_;
+
+        private:
+            std::string name_;
+
+            LanguageEntryLabel description_;
+            LanguageEntryLabel descriptionReturnvalue_;
+            LanguageEntryLabel descriptionParam_[5];
+
+            bool bAddedDescription_;
+            bool bAddedDescriptionReturnvalue_;
+            bool bAddedDescriptionParam_[5];
+    };
+
+    class _CoreExport ExecutorStatic : public Executor
+    {
+        public:
+            ExecutorStatic(FunctorStatic* functor, const std::string& name = "") : Executor(functor, name) {}
+            virtual ~ExecutorStatic() {}
+
+            inline virtual void operator()(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null)
+                { (*this->functor_)(param1, param2, param3, param4, param5); }
+    };
+
+    template <class T>
+    class ExecutorMember : public Executor
+    {
+        public:
+            ExecutorMember(FunctorMember<T>* functor, const std::string& name = "") : Executor(functor, name) {}
+            virtual ~ExecutorMember() {}
+
+            inline virtual void operator()(T* object, const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null)
+                { (*this->functor_)(object, param1, param2, param3, param4, param5); }
+            inline virtual void operator()(const T* object, const MultiTypeMath param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null)
+                { (*this->functor_)(object, param1, param2, param3, param4, param5); }
+            inline virtual void operator()(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null)
+                { (*this->functor_)(param1, param2, param3, param4, param5); }
+
+            inline void setObject(T* object)
+                { this->functor_->setObject(object); }
+            inline void setObject(const T* object)
+                { this->functor_->setObject(object); }
+    };
+}
+
+#endif /* _Executor_H__ */
Index: /code/trunk/src/orxonox/core/Factory.cc
===================================================================
--- /code/trunk/src/orxonox/core/Factory.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/Factory.cc	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file Factory.cc
     @brief Implementation of the Factory class.
@@ -39,6 +39,7 @@
 {
     /**
-        @returns the Identifier with a given name.
+        @brief Returns the Identifier with a given name.
         @param name The name of the wanted Identifier
+        @return The Identifier
     */
     Identifier* Factory::getIdentifier(const std::string& name)
@@ -48,6 +49,7 @@
 
     /**
-        @returns the Identifier with a given network ID.
+        @brief Returns the Identifier with a given network ID.
         @param id The network ID of the wanted Identifier
+        @return The Identifier
     */
     Identifier* Factory::getIdentifier(const unsigned int id)
@@ -84,5 +86,5 @@
     void Factory::createClassHierarchy()
     {
-        COUT(3) << "*** Factory -> Create class-hierarchy" << std::endl;
+        COUT(3) << "*** Factory: Create class-hierarchy" << std::endl;
         std::map<std::string, Identifier*>::iterator it;
         it = getFactoryPointer()->identifierStringMap_.begin();
@@ -95,5 +97,5 @@
         }
         (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy();
-        COUT(3) << "*** Factory -> Finished class-hierarchy creation" << std::endl;
+        COUT(3) << "*** Factory: Finished class-hierarchy creation" << std::endl;
     }
 
@@ -107,3 +109,21 @@
       return &theOneAndOnlyFactoryInstance;
     }
+
+    /**
+        @brief Returns the begin-iterator of the factory-map.
+        @return The begin-iterator
+    */
+    std::map<std::string, Identifier*>::const_iterator Factory::getFactoryBegin()
+    {
+        return Factory::getFactoryPointer()->identifierStringMap_.begin();
+    }
+
+    /**
+        @brief Returns the end-iterator of the factory-map.
+        @return The end-iterator
+    */
+    std::map<std::string, Identifier*>::const_iterator Factory::getFactoryEnd()
+    {
+        return Factory::getFactoryPointer()->identifierStringMap_.end();
+    }
 }
Index: /code/trunk/src/orxonox/core/Factory.h
===================================================================
--- /code/trunk/src/orxonox/core/Factory.h	(revision 870)
+++ /code/trunk/src/orxonox/core/Factory.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file Factory.h
     @brief Definition of the Factory and the BaseFactory class.
@@ -67,4 +67,6 @@
 
             static Factory* getFactoryPointer();    // avoid overriding order problem in the static intialisation process
+            static std::map<std::string, Identifier*>::const_iterator getFactoryBegin();
+            static std::map<std::string, Identifier*>::const_iterator getFactoryEnd();
 
         private:
Index: /code/trunk/src/orxonox/core/Functor.h
===================================================================
--- /code/trunk/src/orxonox/core/Functor.h	(revision 871)
+++ /code/trunk/src/orxonox/core/Functor.h	(revision 871)
@@ -0,0 +1,417 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: Functor by Benjamin Grauer
+ */
+
+#ifndef _Functor_H__
+#define _Functor_H__
+
+#include "util/MultiTypeMath.h"
+#include "Debug.h"
+
+#include "CorePrereqs.h"
+
+
+enum FunctionType
+{
+    FT_MEMBER,
+    FT_CONSTMEMBER,
+    FT_STATIC
+};
+
+
+template <class T>
+inline std::string typeToString();
+
+#define CreateTypeToStringTemplate(type) \
+    template <> \
+    inline std::string typeToString<type>() { return #type; }
+
+CreateTypeToStringTemplate(int);
+CreateTypeToStringTemplate(unsigned int);
+CreateTypeToStringTemplate(char);
+CreateTypeToStringTemplate(unsigned char);
+CreateTypeToStringTemplate(short);
+CreateTypeToStringTemplate(unsigned short);
+CreateTypeToStringTemplate(long);
+CreateTypeToStringTemplate(unsigned long);
+CreateTypeToStringTemplate(float);
+CreateTypeToStringTemplate(double);
+CreateTypeToStringTemplate(long double);
+CreateTypeToStringTemplate(bool);
+CreateTypeToStringTemplate(std::string);
+CreateTypeToStringTemplate(orxonox::Vector2);
+CreateTypeToStringTemplate(orxonox::Vector3);
+CreateTypeToStringTemplate(orxonox::Quaternion);
+CreateTypeToStringTemplate(orxonox::ColourValue);
+CreateTypeToStringTemplate(orxonox::Radian);
+CreateTypeToStringTemplate(orxonox::Degree);
+
+
+class _CoreExport Functor
+{
+    public:
+        Functor() {}
+        virtual ~Functor() {}
+
+        virtual void operator()(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) = 0;
+
+        inline int getParamCount() const { return this->numParams_; }
+        inline bool hasReturnvalue() const { return this->hasReturnValue_; }
+        inline FunctionType getType() const { return this->type_; }
+        inline MultiTypeMath getReturnvalue() const { return this->returnedValue_; }
+
+        std::string getTypenameParam(int param) const { return (param > 0 && param <= 5) ? this->typeParam_[param-1] : ""; }
+        std::string getTypenameReturnvalue() const { return this->typeReturnvalue_; }
+
+    protected:
+        int numParams_;
+        bool hasReturnValue_;
+        FunctionType type_;
+        MultiTypeMath returnedValue_;
+
+        std::string typeReturnvalue_;
+        std::string typeParam_[5];
+};
+
+class _CoreExport FunctorStatic : public Functor
+{
+    public:
+        virtual ~FunctorStatic() {}
+        virtual void operator()(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) = 0;
+};
+
+template <class T>
+class FunctorMember : public Functor
+{
+    public:
+        FunctorMember()
+        {
+            constObject_ = 0;
+            object_ = 0;
+            bConstObject_ = false;
+        }
+        virtual ~FunctorMember() {}
+
+        virtual void operator()(T* object, const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) = 0;
+        virtual void operator()(const T* object, const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) = 0;
+
+        virtual void operator()(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null)
+        {
+            if (this->bConstObject_)
+            {
+                if (this->constObject_)
+                    (*this)(this->constObject_, param1, param2, param3, param4, param5);
+                else
+                {
+                    COUT(1) << "An error occurred in Functor.h:" << std::endl;
+                    COUT(1) << "Error: No const object set." << std::endl;
+                }
+            }
+            else
+            {
+                if (this->object_)
+                    (*this)(this->object_, param1, param2, param3, param4, param5);
+                else
+                {
+                    COUT(1) << "An error occurred in Functor.h:" << std::endl;
+                    COUT(1) << "Error: No object set." << std::endl;
+                }
+            }
+        }
+
+        void setObject(T* object)
+        {
+            this->bConstObject_ = false;
+            this->object_ = object;
+        }
+
+        void setObject(const T* object)
+        {
+            this->bConstObject_ = true;
+            this->constObject_ = object;
+        }
+
+    private:
+        const T* constObject_;
+        T* object_;
+        bool bConstObject_;
+};
+
+
+
+#define MAKE_COMMA(x) MAKE_COMMA##x
+#define MAKE_COMMA0
+#define MAKE_COMMA1 ,
+#define MAKE_COMMA2 ,
+#define MAKE_COMMA3 ,
+#define MAKE_COMMA4 ,
+#define MAKE_COMMA5 ,
+
+
+
+#define FUNCTOR_TEMPLATE(ismember, returnvalue, numparams) FUNCTOR_TEMPLATE##ismember##returnvalue##numparams
+#define FUNCTOR_TEMPLATE000
+#define FUNCTOR_TEMPLATE001 template <class P1>
+#define FUNCTOR_TEMPLATE002 template <class P1, class P2>
+#define FUNCTOR_TEMPLATE003 template <class P1, class P2, class P3>
+#define FUNCTOR_TEMPLATE004 template <class P1, class P2, class P3, class P4>
+#define FUNCTOR_TEMPLATE005 template <class P1, class P2, class P3, class P4, class P5>
+#define FUNCTOR_TEMPLATE010 template <class R>
+#define FUNCTOR_TEMPLATE011 template <class R, class P1>
+#define FUNCTOR_TEMPLATE012 template <class R, class P1, class P2>
+#define FUNCTOR_TEMPLATE013 template <class R, class P1, class P2, class P3>
+#define FUNCTOR_TEMPLATE014 template <class R, class P1, class P2, class P3, class P4>
+#define FUNCTOR_TEMPLATE015 template <class R, class P1, class P2, class P3, class P4, class P5>
+#define FUNCTOR_TEMPLATE100 template <class T>
+#define FUNCTOR_TEMPLATE101 template <class T, class P1>
+#define FUNCTOR_TEMPLATE102 template <class T, class P1, class P2>
+#define FUNCTOR_TEMPLATE103 template <class T, class P1, class P2, class P3>
+#define FUNCTOR_TEMPLATE104 template <class T, class P1, class P2, class P3, class P4>
+#define FUNCTOR_TEMPLATE105 template <class T, class P1, class P2, class P3, class P4, class P5>
+#define FUNCTOR_TEMPLATE110 template <class T, class R>
+#define FUNCTOR_TEMPLATE111 template <class T, class R, class P1>
+#define FUNCTOR_TEMPLATE112 template <class T, class R, class P1, class P2>
+#define FUNCTOR_TEMPLATE113 template <class T, class R, class P1, class P2, class P3>
+#define FUNCTOR_TEMPLATE114 template <class T, class R, class P1, class P2, class P3, class P4>
+#define FUNCTOR_TEMPLATE115 template <class T, class R, class P1, class P2, class P3, class P4, class P5>
+
+
+
+#define FUNCTOR_TEMPLATE_CLASSES(ismember, returnvalue, numparams) FUNCTOR_TEMPLATE_CLASSES##ismember##returnvalue##numparams
+#define FUNCTOR_TEMPLATE_CLASSES000
+#define FUNCTOR_TEMPLATE_CLASSES001 <P1>
+#define FUNCTOR_TEMPLATE_CLASSES002 <P1, P2>
+#define FUNCTOR_TEMPLATE_CLASSES003 <P1, P2, P3>
+#define FUNCTOR_TEMPLATE_CLASSES004 <P1, P2, P3, P4>
+#define FUNCTOR_TEMPLATE_CLASSES005 <P1, P2, P3, P4, P5>
+#define FUNCTOR_TEMPLATE_CLASSES010 <R>
+#define FUNCTOR_TEMPLATE_CLASSES011 <R, P1>
+#define FUNCTOR_TEMPLATE_CLASSES012 <R, P1, P2>
+#define FUNCTOR_TEMPLATE_CLASSES013 <R, P1, P2, P3>
+#define FUNCTOR_TEMPLATE_CLASSES014 <R, P1, P2, P3, P4>
+#define FUNCTOR_TEMPLATE_CLASSES015 <R, P1, P2, P3, P4, P5>
+#define FUNCTOR_TEMPLATE_CLASSES100 <T>
+#define FUNCTOR_TEMPLATE_CLASSES101 <T, P1>
+#define FUNCTOR_TEMPLATE_CLASSES102 <T, P1, P2>
+#define FUNCTOR_TEMPLATE_CLASSES103 <T, P1, P2, P3>
+#define FUNCTOR_TEMPLATE_CLASSES104 <T, P1, P2, P3, P4>
+#define FUNCTOR_TEMPLATE_CLASSES105 <T, P1, P2, P3, P4, P5>
+#define FUNCTOR_TEMPLATE_CLASSES110 <T, R>
+#define FUNCTOR_TEMPLATE_CLASSES111 <T, R, P1>
+#define FUNCTOR_TEMPLATE_CLASSES112 <T, R, P1, P2>
+#define FUNCTOR_TEMPLATE_CLASSES113 <T, R, P1, P2, P3>
+#define FUNCTOR_TEMPLATE_CLASSES114 <T, R, P1, P2, P3, P4>
+#define FUNCTOR_TEMPLATE_CLASSES115 <T, R, P1, P2, P3, P4, P5>
+
+
+
+#define FUNCTOR_TYPENAME_PARAMS(numparams) FUNCTOR_TYPENAME_PARAMS##numparams
+#define FUNCTOR_TYPENAME_PARAMS0
+#define FUNCTOR_TYPENAME_PARAMS1 this->typeParam_[0] = typeToString<P1>();
+#define FUNCTOR_TYPENAME_PARAMS2 this->typeParam_[0] = typeToString<P1>(); this->typeParam_[1] = typeToString<P2>();
+#define FUNCTOR_TYPENAME_PARAMS3 this->typeParam_[0] = typeToString<P1>(); this->typeParam_[1] = typeToString<P2>(); this->typeParam_[2] = typeToString<P3>();
+#define FUNCTOR_TYPENAME_PARAMS4 this->typeParam_[0] = typeToString<P1>(); this->typeParam_[1] = typeToString<P2>(); this->typeParam_[2] = typeToString<P3>(); this->typeParam_[3] = typeToString<P4>();
+#define FUNCTOR_TYPENAME_PARAMS5 this->typeParam_[0] = typeToString<P1>(); this->typeParam_[1] = typeToString<P2>(); this->typeParam_[2] = typeToString<P3>(); this->typeParam_[3] = typeToString<P4>(); this->typeParam_[4] = typeToString<P5>();
+
+#define FUNCTOR_TYPENAME_RETURN(returnvalue) FUNCTOR_TYPENAME_RETURN##returnvalue
+#define FUNCTOR_TYPENAME_RETURN0
+#define FUNCTOR_TYPENAME_RETURN1 this->typeReturnvalue_ = typeToString<R>();
+
+
+
+#define FUNCTOR_FUNCTION_PARAMS(numparams) FUNCTOR_FUNCTION_PARAMS##numparams
+#define FUNCTOR_FUNCTION_PARAMS0
+#define FUNCTOR_FUNCTION_PARAMS1 P1 param1
+#define FUNCTOR_FUNCTION_PARAMS2 P1 param1, P2 param2
+#define FUNCTOR_FUNCTION_PARAMS3 P1 param1, P2 param2, P3 param3
+#define FUNCTOR_FUNCTION_PARAMS4 P1 param1, P2 param2, P3 param3, P4 param4
+#define FUNCTOR_FUNCTION_PARAMS5 P1 param1, P2 param2, P3 param3, P4 param4, P5 param5
+
+#define FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) FUNCTOR_FUNCTION_RETURNVALUE##returnvalue
+#define FUNCTOR_FUNCTION_RETURNVALUE0 void
+#define FUNCTOR_FUNCTION_RETURNVALUE1 R
+
+
+
+#define FUNCTOR_FUNCTION_CALL(numparams) FUNCTOR_FUNCTION_CALL##numparams
+#define FUNCTOR_FUNCTION_CALL0
+#define FUNCTOR_FUNCTION_CALL1 param1
+#define FUNCTOR_FUNCTION_CALL2 param1, param2
+#define FUNCTOR_FUNCTION_CALL3 param1, param2, param3
+#define FUNCTOR_FUNCTION_CALL4 param1, param2, param3, param4
+#define FUNCTOR_FUNCTION_CALL5 param1, param2, param3, param4, param5
+
+#define FUNCTOR_STORE_RETURNVALUE(returnvalue, functioncall) FUNCTOR_STORE_RETURNVALUE##returnvalue(functioncall)
+#define FUNCTOR_STORE_RETURNVALUE0(functioncall) functioncall
+#define FUNCTOR_STORE_RETURNVALUE1(functioncall) this->returnedValue_ = functioncall
+
+
+
+
+
+#define CREATE_STATIC_FUNCTOR(returnvalue, numparams) \
+    FUNCTOR_TEMPLATE(0, returnvalue, numparams) \
+    class FunctorStatic##returnvalue##numparams : public FunctorStatic \
+    { \
+        public: \
+            FunctorStatic##returnvalue##numparams(FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (*functionPointer)(FUNCTOR_FUNCTION_PARAMS(numparams))) \
+            { \
+                this->numParams_ = numparams; \
+                this->hasReturnValue_ = returnvalue; \
+                this->type_ = FT_STATIC; \
+                this->functionPointer_ = functionPointer; \
+                \
+                FUNCTOR_TYPENAME_PARAMS(numparams); \
+                FUNCTOR_TYPENAME_RETURN(returnvalue); \
+            } \
+    \
+            void operator()(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) \
+            { \
+                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
+            } \
+    \
+        private: \
+            FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (*functionPointer_)(FUNCTOR_FUNCTION_PARAMS(numparams)); \
+    }; \
+    \
+    \
+    FUNCTOR_TEMPLATE(0, returnvalue, numparams) \
+    inline FunctorStatic##returnvalue##numparams FUNCTOR_TEMPLATE_CLASSES(0, returnvalue, numparams)* createFunctor(FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (*functionPointer)(FUNCTOR_FUNCTION_PARAMS(numparams))) \
+    { \
+        return new FunctorStatic##returnvalue##numparams FUNCTOR_TEMPLATE_CLASSES(0, returnvalue, numparams) (functionPointer); \
+    }
+
+
+
+
+
+#define CREATE_MEMBER_FUNCTOR(returnvalue, numparams) \
+    FUNCTOR_TEMPLATE(1, returnvalue, numparams) \
+    class FunctorMember##returnvalue##numparams : public FunctorMember<T> \
+    { \
+        public: \
+            FunctorMember##returnvalue##numparams(FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (T::*functionPointer)(FUNCTOR_FUNCTION_PARAMS(numparams))) \
+            { \
+                this->numParams_ = numparams; \
+                this->hasReturnValue_ = returnvalue; \
+                this->type_ = FT_MEMBER; \
+                this->functionPointer_ = functionPointer; \
+            } \
+    \
+            void operator()(T* object, const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) \
+            { \
+                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
+            } \
+    \
+            void operator()(const T* object, const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) \
+            { \
+                COUT(1) << "An error occurred in Functor.h:" << std::endl; \
+                COUT(1) << "Error: Function is not const." << std::endl; \
+            } \
+    \
+        private: \
+            FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (T::*functionPointer_)(FUNCTOR_FUNCTION_PARAMS(numparams)); \
+    }; \
+    \
+    \
+    FUNCTOR_TEMPLATE(1, returnvalue, numparams) \
+    class FunctorConstMember##returnvalue##numparams : public FunctorMember<T> \
+    { \
+        public: \
+            FunctorConstMember##returnvalue##numparams(FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (T::*functionPointer)(FUNCTOR_FUNCTION_PARAMS(numparams)) const) \
+            { \
+                this->numParams_ = numparams; \
+                this->hasReturnValue_ = returnvalue; \
+                this->type_ = FT_CONSTMEMBER; \
+                this->functionPointer_ = functionPointer; \
+            } \
+    \
+            void operator()(T* object, const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) \
+            { \
+                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
+            } \
+    \
+            void operator()(const T* object, const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null) \
+            { \
+                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
+            } \
+    \
+        private: \
+            FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (T::*functionPointer_)(FUNCTOR_FUNCTION_PARAMS(numparams)) const; \
+    }; \
+    \
+    \
+    FUNCTOR_TEMPLATE(1, returnvalue, numparams) \
+    inline FunctorMember##returnvalue##numparams FUNCTOR_TEMPLATE_CLASSES(1, returnvalue, numparams)* createFunctor(FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (T::*functionPointer)(FUNCTOR_FUNCTION_PARAMS(numparams))) \
+    { \
+        return new FunctorMember##returnvalue##numparams FUNCTOR_TEMPLATE_CLASSES(1, returnvalue, numparams) (functionPointer); \
+    } \
+    \
+    \
+    FUNCTOR_TEMPLATE(1, returnvalue, numparams) \
+    inline FunctorConstMember##returnvalue##numparams FUNCTOR_TEMPLATE_CLASSES(1, returnvalue, numparams)* createFunctor(FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (T::*functionPointer)(FUNCTOR_FUNCTION_PARAMS(numparams)) const) \
+    { \
+        return new FunctorConstMember##returnvalue##numparams FUNCTOR_TEMPLATE_CLASSES(1, returnvalue, numparams) (functionPointer); \
+    }
+
+
+
+
+#define CREATE_ALL_STATIC_FUNCTORS() \
+    CREATE_STATIC_FUNCTOR(0, 0); \
+    CREATE_STATIC_FUNCTOR(0, 1); \
+    CREATE_STATIC_FUNCTOR(0, 2); \
+    CREATE_STATIC_FUNCTOR(0, 3); \
+    CREATE_STATIC_FUNCTOR(0, 4); \
+    CREATE_STATIC_FUNCTOR(0, 5); \
+    CREATE_STATIC_FUNCTOR(1, 0); \
+    CREATE_STATIC_FUNCTOR(1, 1); \
+    CREATE_STATIC_FUNCTOR(1, 2); \
+    CREATE_STATIC_FUNCTOR(1, 3); \
+    CREATE_STATIC_FUNCTOR(1, 4); \
+    CREATE_STATIC_FUNCTOR(1, 5)
+
+
+#define CREATE_ALL_MEMBER_FUNCTORS() \
+    CREATE_MEMBER_FUNCTOR(0, 0); \
+    CREATE_MEMBER_FUNCTOR(0, 1); \
+    CREATE_MEMBER_FUNCTOR(0, 2); \
+    CREATE_MEMBER_FUNCTOR(0, 3); \
+    CREATE_MEMBER_FUNCTOR(0, 4); \
+    CREATE_MEMBER_FUNCTOR(0, 5); \
+    CREATE_MEMBER_FUNCTOR(1, 0); \
+    CREATE_MEMBER_FUNCTOR(1, 1); \
+    CREATE_MEMBER_FUNCTOR(1, 2); \
+    CREATE_MEMBER_FUNCTOR(1, 3); \
+    CREATE_MEMBER_FUNCTOR(1, 4); \
+    CREATE_MEMBER_FUNCTOR(1, 5)
+
+
+CREATE_ALL_STATIC_FUNCTORS();
+CREATE_ALL_MEMBER_FUNCTORS();
+
+#endif /* _Functor_H__ */
Index: /code/trunk/src/orxonox/core/Identifier.cc
===================================================================
--- /code/trunk/src/orxonox/core/Identifier.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/Identifier.cc	(revision 871)
@@ -26,8 +26,10 @@
  */
 
-/*!
+/**
     @file Identifier.cc
     @brief Implementation of the Identifier class.
 */
+
+#include <ostream>
 
 #include "Identifier.h"
@@ -49,5 +51,6 @@
         this->factory_ = 0;
 
-        this->children_ = new IdentifierList;
+        this->children_ = new std::list<const Identifier*>();
+        this->directChildren_ = new std::list<const Identifier*>();
 
         // Use a static variable because the classID gets created before main() and that's why we should avoid static member variables
@@ -57,29 +60,53 @@
 
     /**
-        @brief Destructor: Deletes the IdentifierList containing the children.
+        @brief Destructor: Deletes the list containing the children.
     */
     Identifier::~Identifier()
     {
         delete this->children_;
-    }
-
-    /**
-        @brief Initializes the Identifier with an IdentifierList containing all parents of the class the Identifier belongs to.
-        @param parents The IdentifierList containing all parents
-    */
-    void Identifier::initialize(const IdentifierList* parents)
-    {
-        COUT(4) << "*** Initialize " << this->name_ << "-Singleton." << std::endl;
+        delete this->directChildren_;
+    }
+
+    /**
+        @brief Initializes the Identifier with a list containing all parents of the class the Identifier belongs to.
+        @param parents A list containing all parents
+    */
+    void Identifier::initialize(std::list<const Identifier*>* parents)
+    {
+        COUT(4) << "*** Identifier: Initialize " << this->name_ << "-Singleton." << std::endl;
         this->bCreatedOneObject_ = true;
 
         if (parents)
         {
-            IdentifierListElement* temp1 = parents->first_;
-            while (temp1)
+            this->parents_ = (*parents);
+            this->directParents_ = (*parents);
+
+            // Iterate through all parents
+            for (std::list<const Identifier*>::iterator it = parents->begin(); it != parents->end(); ++it)
             {
-                this->parents_.add(temp1->identifier_);
-                temp1->identifier_->getChildren().add(this); // We're a child of our parents
-
-                temp1 = temp1->next_;
+                // Tell the parent we're one of it's children
+                (*it)->getChildrenIntern().insert((*it)->getChildrenIntern().end(), this);
+
+                // Erase all parents of our parent from our direct-parent-list
+                for (std::list<const Identifier*>::const_iterator it1 = (*it)->getParents().begin(); it1 != (*it)->getParents().end(); ++it1)
+                {
+                    // Search for the parent's parent in our direct-parent-list
+                    for (std::list<const Identifier*>::iterator it2 = this->directParents_.begin(); it2 != this->directParents_.end(); ++it2)
+                    {
+                        if ((*it1) == (*it2))
+                        {
+                            // We've found a non-direct parent in our list: Erase it
+                            this->directParents_.erase(it2);
+                            break;
+                        }
+                    }
+                }
+            }
+
+            // Now iterate through all direct parents
+            for (std::list<const Identifier*>::iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
+            {
+                // Tell the parent we're one of it's direct children
+                (*it)->getDirectChildrenIntern().insert((*it)->getDirectChildrenIntern().end(), this);
             }
         }
@@ -98,6 +125,6 @@
         else
         {
-            // Abstract classes don't have a factory and therefore can't create new objects
-            COUT(1) << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract." << std::endl;
+            COUT(1) << "An error occurred in Identifier.cc:" << std::endl;
+            COUT(1) << "Error: Cannot fabricate an object of type '" << this->name_ << "'. Class has no factory." << std::endl;
             COUT(1) << "Aborting..." << std::endl;
             abort();
@@ -117,26 +144,17 @@
 
     /**
-        @returns a reference to the Identifier map, containing all Identifiers.
-    */
-    std::map<std::string, Identifier*>& Identifier::getIdentifierMap()
-    {
-        static std::map<std::string, Identifier*> identifierMapStaticReference = std::map<std::string, Identifier*>();
-        return identifierMapStaticReference;
-    }
-
-    /**
-        @returns true, if the Identifier is at least of the given type.
+        @brief Returns true, if the Identifier is at least of the given type.
         @param identifier The identifier to compare with
     */
     bool Identifier::isA(const Identifier* identifier) const
     {
-        return (identifier == this || this->parents_.isInList(identifier));
-    }
-
-    /**
-        @returns true, if the Identifier is exactly of the given type.
-        @param identifier The identifier to compare with
-    */
-    bool Identifier::isDirectlyA(const Identifier* identifier) const
+        return (identifier == this || this->identifierIsInList(identifier, this->parents_));
+    }
+
+    /**
+        @brief Returns true, if the Identifier is exactly of the given type.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isExactlyA(const Identifier* identifier) const
     {
         return (identifier == this);
@@ -144,19 +162,84 @@
 
     /**
-        @returns true, if the assigned identifier is a child of the given identifier.
+        @brief Returns true, if the assigned identifier is a child of the given identifier.
         @param identifier The identifier to compare with
     */
     bool Identifier::isChildOf(const Identifier* identifier) const
     {
-        return this->parents_.isInList(identifier);
-    }
-
-    /**
-        @returns true, if the assigned identifier is a parent of the given identifier.
+        return this->identifierIsInList(identifier, this->parents_);
+    }
+
+    /**
+        @brief Returns true, if the assigned identifier is a direct child of the given identifier.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isDirectChildOf(const Identifier* identifier) const
+    {
+        return this->identifierIsInList(identifier, this->directParents_);
+    }
+
+    /**
+        @brief Returns true, if the assigned identifier is a parent of the given identifier.
         @param identifier The identifier to compare with
     */
     bool Identifier::isParentOf(const Identifier* identifier) const
     {
-        return this->children_->isInList(identifier);
+        return this->identifierIsInList(identifier, *this->children_);
+    }
+
+    /**
+        @brief Returns true, if the assigned identifier is a direct parent of the given identifier.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isDirectParentOf(const Identifier* identifier) const
+    {
+        return this->identifierIsInList(identifier, *this->directChildren_);
+    }
+
+    /**
+        @brief Returns the ConfigValueContainer of a variable, given by the string of its name.
+        @param varname The name of the variable
+        @return The ConfigValueContainer
+    */
+    ConfigValueContainer* Identifier::getConfigValueContainer(const std::string& varname)
+    {
+        std::map<std::string, ConfigValueContainer*>::const_iterator it = configValues_.find(varname);
+        if (it != configValues_.end())
+            return ((*it).second);
+        else
+            return 0;
+    }
+
+    /**
+        @brief Adds the ConfigValueContainer of a variable, given by the string of its name.
+        @param varname The name of the variablee
+        @param container The container
+    */
+    void Identifier::addConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
+    {
+        this->configValues_[varname] = container;
+    }
+
+    /**
+        @brief Searches for a given identifier in a list and returns whether the identifier is in the list or not.
+        @param identifier The identifier to look for
+        @param list The list
+        @return True = the identifier is in the list
+    */
+    bool Identifier::identifierIsInList(const Identifier* identifier, const std::list<const Identifier*>& list)
+    {
+        for (std::list<const Identifier*>::const_iterator it = list.begin(); it != list.end(); ++it)
+            if (identifier == (*it))
+                return true;
+
+        return false;
+    }
+
+    std::ostream& operator<<(std::ostream& out, const std::list<const Identifier*>& list)
+    {
+        for (std::list<const Identifier*>::const_iterator it = list.begin(); it != list.end(); ++it)
+            out << (*it)->getName() << " ";
+
+        return out;
     }
 }
Index: /code/trunk/src/orxonox/core/Identifier.h
===================================================================
--- /code/trunk/src/orxonox/core/Identifier.h	(revision 870)
+++ /code/trunk/src/orxonox/core/Identifier.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file Identifier.h
     @brief Definition of the Identifier, ClassIdentifier and SubclassIdentifier classes, implementation of the ClassIdentifier and SubclassIdentifier classes.
@@ -39,5 +39,5 @@
 
     Every object has a pointer to the Identifier of its class. This allows the use isA(...),
-    isDirectlyA(...), isChildOf(...) and isParentOf(...).
+    isExactlyA(...), isChildOf(...) and isParentOf(...).
 
     To create the class-hierarchy, the Identifier has some intern functions and variables.
@@ -52,4 +52,5 @@
 #define _Identifier_H__
 
+#include <list>
 #include <map>
 #include <string>
@@ -59,5 +60,4 @@
 
 #include "ObjectList.h"
-#include "IdentifierList.h"
 #include "Debug.h"
 #include "Iterator.h"
@@ -82,5 +82,5 @@
 
         Every object has a pointer to the Identifier of its class. This allows the use isA(...),
-        isDirectlyA(...), isChildOf(...) and isParentOf(...).
+        isExactlyA(...), isChildOf(...) and isParentOf(...).
 
         You can't directly create an Identifier, it's just the base-class for ClassIdentifier.
@@ -89,10 +89,10 @@
     {
         template <class T>
-        friend class ClassIdentifier; // Forward declaration
+        friend class ClassIdentifier;
 
         template <class T>
-        friend class SubclassIdentifier; // Forward declaration
-
-        friend class Factory; // Forward declaration
+        friend class SubclassIdentifier;
+
+        friend class Factory;
 
         public:
@@ -102,26 +102,48 @@
             BaseObject* fabricate();
             bool isA(const Identifier* identifier) const;
-            bool isDirectlyA(const Identifier* identifier) const;
+            bool isExactlyA(const Identifier* identifier) const;
             bool isChildOf(const Identifier* identifier) const;
+            bool isDirectChildOf(const Identifier* identifier) const;
             bool isParentOf(const Identifier* identifier) const;
-
-            static std::map<std::string, Identifier*>& getIdentifierMap();
+            bool isDirectParentOf(const Identifier* identifier) const;
 
             /** @brief Removes all objects of the corresponding class. */
             virtual void removeObjects() const = 0;
 
-            /** @returns the name of the class the Identifier belongs to. */
+            /** @brief Returns the name of the class the Identifier belongs to. @return The name */
             inline const std::string& getName() const { return this->name_; }
 
-            /** @returns the parents of the class the Identifier belongs to. */
-            inline const IdentifierList& getParents() const { return this->parents_; }
-
-            /** @returns the children of the class the Identifier belongs to. */
-            inline IdentifierList& getChildren() const { return *this->children_; }
-
-            /** @returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. */
+            /** @brief Returns the parents of the class the Identifier belongs to. @return The list of all parents */
+            inline const std::list<const Identifier*>& getParents() const { return this->parents_; }
+            /** @brief Returns the begin-iterator of the parents-list. @return The begin-iterator */
+            inline std::list<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); }
+            /** @brief Returns the end-iterator of the parents-list. @return The end-iterator */
+            inline std::list<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); }
+
+            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
+            inline const std::list<const Identifier*>& getChildren() const { return (*this->children_); }
+            /** @brief Returns the begin-iterator of the children-list. @return The begin-iterator */
+            inline std::list<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); }
+            /** @brief Returns the end-iterator of the children-list. @return The end-iterator */
+            inline std::list<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); }
+
+            /** @brief Returns the direct parents of the class the Identifier belongs to. @return The list of all direct parents */
+            inline const std::list<const Identifier*>& getDirectParents() const { return this->directParents_; }
+            /** @brief Returns the begin-iterator of the direct-parents-list. @return The begin-iterator */
+            inline std::list<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); }
+            /** @brief Returns the end-iterator of the direct-parents-list. @return The end-iterator */
+            inline std::list<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); }
+
+            /** @brief Returns the direct children the class the Identifier belongs to. @return The list of all direct children */
+            inline const std::list<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); }
+            /** @brief Returns the begin-iterator of the direct-children-list. @return The begin-iterator */
+            inline std::list<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); }
+            /** @brief Returns the end-iterator of the direct-children-list. @return The end-iterator */
+            inline std::list<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); }
+
+            /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */
             inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
 
-            /** @returns the network ID to identify a class through the network. */
+            /** @brief Returns the network ID to identify a class through the network. @return the network ID */
             inline const unsigned int getNetworkID() const { return this->classID_; }
 
@@ -129,11 +151,14 @@
             void setNetworkID(unsigned int id);
 
-            /** @returns the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variable */
-            inline ConfigValueContainer* getConfigValueContainer(const std::string& varname)
-                { return this->configValues_[varname]; }
-
-            /** @brief Sets the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variablee @param container The container */
-            inline void setConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
-                { this->configValues_[varname] = container; }
+            ConfigValueContainer* getConfigValueContainer(const std::string& varname);
+            void addConfigValueContainer(const std::string& varname, ConfigValueContainer* container);
+
+            virtual XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname) = 0;
+            virtual void addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container) = 0;
+
+            virtual XMLPortObjectContainer* getXMLPortObjectContainer(const std::string& sectionname) = 0;
+            virtual void addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container) = 0;
+
+            static bool identifierIsInList(const Identifier* identifier, const std::list<const Identifier*>& list);
 
         private:
@@ -141,5 +166,10 @@
             Identifier(const Identifier& identifier) {} // don't copy
             virtual ~Identifier();
-            void initialize(const IdentifierList* parents);
+            void initialize(std::list<const Identifier*>* parents);
+
+            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
+            inline std::list<const Identifier*>& getChildrenIntern() const { return (*this->children_); }
+            /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */
+            inline std::list<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
 
             /**
@@ -149,5 +179,5 @@
             {
                 hierarchyCreatingCounter_s++;
-                COUT(4) << "*** Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
+                COUT(4) << "*** Identifier: Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
             }
 
@@ -158,9 +188,12 @@
             {
                 hierarchyCreatingCounter_s--;
-                COUT(4) << "*** Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
-            }
-
-            IdentifierList parents_;                                    //!< The Parents of the class the Identifier belongs to
-            IdentifierList* children_;                                  //!< The Children of the class the Identifier belongs to
+                COUT(4) << "*** Identifier: Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
+            }
+
+            std::list<const Identifier*> parents_;                      //!< The parents of the class the Identifier belongs to
+            std::list<const Identifier*>* children_;                    //!< The children of the class the Identifier belongs to
+
+            std::list<const Identifier*> directParents_;                //!< The direct parents of the class the Identifier belongs to
+            std::list<const Identifier*>* directChildren_;              //!< The direct children of the class the Identifier belongs to
 
             std::string name_;                                          //!< The name of the class the Identifier belongs to
@@ -173,4 +206,6 @@
     };
 
+    std::ostream& operator<<(std::ostream& out, const std::list<const Identifier*>& list);
+
 
     // ###############################
@@ -182,14 +217,29 @@
         This makes it possible to store informations about a class, sharing them with all
         objects of that class without defining static variables in every class.
+
+        To be really sure that not more than exactly one object exists (even with libraries),
+        ClassIdentifiers are only created by IdentifierDistributor.
+
+        You can access the ClassIdentifiers created by IdentifierDistributor through the
+        ClassManager singletons.
     */
     template <class T>
     class ClassIdentifier : public Identifier
     {
+        template <class TT>
+        friend class ClassManager;
+
         public:
-            static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass);
-            static void addObject(T* object);
-            static ClassIdentifier<T>* getIdentifier();
+            ClassIdentifier<T>* registerClass(std::list<const Identifier*>* parents, const std::string& name, bool bRootClass);
+            void addObject(T* object);
             void removeObjects() const;
             void setName(const std::string& name);
+            inline const ObjectList<T>* getObjects() const { return this->objects_; }
+
+            XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname);
+            void addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container);
+
+            XMLPortObjectContainer* getXMLPortObjectContainer(const std::string& sectionname);
+            void addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container);
 
         private:
@@ -200,4 +250,6 @@
             ObjectList<T>* objects_;    //!< The ObjectList, containing all objects of type T
             bool bSetName_;             //!< True if the name is set
+            std::map<std::string, XMLPortClassParamContainer<T>*> xmlportParamContainers_;
+            std::map<std::string, XMLPortClassObjectContainer<T, class O>*> xmlportObjectContainers_;
     };
 
@@ -208,5 +260,6 @@
     ClassIdentifier<T>::ClassIdentifier()
     {
-        this->objects_ = ObjectList<T>::getList();
+//        this->objects_ = ObjectList<T>::getList();
+        this->objects_ = new ObjectList<T>();
         this->bSetName_ = false;
     }
@@ -214,5 +267,5 @@
     /**
         @brief Registers a class, which means that the name and the parents get stored.
-        @param parents An IdentifierList, containing the Identifiers of all parents of the class
+        @param parents A list, containing the Identifiers of all parents of the class
         @param name A string, containing exactly the name of the class
         @param bRootClass True if the class is either an Interface or the BaseObject itself
@@ -220,41 +273,22 @@
     */
     template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass)
-    {
-        COUT(4) << "*** Register Class in " << name << "-Singleton." << std::endl;
+    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(std::list<const Identifier*>* parents, const std::string& name, bool bRootClass)
+    {
+        COUT(5) << "*** ClassIdentifier: Register Class in " << name << "-Singleton." << std::endl;
 
         // Check if at least one object of the given type was created
-        if (!getIdentifier()->bCreatedOneObject_)
+        if (!this->bCreatedOneObject_)
         {
             // If no: We have to store the informations and initialize the Identifier
-            getIdentifier()->setName(name);
-
-            COUT(4) << "*** Register Class in " << name << "-Singleton -> Initialize Singleton." << std::endl;
+            this->setName(name);
+
+            COUT(4) << "*** ClassIdentifier: Register Class in " << name << "-Singleton -> Initialize Singleton." << std::endl;
             if (bRootClass)
-                getIdentifier()->initialize(NULL); // If a class is derived from two interfaces, the second interface might think it's derived from the first because of the order of constructor-calls. Thats why we set parents to zero in that case.
+                this->initialize(NULL); // If a class is derived from two interfaces, the second interface might think it's derived from the first because of the order of constructor-calls. Thats why we set parents to zero in that case.
             else
-                getIdentifier()->initialize(parents);
+                this->initialize(parents);
         }
 
-        return getIdentifier();
-    }
-
-    /**
-        @brief Creates the only instance of this class for the template class T.
-        @return The Identifier itself
-    */
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
-    {
-        static ClassIdentifier<T> theOneAndOnlyInstance = ClassIdentifier<T>();
-        static bool bIdentifierCreated = false;
-
-        if (!bIdentifierCreated)
-        {
-            COUT(4) << "*** Create Identifier Singleton." << std::endl;
-            bIdentifierCreated = true;
-        }
-
-        return &theOneAndOnlyInstance;
+        return this;
     }
 
@@ -266,9 +300,7 @@
     void ClassIdentifier<T>::setName(const std::string& name)
     {
-        // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map
         if (!this->bSetName_)
         {
             this->name_ = name;
-            this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));
             this->bSetName_ = true;
         }
@@ -282,6 +314,6 @@
     void ClassIdentifier<T>::addObject(T* object)
     {
-        COUT(4) << "*** Added object to " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl;
-        object->getMetaList().add(ClassIdentifier<T>::getIdentifier()->objects_, ClassIdentifier<T>::getIdentifier()->objects_->add(object));
+        COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl;
+        object->getMetaList().add(this->objects_, this->objects_->add(object));
     }
 
@@ -292,7 +324,40 @@
     void ClassIdentifier<T>::removeObjects() const
     {
-        for (Iterator<T> it = ObjectList<T>::start(); it;)
+        for (Iterator<T> it = this->objects_->start(); it;)
             delete *(it++);
     }
+
+    template <class T>
+    XMLPortParamContainer* ClassIdentifier<T>::getXMLPortParamContainer(const std::string& paramname)
+    {
+        typename std::map<std::string, XMLPortClassParamContainer<T>*>::const_iterator it = xmlportParamContainers_.find(paramname);
+        if (it != xmlportParamContainers_.end())
+            return (XMLPortParamContainer*)((*it).second);
+        else
+            return 0;
+    }
+
+    template <class T>
+    void ClassIdentifier<T>::addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container)
+    {
+        this->xmlportParamContainers_[paramname] = (XMLPortClassParamContainer<T>*)container;
+    }
+
+    template <class T>
+    XMLPortObjectContainer* ClassIdentifier<T>::getXMLPortObjectContainer(const std::string& sectionname)
+    {
+        typename std::map<std::string, XMLPortClassObjectContainer<T, class O>*>::const_iterator it = xmlportObjectContainers_.find(sectionname);
+        if (it != xmlportObjectContainers_.end())
+            return (XMLPortObjectContainer*)((*it).second);
+        else
+            return 0;
+    }
+
+    template <class T>
+    void ClassIdentifier<T>::addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container)
+    {
+        this->xmlportObjectContainers_[sectionname] = (XMLPortClassObjectContainer<T, class O>*)container;
+    }
+
 
     // ###############################
@@ -314,5 +379,14 @@
             SubclassIdentifier()
             {
-                this->identifier_ = ClassIdentifier<T>::getIdentifier();
+                this->identifier_ = ClassManager<T>::getIdentifier();
+            }
+
+            /**
+                @brief Copyconstructor: Assigns the given Identifier.
+                @param identifier The Identifier
+            */
+            SubclassIdentifier(Identifier* identifier)
+            {
+                this->identifier_ = identifier;
             }
 
@@ -324,8 +398,9 @@
             SubclassIdentifier<T>& operator=(Identifier* identifier)
             {
-                if (!identifier->isA(ClassIdentifier<T>::getIdentifier()))
+                if (!identifier->isA(ClassManager<T>::getIdentifier()))
                 {
-                    COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
-                    COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
+                    COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
+                    COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassManager<T>::getIdentifier()->getName() << "!" << std::endl;
+                    COUT(1) << "Error: SubclassIdentifier<" << ClassManager<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
                     COUT(1) << "Aborting..." << std::endl;
                     abort();
@@ -372,5 +447,6 @@
                     if (this->identifier_)
                     {
-                        COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
+                        COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
+                        COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassManager<T>::getIdentifier()->getName() << "!" << std::endl;
                         COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl;
                         COUT(1) << "Aborting..." << std::endl;
@@ -378,4 +454,5 @@
                     else
                     {
+                        COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
                         COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined." << std::endl;
                         COUT(1) << "Aborting..." << std::endl;
@@ -386,26 +463,34 @@
             }
 
-            /** @returns the assigned identifier. */
+            /** @brief Returns the assigned identifier. @return The identifier */
             inline const Identifier* getIdentifier() const
                 { return this->identifier_; }
 
-            /** @returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */
+            /** @brief Returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */
             inline bool isA(const Identifier* identifier) const
                 { return this->identifier_->isA(identifier); }
 
-            /** @returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
-            inline bool isDirectlyA(const Identifier* identifier) const
-                { return this->identifier_->isDirectlyA(identifier); }
-
-            /** @returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
+            /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
+            inline bool isExactlyA(const Identifier* identifier) const
+                { return this->identifier_->isExactlyA(identifier); }
+
+            /** @brief Returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
             inline bool isChildOf(const Identifier* identifier) const
                 { return this->identifier_->isChildOf(identifier); }
 
-            /** @returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
+            /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */
+            inline bool isDirectChildOf(const Identifier* identifier) const
+                { return this->identifier_->isDirectChildOf(identifier); }
+
+            /** @brief Returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
             inline bool isParentOf(const Identifier* identifier) const
                 { return this->identifier_->isParentOf(identifier); }
 
+            /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */
+            inline bool isDirectParentOf(const Identifier* identifier) const
+                { return this->identifier_->isDirectParentOf(identifier); }
+
         private:
-            Identifier* identifier_;        //!< The assigned identifier
+            Identifier* identifier_;            //!< The assigned identifier
     };
 }
Index: /code/trunk/src/orxonox/core/IdentifierDistributor.cc
===================================================================
--- /code/trunk/src/orxonox/core/IdentifierDistributor.cc	(revision 871)
+++ /code/trunk/src/orxonox/core/IdentifierDistributor.cc	(revision 871)
@@ -0,0 +1,63 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file IdentifierDistributor.cc
+    @brief Implementation of the IdentifierDistributor class.
+*/
+
+#include "IdentifierDistributor.h"
+#include "Identifier.h"
+
+namespace orxonox
+{
+    /**
+        @brief Returns the only instance of a ClassIdentifier for a given class.
+        @param name The name of the class
+        @param proposal A proposal for the ClassIdentifier in case there is no entry yet.
+        @return The unique ClassIdentifier
+    */
+    Identifier* IdentifierDistributor::getIdentifier(const std::string& name, Identifier* proposal)
+    {
+        // Create the only instance of the IdentifierDistributor-singleton
+        static IdentifierDistributor theOneAndOnlyInstance = IdentifierDistributor();
+
+        // Look for an entry in the map
+        std::map<std::string, Identifier*>::const_iterator it = theOneAndOnlyInstance.identifiers_.find(name);
+        if (it != theOneAndOnlyInstance.identifiers_.end())
+        {
+            // There is already an entry: return it
+            return (*it).second;
+        }
+        else
+        {
+            // There is no entry: put the proposal into the map and return it
+            theOneAndOnlyInstance.identifiers_[name] = proposal;
+            return proposal;
+        }
+    }
+}
Index: /code/trunk/src/orxonox/core/IdentifierDistributor.h
===================================================================
--- /code/trunk/src/orxonox/core/IdentifierDistributor.h	(revision 871)
+++ /code/trunk/src/orxonox/core/IdentifierDistributor.h	(revision 871)
@@ -0,0 +1,61 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file IdentifierDistributor.h
+    @brief Definition of the IdentifierDistributor class
+
+    The IdentifierDistributor makes sure that only one instance of ClassIdentifier for each
+    template parameter T exists. All Identifiers are stored in a map with their name.
+    IdentifierDistributor is a singleton class, it can't be created or deleted directly.
+*/
+
+#ifndef _IdentifierDistributor_H__
+#define _IdentifierDistributor_H__
+
+#include <map>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    //! The Identifier Distributor stores all Identifiers and makes sure there are no ambiguities.
+    class _CoreExport IdentifierDistributor
+    {
+        public:
+            static Identifier* getIdentifier(const std::string& name, Identifier* proposal);
+
+        private:
+            IdentifierDistributor() {};                                         // Don't create
+            IdentifierDistributor(const IdentifierDistributor& distributor) {}  // Don't copy
+            ~IdentifierDistributor() {}                                         // Don't delete
+
+            std::map<std::string, Identifier*> identifiers_;    //!< The map to store all Identifiers.
+    };
+}
+
+#endif /* _IdentifierDistributor_H__ */
Index: de/trunk/src/orxonox/core/IdentifierList.cc
===================================================================
--- /code/trunk/src/orxonox/core/IdentifierList.cc	(revision 870)
+++ 	(revision )
@@ -1,161 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/*!
-    @file IdentifierList.cc
-    @brief Implementation of the IdentifierList class.
-*/
-
-#include "Identifier.h"
-#include "IdentifierList.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###     IdentifierList      ###
-    // ###############################
-    /**
-        @brief Constructor: Sets first_ to zero.
-    */
-    IdentifierList::IdentifierList()
-    {
-        this->first_ = 0;
-    }
-
-    /**
-        @brief Destructor: Deletes all elements in the list, but NOT THE IDENTIFIERS.
-    */
-    IdentifierList::~IdentifierList()
-    {
-        IdentifierListElement* temp;
-        while (this->first_)
-        {
-            temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-        }
-    }
-
-    /**
-        @brief Adds an Identifier to the list.
-        @param identifier The Identifier to add
-    */
-    void IdentifierList::add(const Identifier* identifier)
-    {
-        IdentifierListElement* temp = this->first_;
-        this->first_ = new IdentifierListElement(identifier);
-        this->first_->next_ = temp;
-    }
-
-    /**
-        @brief Removes an Identifier from the list.
-        @param identifier The Identifier to remove
-    */
-    void IdentifierList::remove(const Identifier* identifier)
-    {
-        if (!identifier)
-            return;
-
-        // Check if we have to delete the first element
-        if (this->first_->identifier_ == identifier)
-        {
-            IdentifierListElement* temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-
-            return;
-        }
-
-        // Iterate through the list
-        IdentifierListElement* temp = this->first_;
-        while (temp->next_)
-        {
-            if (temp->next_->identifier_ == identifier)
-            {
-                IdentifierListElement* temp2 = temp->next_->next_;
-                delete temp->next_;
-                temp->next_ = temp2;
-
-                return;
-            }
-
-            temp = temp->next_;
-        }
-    }
-
-    /**
-        @brief Checks if a given Identifier is in the list and returns true if yes.
-        @param identifier The Identifier to check
-        @return True if the Identifier is in the list
-    */
-    bool IdentifierList::isInList(const Identifier* identifier) const
-    {
-        IdentifierListElement* temp = this->first_;
-        while (temp)
-        {
-            if (temp->identifier_ == identifier)
-                return true;
-
-            temp = temp->next_;
-        }
-
-        return false;
-    }
-
-    /**
-        @returns a string, containing a list of the names of all Identifiers in the list.
-    */
-    std::string IdentifierList::toString() const
-    {
-        IdentifierListElement* temp = this->first_;
-        std::string output = "";
-
-        while (temp)
-        {
-            output += temp->identifier_->getName();
-            output += " ";
-
-            temp = temp->next_;
-        }
-
-        return output;
-    }
-
-
-    // ###############################
-    // ###  IdentifierListElement  ###
-    // ###############################
-    /**
-        @brief Constructor: Creates the list-element with a given identifier.
-        @param identifier The Identifier to store
-    */
-    IdentifierListElement::IdentifierListElement(const Identifier* identifier)
-    {
-        this->identifier_ = identifier;
-        this->next_ = 0;
-    }
-}
Index: de/trunk/src/orxonox/core/IdentifierList.h
===================================================================
--- /code/trunk/src/orxonox/core/IdentifierList.h	(revision 870)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/*!
-    @file IdentifierList.h
-    @brief Definition of the IdentifierList class
-
-    The IdentifierList is a single-linked list, containing Identifiers.
-    The IdentifierList is used to store parents and childs of each Identifier.
-*/
-
-#ifndef _IdentifierList_H__
-#define _IdentifierList_H__
-
-#include <string>
-
-#include "CorePrereqs.h"
-
-namespace orxonox
-{
-    //! The list-element of the IdentifierList
-    class IdentifierListElement
-    {
-        public:
-            IdentifierListElement(const Identifier* identifier);
-
-            const Identifier* identifier_;      //!< The identifier
-            IdentifierListElement* next_;       //!< The next element in the list
-    };
-
-    //! The IdentifierList contains Identifiers
-    class _CoreExport IdentifierList
-    {
-        public:
-            IdentifierList();
-            ~IdentifierList();
-            void add(const Identifier* identifier);
-            void remove(const Identifier* identifier);
-            bool isInList(const Identifier* identifier) const;
-            std::string toString() const;
-
-            IdentifierListElement* first_;      //!< The first element in the list
-    };
-}
-
-#endif /* _IdentifierList_H__ */
Index: /code/trunk/src/orxonox/core/Iterator.h
===================================================================
--- /code/trunk/src/orxonox/core/Iterator.h	(revision 870)
+++ /code/trunk/src/orxonox/core/Iterator.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file Iterator.h
     @brief Definition and implementation of the Iterator class.
@@ -71,4 +71,13 @@
             */
             Iterator(ObjectListElement<T>* element)
+            {
+                this->element_ = element;
+            }
+
+            /**
+                @brief Assigns an element to the iterator.
+                @param element The element
+            */
+            Iterator<T> operator=(ObjectListElement<T>* element)
             {
                 this->element_ = element;
@@ -150,11 +159,7 @@
                 @return True if the iterator points to an existing object.
             */
-            bool operator!=(int compare)
+            bool operator!=(ObjectListElement<T>* compare)
             {
-                // Comparing with anything except zero makes no sense
-                if (compare != 0)
-                    COUT(2) << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works." << std::endl;
-
-                return (this->element_ != 0);
+                return (this->element_ != compare);
             }
 
Index: /code/trunk/src/orxonox/core/Language.cc
===================================================================
--- /code/trunk/src/orxonox/core/Language.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/Language.cc	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file Language.cc
     @brief Implementation of the Language and the LanguageEntry class.
@@ -50,22 +50,22 @@
 
         this->fallbackEntry_ = fallbackEntry;
-        this->translatedEntry_ = fallbackEntry; // Set the translation to the fallback entry, for the case that no translation gets assigned
-        this->bTranslationSet_ = false;
-    }
-
-    /**
-        @brief Sets the translation of the entry.
-        @param translation The translation
-    */
-    void LanguageEntry::setTranslation(const std::string& translation)
+        this->localisedEntry_ = fallbackEntry; // Set the localisation to the fallback entry, for the case that no translation gets assigned
+        this->bLocalisationSet_ = false;
+    }
+
+    /**
+        @brief Sets the localisation of the entry.
+        @param localisation The localisation
+    */
+    void LanguageEntry::setLocalisation(const std::string& localisation)
     {
         // Check if the translation is more than just an empty string
-        if (translation.compare("") != 0)
-        {
-            this->translatedEntry_ = translation;
-            this->bTranslationSet_ = true;
+        if (localisation.compare("") != 0)
+        {
+            this->localisedEntry_ = localisation;
+            this->bLocalisationSet_ = true;
         }
         else
-            this->translatedEntry_ = this->fallbackEntry_;
+            this->localisedEntry_ = this->fallbackEntry_;
     }
 
@@ -77,6 +77,6 @@
     {
         // If the default entry changes and the translation wasn't set yet, use the new default entry as translation
-        if (!this->bTranslationSet_)
-            this->translatedEntry_ = fallbackEntry;
+        if (!this->bLocalisationSet_)
+            this->localisedEntry_ = fallbackEntry;
 
         this->fallbackEntry_ = fallbackEntry;
@@ -94,5 +94,5 @@
 
         this->defaultLanguage_ = "default";
-        this->defaultTranslation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!";
+        this->defaultLocalisation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!";
 
         // Read the default language file to create all known LanguageEntry objects
@@ -132,12 +132,12 @@
 
     /**
-        @brief Creates a new LanguageEntry with a given name and a given default entry.
-        @param name The name of the entry
+        @brief Creates a new LanguageEntry with a given label and a given default entry.
+        @param label The label of the entry
         @param entry The default entry
         @return The created LanguageEntry object
     */
-    LanguageEntry* Language::createEntry(const LanguageEntryName& name, const std::string& entry)
-    {
-        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+    LanguageEntry* Language::createEntry(const LanguageEntryLabel& label, const std::string& entry)
+    {
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(label);
 
         // Make sure we don't create a duplicate entry
@@ -145,10 +145,10 @@
         {
             LanguageEntry* newEntry = new LanguageEntry(entry);
-            newEntry->setName(name);
-            this->languageEntries_[name] = newEntry;
+            newEntry->setLabel(label);
+            this->languageEntries_[label] = newEntry;
             return newEntry;
         }
 
-        COUT(2) << "Warning: Language entry " << name << " is duplicate in " << getFileName(this->defaultLanguage_) << "!" << std::endl;
+        COUT(2) << "Warning: Language entry " << label << " is duplicate in " << getFileName(this->defaultLanguage_) << "!" << std::endl;
         return it->second;
     }
@@ -156,15 +156,15 @@
     /**
         @brief Adds a new LanguageEntry, if it's not already existing.
-        @param name The name of the entry
+        @param label The label of the entry
         @param entry The default entry
     */
-    void Language::addEntry(const LanguageEntryName& name, const std::string& entry)
-    {
-        COUT(5) << "Called addEntry with\n  name: " << name << "\n  entry: " <<  entry << std::endl;
-        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+    void Language::addEntry(const LanguageEntryLabel& label, const std::string& entry)
+    {
+        COUT(5) << "Language: Called addEntry with\n  label: " << label << "\n  entry: " <<  entry << std::endl;
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(label);
         if (it == this->languageEntries_.end())
         {
             // The entry isn't available yet, meaning it's new, so create it
-            this->createEntry(name, entry);
+            this->createEntry(label, entry);
         }
         else if (it->second->getDefault().compare(entry) == 0)
@@ -185,18 +185,18 @@
 
     /**
-        @brief Returns the translation of a given entry.
-        @param name The name of the entry
-        @return The translation
-    */
-    const std::string& Language::getTranslation(const LanguageEntryName& name) const
-    {
-        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+        @brief Returns the localisation of a given entry.
+        @param label The label of the entry
+        @return The localisation
+    */
+    const std::string& Language::getLocalisation(const LanguageEntryLabel& label) const
+    {
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(label);
         if (it != this->languageEntries_.end())
-            return it->second->getTranslation();
+            return it->second->getLocalisation();
         else
         {
             // Uh, oh, an undefined entry was requested: return the default string
-            COUT(2) << "Error: Language entry \"" << name << "\" not found!" << std::endl;
-            return this->defaultTranslation_;
+            COUT(2) << "Warning: Language entry \"" << label << "\" not found!" << std::endl;
+            return this->defaultLocalisation_;
         }
     }
@@ -230,4 +230,5 @@
         if (!file.is_open())
         {
+            COUT(1) << "An error occurred in Language.cc:" << std::endl;
             COUT(1) << "Error: Couldn't open file " << getFileName(this->defaultLanguage_) << " to read the default language entries!" << std::endl;
             return;
@@ -259,5 +260,5 @@
 
     /**
-        @brief Reads the language file of the configured language and assigns the translations to the corresponding LanguageEntry object.
+        @brief Reads the language file of the configured language and assigns the localisation to the corresponding LanguageEntry object.
     */
     void Language::readTranslatedLanguageFile()
@@ -271,4 +272,5 @@
         if (!file.is_open())
         {
+            COUT(1) << "An error occurred in Language.cc:" << std::endl;
             COUT(1) << "Error: Couldn't open file " << getFileName(this->language_) << " to read the translated language entries!" << std::endl;
             ResetConfigValue(language_);
@@ -297,7 +299,7 @@
                     // Check if the entry exists
                     if (it != this->languageEntries_.end())
-                        it->second->setTranslation(lineString.substr(pos + 1));
+                        it->second->setLocalisation(lineString.substr(pos + 1));
                     else
-                        this->createEntry(lineString.substr(0, pos), this->defaultTranslation_)->setTranslation(lineString.substr(pos + 1));
+                        this->createEntry(lineString.substr(0, pos), this->defaultLocalisation_)->setLocalisation(lineString.substr(pos + 1));
                 }
                 else
@@ -314,5 +316,5 @@
     void Language::writeDefaultLanguageFile() const
     {
-        COUT(4) << "Write default language file." << std::endl;
+        COUT(4) << "Language: Write default language file." << std::endl;
 
         // Open the file
@@ -322,4 +324,5 @@
         if (!file.is_open())
         {
+            COUT(1) << "An error occurred in Language.cc:" << std::endl;
             COUT(1) << "Error: Couldn't open file " << getFileName(this->defaultLanguage_) << " to write the default language entries!" << std::endl;
             return;
@@ -329,5 +332,5 @@
         for (Iterator<LanguageEntry> it = ObjectList<LanguageEntry>::start(); it; ++it)
         {
-            file << it->getName() << "=" << it->getDefault() << std::endl;
+            file << it->getLabel() << "=" << it->getDefault() << std::endl;
         }
 
Index: /code/trunk/src/orxonox/core/Language.h
===================================================================
--- /code/trunk/src/orxonox/core/Language.h	(revision 870)
+++ /code/trunk/src/orxonox/core/Language.h	(revision 871)
@@ -26,18 +26,18 @@
  */
 
-/*!
+/**
     @file Language.h
     @brief Definition of the Language and the LanguageEntry class.
 
-    The Language class is used, to get a translation of a string in the configured language.
-    The string is identified by another string, the name of the entry.
+    The Language class is used, to get a localisation of a string in the configured language.
+    The string is identified by another string, the label of the entry.
     If the translation in the configured language isn't available, the default entry, defined in the code, is used.
 
     Usage:
      - Set the entry with the default string:
-       Language::getLanguage()->addEntry("name of the entry", "the string to translate");
+       Language::getLanguage()->addEntry("label of the entry", "the string to translate");
 
-     - Get the translation of the entry in the configured language:
-       std::cout << Language::getLanguage()->getTranslation("name of the entry") << std::endl;
+     - Get the localisation of the entry in the configured language:
+       std::cout << Language::getLanguage()->getLocalisation("name of the entry") << std::endl;
 */
 
@@ -51,8 +51,17 @@
 #include "OrxonoxClass.h"
 
+
+#define AddLanguageEntry(label, fallbackstring) \
+    orxonox::Language::getLanguage().addEntry(label, fallbackstring)
+
+#define GetLocalisation(label) \
+    orxonox::Language::getLanguage().getLocalisation(label)
+
+
 namespace orxonox
 {
-    typedef std::string LanguageEntryName;
-
+    // ###############################
+    // ###      LanguageEntry      ###
+    // ###############################
     //! The LanguageEntry class stores the default- and the translated string of a given entry in the language file.
     class _CoreExport LanguageEntry : public OrxonoxClass
@@ -60,13 +69,13 @@
         public:
             explicit LanguageEntry(const std::string& fallbackEntry);
-            void setTranslation(const std::string& translation);
+            void setLocalisation(const std::string& localisation);
             void setDefault(const std::string& fallbackEntry);
 
             /**
-              @brief Returns the translated entry in the configured language.
+              @brief Returns the localised entry in the configured language.
               @return The translated entry
             */
-            inline const std::string& getTranslation()
-                { return this->translatedEntry_; }
+            inline const std::string& getLocalisation()
+                { return this->localisedEntry_; }
 
             /**
@@ -77,12 +86,29 @@
                 { return this->fallbackEntry_; }
 
+            /**
+                @brief Sets the label of this entry.
+                @param label The label
+            */
+            inline void setLabel(const LanguageEntryLabel& label)
+                { this->label_ = label; }
+
+            /**
+                @brief Returns the label of this entry.
+                @return The label
+            */
+            inline const LanguageEntryLabel& getLabel() const
+                { return this->label_; }
+
         private:
-            std::string fallbackEntry_;                             //!< The default entry: Used, if no translation is available or no language configured
-            std::string translatedEntry_;                           //!< The translated entry in the configured language
-            bool bTranslationSet_;                                  //!< True if the translation was set
+            LanguageEntryLabel label_;              //!< The label of the entry
+            std::string fallbackEntry_;             //!< The default entry: Used, if no translation is available or no language configured
+            std::string localisedEntry_;            //!< The localised entry in the configured language
+            bool bLocalisationSet_;                 //!< True if the translation was set
     };
-    template class _CoreExport orxonox::ClassIdentifier<LanguageEntry>;
-    template class _CoreExport orxonox::ObjectList<LanguageEntry>;
 
+
+    // ###############################
+    // ###         Language        ###
+    // ###############################
     //! The Language class manges the language files and entries and stores the LanguageEntry objects in a map.
     class _CoreExport Language : public OrxonoxClass
@@ -94,6 +120,6 @@
             static Language& getLanguage();
             void setConfigValues();
-            void addEntry(const LanguageEntryName& name, const std::string& entry);
-            const std::string& getTranslation(const LanguageEntryName& name) const;
+            void addEntry(const LanguageEntryLabel& label, const std::string& entry);
+            const std::string& getLocalisation(const LanguageEntryLabel& label) const;
 
         private:
@@ -106,13 +132,11 @@
             void writeDefaultLanguageFile() const;
             static const std::string getFileName(const std::string& language);
-            LanguageEntry* createEntry(const LanguageEntryName& name, const std::string& entry);
+            LanguageEntry* createEntry(const LanguageEntryLabel& label, const std::string& entry);
 
             std::string language_;                                  //!< The configured language
             std::string defaultLanguage_;                           //!< The default language
-            std::string defaultTranslation_;                        //!< The returned string, if an entry unavailable entry is requested
-            std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their name
+            std::string defaultLocalisation_;                       //!< The returned string, if an entry unavailable entry is requested
+            std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their labels
     };
-    template class _CoreExport orxonox::ClassIdentifier<Language>;
-    template class _CoreExport orxonox::ObjectList<Language>;
 }
 
Index: /code/trunk/src/orxonox/core/Level.h
===================================================================
--- /code/trunk/src/orxonox/core/Level.h	(revision 871)
+++ /code/trunk/src/orxonox/core/Level.h	(revision 871)
@@ -0,0 +1,53 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Level_H__
+#define _Level_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+#include "ClassTreeMask.h"
+
+namespace orxonox
+{
+    class _CoreExport Level
+    {
+        public:
+            Level(const std::string& file) : file_(file) {}
+            Level(const std::string& file, const ClassTreeMask& mask) : file_(file), mask_(mask) {};
+
+            const std::string& getFile() const { return this->file_; }
+            const ClassTreeMask& getMask() const { return this->mask_; }
+
+        private:
+            std::string file_;
+            ClassTreeMask mask_;
+    };
+}
+
+#endif /* _Level_H__ */
Index: /code/trunk/src/orxonox/core/Loader.cc
===================================================================
--- /code/trunk/src/orxonox/core/Loader.cc	(revision 871)
+++ /code/trunk/src/orxonox/core/Loader.cc	(revision 871)
@@ -0,0 +1,168 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Loader.h"
+#include "Level.h"
+#include "BaseObject.h"
+#include "Identifier.h"
+#include "Iterator.h"
+#include "Debug.h"
+#include "CoreIncludes.h"
+
+#include "util/tinyxml/ticpp.h"
+
+namespace orxonox
+{
+    std::vector<std::pair<const Level*, ClassTreeMask> > Loader::levels_s;
+    ClassTreeMask Loader::currentMask_s;
+
+    bool Loader::open(const Level* level, const ClassTreeMask& mask)
+    {
+        Loader::add(level, mask);
+        return Loader::load(level, mask);
+    }
+
+    void Loader::close()
+    {
+        Loader::unload();
+        Loader::levels_s.clear();
+    }
+
+    void Loader::close(const Level* level)
+    {
+        Loader::unload(level);
+        Loader::remove(level);
+    }
+
+    void Loader::add(const Level* level, const ClassTreeMask& mask)
+    {
+        Loader::levels_s.insert(Loader::levels_s.end(), std::pair<const Level*, ClassTreeMask>(level, mask));
+    }
+
+    void Loader::remove(const Level* level)
+    {
+        for (std::vector<std::pair<const Level*, ClassTreeMask> >::iterator it = Loader::levels_s.begin(); it != Loader::levels_s.end(); ++it)
+        {
+            if ((*it).first == level)
+            {
+                Loader::levels_s.erase(it);
+                break;
+            }
+        }
+    }
+
+    bool Loader::load(const ClassTreeMask& mask)
+    {
+        bool success = true;
+        for (std::vector<std::pair<const Level*, ClassTreeMask> >::iterator it = Loader::levels_s.begin(); it != Loader::levels_s.end(); ++it)
+            if (!Loader::load((*it).first, (*it).second * mask))
+                success = false;
+
+        return success;
+    }
+
+    void Loader::unload(const ClassTreeMask& mask)
+    {
+        for (Iterator<BaseObject> it = ObjectList<BaseObject>::begin(); it; )
+        {
+            if (mask.isIncluded(it->getIdentifier()))
+                delete (*(it++));
+            else
+                ++it;
+        }
+    }
+
+    bool Loader::reload(const ClassTreeMask& mask)
+    {
+        Loader::unload(mask);
+        return Loader::load(mask);
+    }
+
+    bool Loader::load(const Level* level, const ClassTreeMask& mask)
+    {
+        Loader::currentMask_s = level->getMask() * mask;
+
+        try
+        {
+            COUT(0) << "Start loading " << level->getFile() << "..." << std::endl;
+            COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
+
+            ticpp::Document xmlfile(level->getFile());
+            xmlfile.LoadFile();
+
+            for ( ticpp::Iterator<ticpp::Element> child = xmlfile.FirstChildElement(false); child != child.end(); child++ )
+            {
+                Identifier* identifier = ID(child->Value());
+                if (identifier)
+                {
+                    if (Loader::currentMask_s.isIncluded(identifier))
+                    {
+                        COUT(4) << "  fabricating " << child->Value() << "..." << std::endl;
+                        BaseObject* newObject = identifier->fabricate();
+                        newObject->setLoaderIndentation("    ");
+                        newObject->setLevel(level);
+                        newObject->XMLPort(*child, true);
+                        COUT(5) << "  ...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
+                    }
+                }
+                else
+                {
+                    COUT(2) << "  Warning: '" << child->Value() << "' is not a valid classname." << std::endl;
+                }
+            }
+
+            COUT(0) << "Finished loading " << level->getFile() << "." << std::endl;
+
+            return true;
+        }
+        catch(ticpp::Exception& ex)
+        {
+            COUT(1) << std::endl;
+            COUT(1) << "An error occurred in Loader.cc while loading " << level->getFile() << ":" << std::endl;
+            COUT(1) << ex.what() << std::endl;
+            COUT(1) << "Loading aborted." << std::endl;
+            return false;
+        }
+    }
+
+    void Loader::unload(const Level* level, const ClassTreeMask& mask)
+    {
+        for (Iterator<BaseObject> it = ObjectList<BaseObject>::begin(); it; )
+        {
+            if ((it->getLevel() == level) && mask.isIncluded(it->getIdentifier()))
+                delete (*(it++));
+            else
+                ++it;
+        }
+    }
+
+    bool Loader::reload(const Level* level, const ClassTreeMask& mask)
+    {
+        Loader::unload(level, mask);
+        return Loader::load(level, mask);
+    }
+}
Index: /code/trunk/src/orxonox/core/Loader.h
===================================================================
--- /code/trunk/src/orxonox/core/Loader.h	(revision 871)
+++ /code/trunk/src/orxonox/core/Loader.h	(revision 871)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Loader_H__
+#define _Loader_H__
+
+#include <vector>
+
+#include "ClassTreeMask.h"
+#include "Level.h"
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    class _CoreExport Loader
+    {
+        public:
+            static bool open(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
+            static void close();
+            static void close(const Level* level);
+
+            static void add(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
+            static void remove(const Level* level);
+
+            static bool load(const ClassTreeMask& mask = ClassTreeMask());
+            static void unload(const ClassTreeMask& mask = ClassTreeMask());
+            static bool reload(const ClassTreeMask& mask = ClassTreeMask());
+
+            static bool load(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
+            static void unload(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
+            static bool reload(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
+
+            static ClassTreeMask currentMask_s;
+
+        private:
+            static std::vector<std::pair<const Level*, ClassTreeMask> > levels_s;
+    };
+}
+
+#endif /* _Loader_H__ */
Index: /code/trunk/src/orxonox/core/MetaObjectList.cc
===================================================================
--- /code/trunk/src/orxonox/core/MetaObjectList.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/MetaObjectList.cc	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file MetaObjectList.cc
     @brief Implementation of the MetaObjectList class.
Index: /code/trunk/src/orxonox/core/MetaObjectList.h
===================================================================
--- /code/trunk/src/orxonox/core/MetaObjectList.h	(revision 870)
+++ /code/trunk/src/orxonox/core/MetaObjectList.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file MetaObjectList.h
     @brief Definition of the MetaObjectList class.
@@ -99,5 +99,5 @@
 
 
-        COUT(4) << "*** Removing Object from " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl;
+        COUT(5) << "*** MetaObjectList: Removing Object from " << this->element_->object_->getIdentifier()->getName() << "-list." << std::endl;
         delete this->element_;
     }
Index: /code/trunk/src/orxonox/core/ObjectList.h
===================================================================
--- /code/trunk/src/orxonox/core/ObjectList.h	(revision 870)
+++ /code/trunk/src/orxonox/core/ObjectList.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file ObjectList.h
     @brief Definition and implementation of the ObjectList class.
@@ -40,4 +40,5 @@
 #include "CorePrereqs.h"
 #include "Iterator.h"
+#include "ClassManager.h"
 
 namespace orxonox
@@ -83,27 +84,24 @@
     {
         public:
-            static ObjectList<T>* getList();
+            ObjectList();
+            ~ObjectList();
 
             ObjectListElement<T>* add(T* object);
 //            void remove(OrxonoxClass* object, bool bIterateForwards = true);
 
-            /** @returns the first element in the list */
+            /** @brief Returns the first element in the list. @return The first element */
             inline static Iterator<T> start()
-                { return Iterator<T>(getList()->first_); }
-
-            /** @returns the first element in the list */
+                { return Iterator<T>(ClassManager<T>::getIdentifier()->getObjects()->first_); }
+
+            /** @brief Returns the first element in the list. @return The first element */
             inline static Iterator<T> begin()
-                { return Iterator<T>(getList()->first_); }
-
-            /** @returns the last element in the list */
+                { return Iterator<T>(ClassManager<T>::getIdentifier()->getObjects()->first_); }
+
+            /** @brief Returns the last element in the list. @return The last element */
             inline static Iterator<T> end()
-                { return Iterator<T>(getList()->last_); }
+                { return Iterator<T>(ClassManager<T>::getIdentifier()->getObjects()->last_); }
 
             ObjectListElement<T>* first_;       //!< The first element in the list
             ObjectListElement<T>* last_;        //!< The last element in the list
-
-        private:
-            ObjectList();
-            ~ObjectList();
     };
 
@@ -131,14 +129,4 @@
             this->first_ = temp;
         }
-    }
-
-    /**
-        @returns a pointer to the only existing instance for the given class T.
-    */
-    template <class T>
-    ObjectList<T>* ObjectList<T>::getList()
-    {
-        static ObjectList<T> theOnlyObjectListObjectForClassT = ObjectList<T>();
-        return &theOnlyObjectListObjectForClassT;
     }
 
Index: /code/trunk/src/orxonox/core/OrxonoxClass.cc
===================================================================
--- /code/trunk/src/orxonox/core/OrxonoxClass.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/OrxonoxClass.cc	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file OrxonoxClass.cc
     @brief Implementation of the OrxonoxClass Class.
@@ -42,7 +42,4 @@
         this->identifier_ = 0;
         this->parents_ = 0;
-
-        this->bActive_ = true;
-        this->bVisible_ = true;
     }
 
Index: /code/trunk/src/orxonox/core/OrxonoxClass.h
===================================================================
--- /code/trunk/src/orxonox/core/OrxonoxClass.h	(revision 870)
+++ /code/trunk/src/orxonox/core/OrxonoxClass.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file OrxonoxClass.h
     @brief Definition of the OrxonoxClass Class.
@@ -37,4 +37,5 @@
 #define _OrxonoxClass_H__
 
+#include <list>
 #include <string>
 
@@ -47,5 +48,5 @@
     //! The class all objects and interfaces of the game-logic (not the engine) are derived from.
     /**
-        The BaseObject and Interaces are derived with 'virtual public OrxonoxClass' from OrxonoxClass.
+        The BaseObject and Interfaces are derived with 'virtual public OrxonoxClass' from OrxonoxClass.
         OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the MetaObjectList.
     */
@@ -59,5 +60,5 @@
             void setConfigValues() {};
 
-            /** @returns the Identifier of the object */
+            /** @brief Returns the Identifier of the object. @return The Identifier */
             inline Identifier* getIdentifier() const { return this->identifier_; }
 
@@ -65,99 +66,98 @@
             inline void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; }
 
-            /** @returns the list of all parents of the object */
-            inline IdentifierList* getParents() const { return this->parents_; }
+            /** @brief Returns the list of all parents of the object. @return The list */
+            inline std::list<const Identifier*>* getParents() const { return this->parents_; }
 
-            /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */
-            inline void setParents(IdentifierList* parents) { this->parents_ = parents; }
+            /** @brief Creates the parents-list. */
+            inline void createParents() { this->parents_ = new std::list<const Identifier*>(); }
 
-            /** @returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. */
+            /** @brief Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. @return The list */
             inline MetaObjectList& getMetaList() { return this->metaList_; }
 
 
-            /** @returns true if the objects class is of the given type or a derivative. */
+            /** @brief Returns true if the objects class is of the given type or a derivative. */
             inline bool isA(const Identifier* identifier)
                 { return this->getIdentifier()->isA(identifier); }
-            /** @returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const Identifier* identifier)
-                { return this->getIdentifier()->isDirectlyA(identifier); }
-            /** @returns true if the objects class is a child of the given type. */
+            /** @brief Returns true if the objects class is exactly of the given type. */
+            inline bool isExactlyA(const Identifier* identifier)
+                { return this->getIdentifier()->isExactlyA(identifier); }
+            /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const Identifier* identifier)
                 { return this->getIdentifier()->isChildOf(identifier); }
-            /** @returns true if the objects class is a parent of the given type. */
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const Identifier* identifier)
+                { return this->getIdentifier()->isDirectChildOf(identifier); }
+            /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const Identifier* identifier)
                 { return this->getIdentifier()->isParentOf(identifier); }
+            /** @brief Returns true if the objects class is a direct parent of the given type. */
+            inline bool isDirectParentOf(const Identifier* identifier)
+                { return this->getIdentifier()->isDirectParentOf(identifier); }
 
 
-            /** @returns true if the objects class is of the given type or a derivative. */
+            /** @brief Returns true if the objects class is of the given type or a derivative. */
             inline bool isA(const SubclassIdentifier<class B>* identifier)
                 { return this->getIdentifier()->isA(identifier->getIdentifier()); }
-            /** @returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier)
-                { return this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
-            /** @returns true if the objects class is a child of the given type. */
+            /** @brief Returns true if the objects class is exactly of the given type. */
+            inline bool isExactlyA(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isExactlyA(identifier->getIdentifier()); }
+            /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
                 { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
-            /** @returns true if the objects class is a parent of the given type. */
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isDirectChildOf(identifier->getIdentifier()); }
+            /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
                 { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct parent of the given type. */
+            inline bool isDirectParentOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isDirectParentOf(identifier->getIdentifier()); }
 
 
-            /** @returns true if the objects class is of the given type or a derivative. */
+            /** @brief Returns true if the objects class is of the given type or a derivative. */
             inline bool isA(const SubclassIdentifier<class B> identifier)
                 { return this->getIdentifier()->isA(identifier.getIdentifier()); }
-            /** @returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const SubclassIdentifier<class B> identifier)
-                { return this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
-            /** @returns true if the objects class is a child of the given type. */
+            /** @brief Returns true if the objects class is exactly of the given type. */
+            inline bool isExactlyA(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isExactlyA(identifier.getIdentifier()); }
+            /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const SubclassIdentifier<class B> identifier)
                 { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
-            /** @returns true if the objects class is a parent of the given type. */
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isDirectChildOf(identifier.getIdentifier()); }
+            /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const SubclassIdentifier<class B> identifier)
                 { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct parent of the given type. */
+            inline bool isDirectParentOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isDirectParentOf(identifier.getIdentifier()); }
 
 
-            /** @returns true if the objects class is of the given type or a derivative. */
+            /** @brief Returns true if the objects class is of the given type or a derivative. */
             inline bool isA(const OrxonoxClass* object)
                 { return this->getIdentifier()->isA(object->getIdentifier()); }
-            /** @returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const OrxonoxClass* object)
-                { return this->getIdentifier()->isDirectlyA(object->getIdentifier()); }
-            /** @returns true if the objects class is a child of the given type. */
+            /** @brief Returns true if the objects class is exactly of the given type. */
+            inline bool isExactlyA(const OrxonoxClass* object)
+                { return this->getIdentifier()->isExactlyA(object->getIdentifier()); }
+            /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const OrxonoxClass* object)
                 { return this->getIdentifier()->isChildOf(object->getIdentifier()); }
-            /** @returns true if the objects class is a parent of the given type. */
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isDirectChildOf(object->getIdentifier()); }
+            /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const OrxonoxClass* object)
                 { return this->getIdentifier()->isParentOf(object->getIdentifier()); }
-
-
-            /** @brief Sets the name of the object. @param name The name */
-            inline virtual void setName(const std::string& name) { this->name_ = name; }
-
-            /** @returns the name of the object. */
-            inline const std::string& getName() const { return this->name_; }
-
-            /** @brief Sets the state of the objects activity. @param bActive True = active */
-            inline virtual void setActive(bool bActive) { this->bActive_ = bActive; }
-
-            /** @returns the state of the objects activity. */
-            inline const bool isActive() const { return this->bActive_; }
-
-            /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
-            inline virtual void setVisible(bool bVisible) { this->bVisible_ = bVisible; }
-
-            /** @returns the state of the objects visibility. */
-            inline const bool isVisible() const { return this->bVisible_; }
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectParentOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isDirectParentOf(object->getIdentifier()); }
 
         private:
-            Identifier* identifier_;        //!< The Identifier of the object
-            IdentifierList* parents_;       //!< List of all parents of the object
-            MetaObjectList metaList_;       //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
-
-            std::string name_;              //!< The name of the object
-            bool bActive_;                  //!< True = the object is active
-            bool bVisible_;                 //!< True = the object is visible
+            Identifier* identifier_;                    //!< The Identifier of the object
+            std::list<const Identifier*>* parents_;     //!< List of all parents of the object
+            MetaObjectList metaList_;                   //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
     };
-    template class _CoreExport orxonox::ClassIdentifier<OrxonoxClass>;
-    template class _CoreExport orxonox::ObjectList<OrxonoxClass>;
 }
 
Index: /code/trunk/src/orxonox/core/OutputHandler.cc
===================================================================
--- /code/trunk/src/orxonox/core/OutputHandler.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/OutputHandler.cc	(revision 871)
@@ -25,4 +25,9 @@
  *
  */
+
+/**
+    @file OutputHandler.cc
+    @brief Implementation of the OutputHandler class.
+*/
 
 #include "DebugLevel.h"
@@ -53,5 +58,6 @@
 
     /**
-        @returns a reference to the only existing instance of the OutputHandler class.
+        @brief Returns a reference to the only existing instance of the OutputHandler class.
+        @return The instance
     */
     OutputHandler& OutputHandler::getOutStream()
Index: /code/trunk/src/orxonox/core/OutputHandler.h
===================================================================
--- /code/trunk/src/orxonox/core/OutputHandler.h	(revision 870)
+++ /code/trunk/src/orxonox/core/OutputHandler.h	(revision 871)
@@ -26,5 +26,5 @@
  */
 
-/*!
+/**
     @file OutputHandler.h
     @brief Definition of the OutputHandler class.
@@ -59,5 +59,5 @@
             static OutputHandler& getOutStream();
 
-            /** @returns a reference to the logfile. */
+            /** @brief Returns a reference to the logfile. @return The logfile */
             inline std::ofstream& getLogfile()
                 { return this->logfile_; }
@@ -67,5 +67,5 @@
                 { this->outputLevel_ = level; return *this; }
 
-            /** @returns the level of the incoming output. */
+            /** @brief Returns the level of the incoming output. @return The level */
             inline int getOutputLevel() const
                 { return this->outputLevel_; }
Index: /code/trunk/src/orxonox/core/SignalHandler.cc
===================================================================
--- /code/trunk/src/orxonox/core/SignalHandler.cc	(revision 870)
+++ /code/trunk/src/orxonox/core/SignalHandler.cc	(revision 871)
@@ -25,4 +25,9 @@
  *
  */
+
+/**
+    @file SignalHandler.cc
+    @brief Implementation of the SignalHandler class.
+*/
 
 #include <assert.h>
Index: /code/trunk/src/orxonox/core/SignalHandler.h
===================================================================
--- /code/trunk/src/orxonox/core/SignalHandler.h	(revision 870)
+++ /code/trunk/src/orxonox/core/SignalHandler.h	(revision 871)
@@ -26,7 +26,8 @@
  */
 
-/*!
- * @file SignalHandler.h
- */
+/**
+    @file SignalHandler.h
+    @brief Definition of the SignalHandler class.
+*/
 
 #ifndef _SignalHandler_H__
Index: /code/trunk/src/orxonox/core/XMLPort.cc
===================================================================
--- /code/trunk/src/orxonox/core/XMLPort.cc	(revision 871)
+++ /code/trunk/src/orxonox/core/XMLPort.cc	(revision 871)
@@ -0,0 +1,90 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "XMLPort.h"
+#include "Language.h"
+#include "Loader.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###  XMLPortParamContainer  ###
+    // ###############################
+    XMLPortParamContainer::XMLPortParamContainer()
+    {
+        this->bAddedDescription_ = false;
+        this->bAddedDefaultValues_ = false;
+    }
+
+    XMLPortParamContainer& XMLPortParamContainer::description(const std::string description)
+    {
+        if (!this->bAddedDescription_)
+        {
+            this->description_ = std::string("XMLPortParamContainer::" + this->classname_ + "::" + this->paramname_);
+            AddLanguageEntry(this->description_, description);
+            this->bAddedDescription_ = true;
+        }
+
+        return (*this);
+    }
+
+    const std::string& XMLPortParamContainer::getDescription()
+    {
+        return GetLocalisation(this->description_);
+    }
+
+
+    // ################################
+    // ###  XMLPortObjectContainer  ###
+    // ################################
+    XMLPortObjectContainer::XMLPortObjectContainer()
+    {
+        this->bAddedDescription_ = false;
+    }
+
+    XMLPortObjectContainer& XMLPortObjectContainer::description(const std::string description)
+    {
+        if (!this->bAddedDescription_)
+        {
+            this->description_ = std::string("XMLPortObjectContainer::" + this->classname_ + "::" + this->sectionname_);
+            AddLanguageEntry(this->description_, description);
+            this->bAddedDescription_ = true;
+        }
+
+        return (*this);
+    }
+
+    const std::string& XMLPortObjectContainer::getDescription()
+    {
+        return GetLocalisation(this->description_);
+    }
+
+    bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier)
+    {
+        return Loader::currentMask_s.isIncluded(identifier);
+    }
+}
Index: /code/trunk/src/orxonox/core/XMLPort.h
===================================================================
--- /code/trunk/src/orxonox/core/XMLPort.h	(revision 871)
+++ /code/trunk/src/orxonox/core/XMLPort.h	(revision 871)
@@ -0,0 +1,282 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _XMLPort_H__
+#define _XMLPort_H__
+
+#include "util/XMLIncludes.h"
+#include "util/MultiTypeMath.h"
+#include "util/tinyxml/ticpp.h"
+#include "util/SubString.h"
+#include "Functor.h"
+#include "Debug.h"
+#include "CoreIncludes.h"
+#include "BaseObject.h"
+
+#include "CorePrereqs.h"
+
+
+#define XMLPortParam(classname, paramname, loadfunction, savefunction, xmlelement, loading) \
+    orxonox::XMLPortClassParamContainer<classname>* xmlcontainer##loadfunction##savefunction = (orxonox::XMLPortClassParamContainer<classname>*)(this->getIdentifier()->getXMLPortParamContainer(paramname)); \
+    if (!xmlcontainer##loadfunction##savefunction) \
+    { \
+        xmlcontainer##loadfunction##savefunction = new orxonox::XMLPortClassParamContainer<classname>(this->getIdentifier()->getName(), std::string(paramname), createFunctor(&classname::loadfunction), createFunctor(&classname::savefunction)); \
+        this->getIdentifier()->addXMLPortParamContainer(paramname, xmlcontainer##loadfunction##savefunction); \
+    } \
+    xmlcontainer##loadfunction##savefunction->port(this, xmlelement, loading)
+
+#define XMLPortParamLoadOnly(classname, paramname, loadfunction, xmlelement, loading) \
+    orxonox::XMLPortClassParamContainer<classname>* xmlcontainer##loadfunction##savefunction = (orxonox::XMLPortClassParamContainer<classname>*)(this->getIdentifier()->getXMLPortParamContainer(paramname)); \
+    if (!xmlcontainer##loadfunction##savefunction) \
+    { \
+        xmlcontainer##loadfunction##savefunction = new orxonox::XMLPortClassParamContainer<classname>(this->getIdentifier()->getName(), std::string(paramname), createFunctor(&classname::loadfunction), 0); \
+        this->getIdentifier()->addXMLPortParamContainer(paramname, xmlcontainer##loadfunction##savefunction); \
+    } \
+    xmlcontainer##loadfunction##savefunction->port(this, xmlelement, loading)
+
+#define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, loading) \
+    orxonox::XMLPortClassObjectContainer<classname, objectclass>* xmlcontainer##loadfunction##savefunction = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(this->getIdentifier()->getXMLPortObjectContainer(sectionname)); \
+    if (!xmlcontainer##loadfunction##savefunction) \
+    { \
+        xmlcontainer##loadfunction##savefunction = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(this->getIdentifier()->getName(), std::string(sectionname), &classname::loadfunction, &classname::savefunction); \
+        this->getIdentifier()->addXMLPortObjectContainer(sectionname, xmlcontainer##loadfunction##savefunction); \
+    } \
+    xmlcontainer##loadfunction##savefunction->port(this, xmlelement, loading)
+
+
+namespace orxonox
+{
+    // ###############################
+    // ###  XMLPortParamContainer  ###
+    // ###############################
+    class _CoreExport XMLPortParamContainer
+    {
+        public:
+            XMLPortParamContainer();
+
+            inline const std::string& getName() const
+                { return this->paramname_; }
+
+            XMLPortParamContainer& description(const std::string description);
+            const std::string& getDescription();
+
+            XMLPortParamContainer& defaultValues(const MultiTypeMath& param1 = MT_null, const MultiTypeMath& param2 = MT_null, const MultiTypeMath& param3 = MT_null, const MultiTypeMath& param4 = MT_null, const MultiTypeMath& param5 = MT_null)
+            {
+                this->defaultValues_[0] = param1;
+                this->defaultValues_[1] = param2;
+                this->defaultValues_[2] = param3;
+                this->defaultValues_[3] = param4;
+                this->defaultValues_[4] = param5;
+
+                return (*this);
+            }
+
+        protected:
+            std::string classname_;
+            std::string paramname_;
+            MultiTypeMath defaultValues_[5];
+
+        private:
+            LanguageEntryLabel description_;
+            bool bAddedDescription_;
+            bool bAddedDefaultValues_;
+    };
+
+    template <class T>
+    class XMLPortClassParamContainer : public XMLPortParamContainer
+    {
+        public:
+            XMLPortClassParamContainer(const std::string classname, const std::string paramname, FunctorMember<T>* loadfunction, FunctorMember<T>* savefunction)
+            {
+                this->classname_ = classname;
+                this->paramname_ = paramname;
+                this->loadfunction_ = loadfunction;
+                this->savefunction_ = savefunction;
+            }
+
+            XMLPortParamContainer& port(T* object, Element& xmlelement, bool loading)
+            {
+                if (loading)
+                {
+                    try
+                    {
+                        std::string attribute = xmlelement.GetAttribute(this->paramname_);
+                        if (attribute.size() > 0)
+                        {
+                            SubString tokens(attribute, ",", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
+                            if ((unsigned int)tokens.size() >= (unsigned int)this->loadfunction_->getParamCount())
+                            {
+                                COUT(5) << object->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << this->classname_ << " (objectname " << object->getName() << ") with ";
+                                if (this->loadfunction_->getParamCount() == 1)
+                                {
+                                    COUT(5) << "1 parameter (using whole string):" << std::endl;
+                                    COUT(5) << object->getLoaderIndentation() << "  " << attribute << std::endl;
+                                    (*this->loadfunction_)(object, MultiTypeMath(attribute));
+                                }
+                                else
+                                {
+                                    COUT(5) << tokens.size() << " parameter (using MultiTypeMath)." << std::endl;
+                                    MultiTypeMath param1 = MT_null, param2 = MT_null, param3 = MT_null, param4 = MT_null, param5 = MT_null;
+                                    if (tokens.size() >= 1) param1 = tokens[0];
+                                    if (tokens.size() >= 2) param2 = tokens[1];
+                                    if (tokens.size() >= 3) param3 = tokens[2];
+                                    if (tokens.size() >= 4) param4 = tokens[3];
+                                    if (tokens.size() >= 5) param5 = tokens[4];
+                                    COUT(5) << object->getLoaderIndentation() << "  " << attribute << std::endl;
+                                    COUT(5) << object->getLoaderIndentation() << "  " << param1 << ", " << param2 << ", " << param3 << ", " << param4 << ", " << param5 << std::endl;
+
+                                    (*this->loadfunction_)(object, param1, param2, param3, param4, param5);
+                                }
+                            }
+                            else
+                            {
+                                COUT(2) << object->getLoaderIndentation() << "Warning: Parameter \"" << this->paramname_ << "\" in \"" << this->classname_ << "\" (objectname: " << object->getName() << ") is incomplete and couln't be loaded." << std::endl;
+                            }
+                        }
+                    }
+                    catch(ticpp::Exception& ex)
+                    {
+                        COUT(1) << std::endl;
+                        COUT(1) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << this->classname_ << "' (objectname: " << object->getName() << ") in " << object->getLevelfile() << ":" << std::endl;
+                        COUT(1) << ex.what() << std::endl;
+                    }
+                }
+                else
+                {
+                    if (this->savefunction_)
+                    {
+//                        xmlelement.SetAttribute(this->paramname_, "...");
+                    }
+                }
+
+                return (*this);
+            }
+
+        private:
+            FunctorMember<T>* loadfunction_;
+            FunctorMember<T>* savefunction_;
+    };
+
+
+    // ################################
+    // ###  XMLPortObjectContainer  ###
+    // ################################
+    class _CoreExport XMLPortObjectContainer
+    {
+        public:
+            XMLPortObjectContainer();
+
+            inline const std::string& getName() const
+                { return this->sectionname_; }
+
+            XMLPortObjectContainer& description(const std::string description);
+            const std::string& getDescription();
+            static bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
+
+        protected:
+            std::string classname_;
+            std::string sectionname_;
+
+        private:
+            LanguageEntryLabel description_;
+            bool bAddedDescription_;
+    };
+
+    template <class T, class O>
+    class XMLPortClassObjectContainer : public XMLPortObjectContainer
+    {
+        public:
+            XMLPortClassObjectContainer(const std::string classname, const std::string sectionname, void (T::*loadfunction)(O*), const O* (T::*savefunction)(unsigned int))
+            {
+                this->classname_ = classname;
+                this->sectionname_ = sectionname;
+                this->loadfunction_ = loadfunction;
+                this->savefunction_ = savefunction;
+            }
+
+            XMLPortObjectContainer& port(T* object, Element& xmlelement, bool loading)
+            {
+                if (loading)
+                {
+                    try
+                    {
+                        Element* xmlsubelement = xmlelement.FirstChildElement(this->sectionname_, false);
+
+                        if (xmlsubelement)
+                        {
+                            for ( ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++ )
+                            {
+                                Identifier* identifier = ID(child->Value());
+                                if (identifier)
+                                {
+                                    if (identifier->isA(Class(O)))
+                                    {
+                                        if (this->identifierIsIncludedInLoaderMask(identifier))
+                                        {
+                                            COUT(4) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
+                                            O* newObject = (O*)identifier->fabricate();
+                                            newObject->setLoaderIndentation(object->getLoaderIndentation() + "  ");
+                                            newObject->setLevel(object->getLevel());
+                                            newObject->XMLPort(*child, true);
+                                            COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->classname_ << " (objectname " << object->getName() << ")" << std::endl;
+                                            (*object.*this->loadfunction_)(newObject);
+                                            COUT(5) << "  ...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
+                                        }
+                                    }
+                                    else
+                                    {
+                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;
+                                    }
+                                }
+                                else
+                                {
+                                    COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a valid classname." << std::endl;
+                                }
+                            }
+                        }
+                    }
+                    catch(ticpp::Exception& ex)
+                    {
+                        COUT(1) << std::endl;
+                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->classname_ << "' (objectname: " << object->getName() << ") in " << object->getLevelfile() << ":" << std::endl;
+                        COUT(1) << ex.what() << std::endl;
+                    }
+                }
+                else
+                {
+                }
+
+                return (*this);
+            }
+
+        private:
+            void     (T::*loadfunction_)(O*);
+            const O* (T::*savefunction_)(unsigned int);
+    };
+}
+
+#endif /* _XMLPort_H__ */
Index: /code/trunk/src/orxonox/objects/Ambient.cc
===================================================================
--- /code/trunk/src/orxonox/objects/Ambient.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/Ambient.cc	(revision 871)
@@ -40,4 +40,5 @@
 #include "../core/CoreIncludes.h"
 #include "../Orxonox.h"
+#include "core/XMLPort.h"
 
 #include "Ambient.h"
@@ -45,7 +46,4 @@
 namespace orxonox
 {
-    // create a template instantiations
-    //template class _OrxonoxExport ClassIdentifier<Ambient>;
-
     CreateFactory(Ambient);
 
@@ -61,6 +59,4 @@
     void Ambient::loadParams(TiXmlElement* xmlElem)
     {
-    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
-
     	if (xmlElem->Attribute("colourvalue"))
     	{
@@ -72,8 +68,26 @@
 	    	String2Number<float>(b, colourvalues[2]);
 
-	    	mgr->setAmbientLight(ColourValue(r,g,b));
+	    	this->setAmbientLight(ColourValue(r, g, b));
 
 	    	COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
     	}
    }
+
+   void Ambient::setAmbientLight(const ColourValue& colour)
+   {
+    	Orxonox::getSingleton()->getSceneManager()->setAmbientLight(colour);
+   }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void Ambient::XMLPort(Element& xmlelement, bool loading)
+    {
+        BaseObject::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, loading);
+    }
 }
Index: /code/trunk/src/orxonox/objects/Ambient.h
===================================================================
--- /code/trunk/src/orxonox/objects/Ambient.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Ambient.h	(revision 871)
@@ -14,12 +14,12 @@
             virtual ~Ambient();
 
-            
             void loadParams(TiXmlElement* xmlElem);
+            virtual void XMLPort(Element& xmlelement, bool loading);
+            void setAmbientLight(const ColourValue& colour);
 
         private:
-            
+
 
     };
-    ExportClass(Ambient, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/Camera.h
===================================================================
--- /code/trunk/src/orxonox/objects/Camera.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Camera.h	(revision 871)
@@ -14,12 +14,11 @@
             virtual ~Camera();
 
-            
+
             void loadParams(TiXmlElement* xmlElem);
 
         private:
-            
+
 
     };
-    ExportClass(Camera, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/Explosion.h
===================================================================
--- /code/trunk/src/orxonox/objects/Explosion.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Explosion.h	(revision 871)
@@ -21,5 +21,4 @@
             ParticleInterface* particle_;
     };
-    ExportClass(Explosion, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/Fighter.h
===================================================================
--- /code/trunk/src/orxonox/objects/Fighter.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Fighter.h	(revision 871)
@@ -90,5 +90,4 @@
             int emitterRate_;
     };
-    ExportClass(Fighter, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/Model.cc
===================================================================
--- /code/trunk/src/orxonox/objects/Model.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/Model.cc	(revision 871)
@@ -33,4 +33,5 @@
 #include "../core/CoreIncludes.h"
 #include "../Orxonox.h"
+#include "core/XMLPort.h"
 
 #include "Model.h"
@@ -60,4 +61,24 @@
     }
 
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void Model::XMLPort(Element& xmlelement, bool loading)
+    {
+        WorldEntity::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(Model, "mesh", setMesh, xmlelement, loading);
+
+        create();
+    }
+
+    void Model::setMesh(const std::string& meshname)
+    {
+        this->meshSrc_ = meshname;
+    }
+
     bool Model::create(){
       if(meshSrc_.compare("")!=0){
@@ -71,5 +92,5 @@
 
     void Model::registerAllVariables(){
-      registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
+//      registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
     }
 }
Index: /code/trunk/src/orxonox/objects/Model.h
===================================================================
--- /code/trunk/src/orxonox/objects/Model.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Model.h	(revision 871)
@@ -18,4 +18,6 @@
             virtual ~Model();
             virtual void loadParams(TiXmlElement* xmlElem);
+            virtual void XMLPort(Element& xmlelement, bool loading);
+            void setMesh(const std::string& meshname);
             bool create();
 
@@ -25,5 +27,4 @@
             void registerAllVariables();
     };
-    ExportClass(Model, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/NPC.h
===================================================================
--- /code/trunk/src/orxonox/objects/NPC.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/NPC.h	(revision 871)
@@ -44,6 +44,4 @@
       static int const NUMELEMENTS = 9;  //number of elements
   };
-  ExportClass(NPC, Orxonox);
-
 }
 #endif /* _NPC_H__ */
Index: /code/trunk/src/orxonox/objects/Projectile.h
===================================================================
--- /code/trunk/src/orxonox/objects/Projectile.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Projectile.h	(revision 871)
@@ -28,5 +28,4 @@
             Timer<Projectile> destroyTimer_;
     };
-    ExportClass(Projectile, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/Skybox.cc
===================================================================
--- /code/trunk/src/orxonox/objects/Skybox.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/Skybox.cc	(revision 871)
@@ -38,4 +38,5 @@
 #include "../core/CoreIncludes.h"
 #include "../core/Debug.h"
+#include "core/XMLPort.h"
 
 #include "Skybox.h"
@@ -56,13 +57,29 @@
     void Skybox::loadParams(TiXmlElement* xmlElem)
     {
-    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
-
     	if (xmlElem->Attribute("src"))
     	{
     		std::string skyboxSrc = xmlElem->Attribute("src");
-	    	mgr->setSkyBox(true, skyboxSrc);
+	    	this->setSkybox(skyboxSrc);
 
 	    	COUT(4) << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
     	}
    }
+
+   void Skybox::setSkybox(const std::string& skyboxname)
+   {
+    	Orxonox::getSingleton()->getSceneManager()->setSkyBox(true, skyboxname);
+   }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void Skybox::XMLPort(Element& xmlelement, bool loading)
+    {
+        BaseObject::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(Skybox, "src", setSkybox, xmlelement, loading);
+    }
 }
Index: /code/trunk/src/orxonox/objects/Skybox.h
===================================================================
--- /code/trunk/src/orxonox/objects/Skybox.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Skybox.h	(revision 871)
@@ -16,12 +16,12 @@
             virtual ~Skybox();
 
-            
             void loadParams(TiXmlElement* xmlElem);
+            virtual void XMLPort(Element& xmlelement, bool loading);
+            void setSkybox(const std::string& skyboxname);
 
         private:
-            
+
 
     };
-    ExportClass(Skybox, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/SpaceShip.cc
===================================================================
--- /code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 871)
@@ -44,4 +44,5 @@
 #include "../particle/ParticleInterface.h"
 #include "Projectile.h"
+#include "core/XMLPort.h"
 
 #include "SpaceShip.h"
@@ -123,4 +124,6 @@
         this->brakeLoop(loop);
 */
+        this->init();
+
         COUT(3) << "Info: SpaceShip was loaded" << std::endl;
     }
@@ -132,16 +135,6 @@
     }
 
-    void SpaceShip::setConfigValues()
-    {
-        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
-        SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
-        SetConfigValue(testvector_, Vector3()).description("asdfblah");
-    }
-
-    void SpaceShip::loadParams(TiXmlElement* xmlElem)
-    {
-        Model::loadParams(xmlElem);
-
-
+    void SpaceShip::init()
+    {
         // START CREATING THRUSTER
         this->tt_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
@@ -197,5 +190,16 @@
 
         // END of testing crosshair
-
+    }
+
+    void SpaceShip::setConfigValues()
+    {
+        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
+        SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
+        SetConfigValue(testvector_, Vector3()).description("asdfblah");
+    }
+
+    void SpaceShip::loadParams(TiXmlElement* xmlElem)
+    {
+        Model::loadParams(xmlElem);
 /*
         if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
@@ -242,21 +246,61 @@
     	if (xmlElem->Attribute("camera"))
     	{
-            Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
-            this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
-/*
-//            node->setInheritOrientation(false);
-            cam->setPosition(Vector3(0,50,-150));
-            cam->lookAt(Vector3(0,20,0));
-            cam->roll(Degree(0));
-*/
-
-            cam->setPosition(Vector3(-200,0,35));
-//            cam->setPosition(Vector3(0,-350,0));
-            cam->lookAt(Vector3(0,0,35));
-            cam->roll(Degree(-90));
-
-            this->camNode_->attachObject(cam);
-            Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    	    this->setCamera();
     	}
+    }
+
+    void SpaceShip::setCamera(const std::string& camera)
+    {
+        Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
+        this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
+/*
+//        node->setInheritOrientation(false);
+        cam->setPosition(Vector3(0,50,-150));
+        cam->lookAt(Vector3(0,20,0));
+        cam->roll(Degree(0));
+*/
+
+        cam->setPosition(Vector3(-200,0,35));
+//        cam->setPosition(Vector3(0,-350,0));
+        cam->lookAt(Vector3(0,0,35));
+        cam->roll(Degree(-90));
+
+        this->camNode_->attachObject(cam);
+        Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    }
+
+    void SpaceShip::setMaxSpeed(float value)
+    { this->maxSpeed_ = value; }
+    void SpaceShip::setMaxSideAndBackSpeed(float value)
+    { this->maxSideAndBackSpeed_ = value; }
+    void SpaceShip::setMaxRotation(float value)
+    { this->maxRotation_ = value; this->maxRotationRadian_ = Radian(value); }
+    void SpaceShip::setTransAcc(float value)
+    { this->translationAcceleration_ = value; }
+    void SpaceShip::setRotAcc(float value)
+    { this->rotationAcceleration_ = value; this->rotationAccelerationRadian_ = Radian(value); }
+    void SpaceShip::setTransDamp(float value)
+    { this->translationDamping_ = value; }
+    void SpaceShip::setRotDamp(float value)
+    { this->rotationDamping_ = value; this->rotationDampingRadian_ = Radian(value); }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void SpaceShip::XMLPort(Element& xmlelement, bool loading)
+    {
+        Model::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, loading);
     }
 
Index: /code/trunk/src/orxonox/objects/SpaceShip.h
===================================================================
--- /code/trunk/src/orxonox/objects/SpaceShip.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/SpaceShip.h	(revision 871)
@@ -21,7 +21,18 @@
             SpaceShip();
             ~SpaceShip();
+            void init();
             void setConfigValues();
             virtual void loadParams(TiXmlElement* xmlElem);
+            virtual void XMLPort(Element& xmlelement, bool loading);
             virtual void tick(float dt);
+
+            void setCamera(const std::string& camera = "");
+            void setMaxSpeed(float value);
+            void setMaxSideAndBackSpeed(float value);
+            void setMaxRotation(float value);
+            void setTransAcc(float value);
+            void setRotAcc(float value);
+            void setTransDamp(float value);
+            void setRotDamp(float value);
 
             bool mouseMoved(const OIS::MouseEvent &e);
@@ -75,5 +86,4 @@
             int emitterRate_;
     };
-    ExportClass(SpaceShip, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/SpaceshipSteeringObject.cc
===================================================================
--- /code/trunk/src/orxonox/objects/SpaceshipSteeringObject.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/SpaceshipSteeringObject.cc	(revision 871)
@@ -40,6 +40,5 @@
 #include "util/Tokenizer.h"
 #include "util/String2Number.h"
-#include "../core/Debug.h"
-
+#include "core/CoreIncludes.h"
 #include "SpaceshipSteeringObject.h"
 
Index: /code/trunk/src/orxonox/objects/Test.h
===================================================================
--- /code/trunk/src/orxonox/objects/Test.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Test.h	(revision 871)
@@ -30,5 +30,4 @@
 
 #include "core/BaseObject.h"
-#include "../core/CoreIncludes.h"
 
 namespace orxonox
@@ -74,4 +73,5 @@
         public:
             A1B2() { RegisterObject(A1B2); }
+//            virtual void test() = 0;
     };
 
@@ -116,4 +116,5 @@
         public:
             A1B2C1() { RegisterObject(A1B2C1); }
+//            void test() { std::cout << "test!\n"; }
     };
 
Index: /code/trunk/src/orxonox/objects/Tickable.cc
===================================================================
--- /code/trunk/src/orxonox/objects/Tickable.cc	(revision 871)
+++ /code/trunk/src/orxonox/objects/Tickable.cc	(revision 871)
@@ -0,0 +1,13 @@
+#include "core/CoreIncludes.h"
+#include "Tickable.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Registers the object in the Tickable-list
+    */
+    Tickable::Tickable()
+    {
+        RegisterRootObject(Tickable);
+    }
+}
Index: /code/trunk/src/orxonox/objects/Tickable.h
===================================================================
--- /code/trunk/src/orxonox/objects/Tickable.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/Tickable.h	(revision 871)
@@ -44,6 +44,5 @@
 
 #include "../OrxonoxPrereqs.h"
-
-#include "../core/CoreIncludes.h"
+#include "core/OrxonoxClass.h"
 
 namespace orxonox
@@ -62,10 +61,6 @@
 
         protected:
-            /**
-                @brief Constructor: Registers the object in the Tickable-list
-            */
-            Tickable() { RegisterRootObject(Tickable); }
+            Tickable();
     };
-    ExportAbstractClass(Tickable, Orxonox);
 
     //! The TickFrameListener calls the tick(dt) function of all Tickables every frame.
Index: /code/trunk/src/orxonox/objects/WorldEntity.cc
===================================================================
--- /code/trunk/src/orxonox/objects/WorldEntity.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/WorldEntity.cc	(revision 871)
@@ -37,4 +37,5 @@
 #include "../Orxonox.h"
 #include "WorldEntity.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -86,6 +87,7 @@
     void WorldEntity::loadParams(TiXmlElement* xmlElem)
     {
+
         BaseObject::loadParams(xmlElem);
-
+/*
         if (xmlElem->Attribute("position"))
         {
@@ -153,5 +155,32 @@
 
         create();
-
+*/
+    }
+
+    void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll)
+    {
+        this->yaw(yaw);
+        this->pitch(pitch);
+        this->roll(roll);
+    }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void WorldEntity::XMLPort(Element& xmlelement, bool loading)
+    {
+        BaseObject::XMLPort(xmlelement, loading);
+
+        XMLPortParam(WorldEntity, "position", setPositionLoader2, getPosition, xmlelement, loading);
+        XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionLoader, xmlelement, loading);
+        XMLPortParamLoadOnly(WorldEntity, "yawpitchroll", setYawPitchRoll, xmlelement, loading);
+        XMLPortParam(WorldEntity, "scale", setTotalScale, getScale, xmlelement, loading);
+        XMLPortParam(WorldEntity, "rotationAxis", setRotationAxisLoader, getRotationAxis, xmlelement, loading);
+        XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, loading);
+
+        XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, loading);
     }
 
@@ -163,5 +192,5 @@
     void WorldEntity::registerAllVariables()
     {
-      // register coordinates
+/*      // register coordinates
       registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA);
       registerVar( (void*) &(this->getPosition().y), sizeof(this->getPosition().y), network::DATA);
@@ -171,5 +200,5 @@
       registerVar( (void*) &(this->getOrientation().x), sizeof(this->getOrientation().x), network::DATA);
       registerVar( (void*) &(this->getOrientation().y), sizeof(this->getOrientation().y), network::DATA);
-      registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA);
+      registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA);*/
       // not needed at the moment, because we don't have prediction yet
       /*// register velocity_
@@ -183,3 +212,16 @@
       registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA);*/
     }
+
+    void WorldEntity::attachWorldEntity(WorldEntity* entity)
+    {
+        this->attachedWorldEntities_.push_back(entity);
+    }
+
+    const WorldEntity* WorldEntity::getAttachedWorldEntity(unsigned int index)
+    {
+        if (index < this->attachedWorldEntities_.size())
+            return this->attachedWorldEntities_[index];
+        else
+            return 0;
+    }
 }
Index: /code/trunk/src/orxonox/objects/WorldEntity.h
===================================================================
--- /code/trunk/src/orxonox/objects/WorldEntity.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/WorldEntity.h	(revision 871)
@@ -8,7 +8,7 @@
 
 #include "util/Math.h"
+#include "util/XMLIncludes.h"
 #include "network/Synchronisable.h"
-#include "util/tinyxml/tinyxml.h"
-#include "../core/CoreIncludes.h"
+//#include "util/tinyxml/tinyxml.h"
 #include "core/BaseObject.h"
 #include "Tickable.h"
@@ -17,135 +17,157 @@
 namespace orxonox
 {
-  class _OrxonoxExport WorldEntity : public BaseObject, public Tickable, public network::Synchronisable
-  {
-    public:
-      WorldEntity();
-      virtual ~WorldEntity();
+    class _OrxonoxExport WorldEntity : public BaseObject, public Tickable//, public network::Synchronisable
+    {
+        public:
+            WorldEntity();
+            virtual ~WorldEntity();
 
-      virtual void tick(float dt);
-      virtual void loadParams(TiXmlElement* xmlElem);
-      bool create();
+            virtual void tick(float dt);
+            virtual void loadParams(TiXmlElement* xmlElem);
+            virtual void XMLPort(Element& xmlelement, bool loading);
+            bool create();
 
-      inline Ogre::SceneNode* getNode()
-          { return this->node_; }
+            void attachWorldEntity(WorldEntity* entity);
+            const WorldEntity* getAttachedWorldEntity(unsigned int index);
 
-      inline void setNode(Ogre::SceneNode* node)
-          { this->node_ = node; }
+            inline Ogre::SceneNode* getNode()
+                { return this->node_; }
 
-      inline void setPosition(const Vector3& pos)
-          { this->node_->setPosition(pos); }
-      inline void setPosition(Real x, Real y, Real z)
-          { this->node_->setPosition(x, y, z); }
-      inline const Vector3& getPosition() const
-          { return this->node_->getPosition(); }
+            inline void setNode(Ogre::SceneNode* node)
+                { this->node_ = node; }
 
-      inline void translate(const Vector3 &d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-          { this->node_->translate(d, relativeTo); }
-      inline void translate(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-          { this->node_->translate(x, y, z, relativeTo); }
-      inline void translate(const Matrix3 &axes, const Vector3 &move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-          { this->node_->translate(axes, move, relativeTo); }
-      inline void translate(const Matrix3 &axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-          { this->node_->translate(axes, x, y, z, relativeTo); }
+            inline void setPosition(const Vector3& pos)
+                { this->node_->setPosition(pos); }
+            inline void setPositionLoader1(const Vector3& pos)
+                { this->node_->setPosition(pos); }
+            inline void setPositionLoader2(Real x, Real y, Real z)
+                { this->node_->setPosition(x, y, z); }
+            inline void setPosition(Real x, Real y, Real z)
+                { this->node_->setPosition(x, y, z); }
+            inline const Vector3& getPosition() const
+                { return this->node_->getPosition(); }
 
-      inline void yaw(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-          { this->node_->yaw(angle, relativeTo); }
-      inline void pitch(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-          { this->node_->pitch(angle, relativeTo); }
-      inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-          { this->node_->roll(angle, relativeTo); }
+            inline void translate(const Vector3 &d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+                { this->node_->translate(d, relativeTo); }
+            inline void translate(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+                { this->node_->translate(x, y, z, relativeTo); }
+            inline void translate(const Matrix3 &axes, const Vector3 &move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+                { this->node_->translate(axes, move, relativeTo); }
+            inline void translate(const Matrix3 &axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+                { this->node_->translate(axes, x, y, z, relativeTo); }
 
-      inline const Ogre::Quaternion& getOrientation()
-        { return this->node_->getOrientation(); }
-      inline void setOrientation(const Ogre::Quaternion& quat)
-        { this->node_->setOrientation(quat); }
-      inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-        { this->node_->rotate(axis, angle, relativeTo); }
-      inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
-        { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
-      inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
-        { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
-      inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
-        { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
+            inline void yaw(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+                { this->node_->yaw(angle, relativeTo); }
+            inline void pitch(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+                { this->node_->pitch(angle, relativeTo); }
+            inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+                { this->node_->roll(angle, relativeTo); }
+            void setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll);
 
-      inline void setScale(const Vector3 &scale)
-        { this->node_->setScale(scale); }
-      inline void setScale(Real x, Real y, Real z)
-        { this->node_->setScale(x, y, z); }
-      inline void setScale(Real scale)
-        { this->node_->setScale(scale, scale, scale); }
-      inline const Vector3& getScale(void) const
-        { return this->node_->getScale(); }
-      inline void scale(const Vector3 &scale)
-        { this->node_->scale(scale); }
-      inline void scale(Real x, Real y, Real z)
-        { this->node_->scale(x, y, z); }
-      inline void scale(Real scale)
-        { this->node_->scale(scale, scale, scale); }
+            inline void setYaw(const Degree &angle)
+                { this->node_->yaw(angle, Ogre::Node::TS_LOCAL); }
+            inline void setPitch(const Degree &angle)
+                { this->node_->pitch(angle, Ogre::Node::TS_LOCAL); }
+            inline void setRoll(const Degree &angle)
+                { this->node_->roll(angle, Ogre::Node::TS_LOCAL); }
 
-      inline void attachObject(Ogre::MovableObject *obj)
-        { this->node_->attachObject(obj); }
-      inline void attachObject(Mesh &mesh)
-        { this->node_->attachObject(mesh.getEntity()); }
-      inline void detachObject(Ogre::MovableObject *obj)
-        { this->node_->detachObject(obj); }
-      inline void detachAllObjects()
-        { this->node_->detachAllObjects(); }
+            inline const Ogre::Quaternion& getOrientation()
+              { return this->node_->getOrientation(); }
+            inline void setOrientation(const Ogre::Quaternion& quat)
+              { this->node_->setOrientation(quat); }
+            inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+              { this->node_->rotate(axis, angle, relativeTo); }
+            inline void setDirectionLoader(Real x, Real y, Real z)
+              { this->setDirection(x, y, z); }
+            inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+              { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
+            inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+              { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
+            inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+              { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
 
-      inline void setVelocity(const Vector3& velocity)
-          { this->velocity_ = velocity; }
-      inline void setVelocity(Real x, Real y, Real z)
-          { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
-      inline const Vector3& getVelocity() const
-          { return this->velocity_; }
+            inline void setScale(const Vector3 &scale)
+              { this->node_->setScale(scale); }
+            inline void setScale(Real x, Real y, Real z)
+              { this->node_->setScale(x, y, z); }
+            inline void setScale(Real scale)
+              { this->node_->setScale(scale, scale, scale); }
+            inline void setTotalScale(Real scale)
+              { this->node_->setScale(scale, scale, scale); }
+            inline const Vector3& getScale(void) const
+              { return this->node_->getScale(); }
+            inline void scale(const Vector3 &scale)
+              { this->node_->scale(scale); }
+            inline void scale(Real x, Real y, Real z)
+              { this->node_->scale(x, y, z); }
+            inline void scale(Real scale)
+              { this->node_->scale(scale, scale, scale); }
 
-      inline void setAcceleration(const Vector3& acceleration)
-          { this->acceleration_ = acceleration; }
-      inline void setAcceleration(Real x, Real y, Real z)
-          { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
-      inline const Vector3& getAcceleration() const
-          { return this->acceleration_; }
+            inline void attachObject(Ogre::MovableObject *obj)
+              { this->node_->attachObject(obj); }
+            inline void attachObject(Mesh &mesh)
+              { this->node_->attachObject(mesh.getEntity()); }
+            inline void detachObject(Ogre::MovableObject *obj)
+              { this->node_->detachObject(obj); }
+            inline void detachAllObjects()
+              { this->node_->detachAllObjects(); }
 
-      inline void setRotationAxis(const Vector3& axis)
-          { this->rotationAxis_ = axis; }
-      inline void setRotationAxis(Real x, Real y, Real z)
-          { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
-      inline const Vector3& getRotationAxis() const
-          { return this->rotationAxis_; }
+            inline void setVelocity(const Vector3& velocity)
+                { this->velocity_ = velocity; }
+            inline void setVelocity(Real x, Real y, Real z)
+                { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
+            inline const Vector3& getVelocity() const
+                { return this->velocity_; }
 
-      inline void setRotationRate(const Radian& angle)
-          { this->rotationRate_ = angle; }
-      inline void setRotationRate(const Degree& angle)
-          { this->rotationRate_ = angle; }
-      inline const Radian& getRotationRate() const
-          { return this->rotationRate_; }
+            inline void setAcceleration(const Vector3& acceleration)
+                { this->acceleration_ = acceleration; }
+            inline void setAcceleration(Real x, Real y, Real z)
+                { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
+            inline const Vector3& getAcceleration() const
+                { return this->acceleration_; }
 
-      inline void setMomentum(const Radian& angle)
-          { this->momentum_ = angle; }
-      inline void setMomentum(const Degree& angle)
-          { this->momentum_ = angle; }
-      inline const Radian& getMomentum() const
-          { return this->momentum_; }
+            inline void setRotationAxisLoader(const Vector3& axis)
+                { this->rotationAxis_ = axis; }
+            inline void setRotationAxis(const Vector3& axis)
+                { this->rotationAxis_ = axis; }
+            inline void setRotationAxis(Real x, Real y, Real z)
+                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
+            inline const Vector3& getRotationAxis() const
+                { return this->rotationAxis_; }
 
-      inline void setStatic(bool bStatic)
-          { this->bStatic_ = bStatic; }
-      inline bool isStatic()
-          { return this->bStatic_; }
+//            inline void setRotationRate(const Radian& angle)
+//                { this->rotationRate_ = angle; }
+            inline void setRotationRate(const Degree& angle)
+                { this->rotationRate_ = angle; this->setStatic(angle == Degree(0)); }
+            inline const Radian& getRotationRate() const
+                { return this->rotationRate_; }
 
-    protected:
-      void registerAllVariables();
+            inline void setMomentum(const Radian& angle)
+                { this->momentum_ = angle; }
+            inline void setMomentum(const Degree& angle)
+                { this->momentum_ = angle; }
+            inline const Radian& getMomentum() const
+                { return this->momentum_; }
 
-      Vector3 velocity_;
-      Vector3 acceleration_;
-      Vector3 rotationAxis_;
-      Radian rotationRate_;
-      Radian momentum_;
+            inline void setStatic(bool bStatic)
+                { this->bStatic_ = bStatic; }
+            inline bool isStatic()
+                { return this->bStatic_; }
 
-    private:
-      static unsigned int worldEntityCounter_s;
-      Ogre::SceneNode* node_;
-      bool bStatic_;
-  };
-  ExportClass(WorldEntity, Orxonox);
+        protected:
+            void registerAllVariables();
+
+            Vector3 velocity_;
+            Vector3 acceleration_;
+            Vector3 rotationAxis_;
+            Radian rotationRate_;
+            Radian momentum_;
+
+        private:
+            static unsigned int worldEntityCounter_s;
+            Ogre::SceneNode* node_;
+            bool bStatic_;
+            std::vector<WorldEntity*> attachedWorldEntities_;
+    };
 }
 
Index: /code/trunk/src/orxonox/objects/test1.cc
===================================================================
--- /code/trunk/src/orxonox/objects/test1.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/test1.cc	(revision 871)
@@ -29,7 +29,5 @@
 #include "test2.h"
 #include "test3.h"
-#include "util/tinyxml/tinyxml.h"
-#include "../Orxonox.h"
-#include <OgreSceneManager.h>
+#include "core/CoreIncludes.h"
 
 namespace orxonox
Index: /code/trunk/src/orxonox/objects/test2.cc
===================================================================
--- /code/trunk/src/orxonox/objects/test2.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/test2.cc	(revision 871)
@@ -29,4 +29,5 @@
 #include "test2.h"
 #include "test3.h"
+#include "core/CoreIncludes.h"
 
 namespace orxonox
Index: /code/trunk/src/orxonox/objects/test3.cc
===================================================================
--- /code/trunk/src/orxonox/objects/test3.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/test3.cc	(revision 871)
@@ -29,4 +29,5 @@
 #include "test2.h"
 #include "test3.h"
+#include "core/CoreIncludes.h"
 
 namespace orxonox
@@ -63,16 +64,16 @@
     void Test3::configOutput()
     {
-        std::cout << this->value_int_ << std::endl;
-        std::cout << this->value_uint_ << std::endl;
-        std::cout << (int)this->value_char_ << std::endl;
-        std::cout << (int)this->value_uchar_ << std::endl;
-        std::cout << this->value_float_ << std::endl;
-        std::cout << this->value_double_ << std::endl;
-        std::cout << this->value_bool_ << std::endl;
-        std::cout << this->value_string_ << std::endl;
-        std::cout << this->value_constchar_ << std::endl;
-        std::cout << this->value_vector2_ << std::endl;
-        std::cout << this->value_vector3_ << std::endl;
-        std::cout << this->value_colourvalue_ << std::endl;
+        std::cout << "int:         " << this->value_int_ << std::endl;
+        std::cout << "uint:        " << this->value_uint_ << std::endl;
+        std::cout << "char:        " << (int)this->value_char_ << std::endl;
+        std::cout << "uchar:       " << (int)this->value_uchar_ << std::endl;
+        std::cout << "float:       " << this->value_float_ << std::endl;
+        std::cout << "double:      " << this->value_double_ << std::endl;
+        std::cout << "bool:        " << this->value_bool_ << std::endl;
+        std::cout << "string:      " << this->value_string_ << std::endl;
+        std::cout << "constchar:   " << this->value_constchar_ << std::endl;
+        std::cout << "vector2:     " << this->value_vector2_ << std::endl;
+        std::cout << "vector3:     " << this->value_vector3_ << std::endl;
+        std::cout << "colourvalue: " << this->value_colourvalue_ << std::endl;
     }
 
Index: /code/trunk/src/orxonox/objects/test3.h
===================================================================
--- /code/trunk/src/orxonox/objects/test3.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/test3.h	(revision 871)
@@ -3,4 +3,5 @@
 
 #include "core/BaseObject.h"
+#include "util/Math.h"
 
 namespace orxonox
Index: /code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc	(revision 871)
@@ -31,4 +31,5 @@
 #include "BulletManager.h"
 #include "util/tinyxml/tinyxml.h"
+#include "core/CoreIncludes.h"
 
 #include "AmmunitionDump.h"
Index: /code/trunk/src/orxonox/objects/weapon/AmmunitionDump.h
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/AmmunitionDump.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/AmmunitionDump.h	(revision 871)
@@ -37,5 +37,4 @@
 
 #include "network/Synchronisable.h"
-//#include "../core/CoreIncludes.h"
 #include "core/BaseObject.h"
 
@@ -66,5 +65,4 @@
     int *capacity_;
   };
-  ExportClass(AmmunitionDump, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/weapon/BarrelGun.cc
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/BarrelGun.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/BarrelGun.cc	(revision 871)
@@ -38,4 +38,5 @@
 #include "AmmunitionDump.h"
 #include "BaseWeapon.h"
+#include "core/CoreIncludes.h"
 
 #include "BarrelGun.h"
Index: /code/trunk/src/orxonox/objects/weapon/BarrelGun.h
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/BarrelGun.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/BarrelGun.h	(revision 871)
@@ -60,5 +60,4 @@
 
   };
-  ExportClass(BarrelGun, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 871)
@@ -38,4 +38,5 @@
 #include "BulletManager.h"
 #include "AmmunitionDump.h"
+#include "core/CoreIncludes.h"
 
 #include "BaseWeapon.h"
Index: /code/trunk/src/orxonox/objects/weapon/BaseWeapon.h
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/BaseWeapon.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/BaseWeapon.h	(revision 871)
@@ -122,5 +122,4 @@
 
   };
-  ExportAbstractClass(BaseWeapon, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/weapon/Bullet.cc
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/Bullet.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/Bullet.cc	(revision 871)
@@ -27,4 +27,5 @@
 
 #include "OrxonoxStableHeaders.h"
+#include "core/CoreIncludes.h"
 
 #include "Bullet.h"
Index: /code/trunk/src/orxonox/objects/weapon/Bullet.h
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/Bullet.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/Bullet.h	(revision 871)
@@ -47,5 +47,4 @@
     inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
  };
-  ExportClass(Bullet, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/objects/weapon/BulletManager.cc
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/BulletManager.cc	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/BulletManager.cc	(revision 871)
@@ -30,4 +30,5 @@
 #include "BulletManager.h"
 #include "Bullet.h"
+#include "core/CoreIncludes.h"
 
 
Index: /code/trunk/src/orxonox/objects/weapon/BulletManager.h
===================================================================
--- /code/trunk/src/orxonox/objects/weapon/BulletManager.h	(revision 870)
+++ /code/trunk/src/orxonox/objects/weapon/BulletManager.h	(revision 871)
@@ -38,5 +38,4 @@
 #include "network/Synchronisable.h"
 #include "util/tinyxml/tinyxml.h"
-#include "../../core/CoreIncludes.h"
 #include "core/BaseObject.h"
 #include "../Tickable.h"
@@ -67,5 +66,4 @@
 	  int bulletsIndex_;
   };
-  ExportClass(BulletManager, Orxonox);
 }
 
Index: /code/trunk/src/orxonox/tools/BillboardSet.h
===================================================================
--- /code/trunk/src/orxonox/tools/BillboardSet.h	(revision 870)
+++ /code/trunk/src/orxonox/tools/BillboardSet.h	(revision 871)
@@ -7,6 +7,4 @@
 
 #include "../OrxonoxPrereqs.h"
-
-#include "../core/CoreIncludes.h"
 #include "util/Math.h"
 
Index: /code/trunk/src/orxonox/tools/Timer.cc
===================================================================
--- /code/trunk/src/orxonox/tools/Timer.cc	(revision 871)
+++ /code/trunk/src/orxonox/tools/Timer.cc	(revision 871)
@@ -0,0 +1,19 @@
+#include "core/CoreIncludes.h"
+#include "Timer.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Sets the default-values.
+    */
+    TimerBase::TimerBase()
+    {
+        RegisterRootObject(TimerBase);
+
+        this->interval_ = 0;
+        this->bLoop_ = false;
+        this->bActive_ = false;
+
+        this->time_ = 0;
+    }
+}
Index: /code/trunk/src/orxonox/tools/Timer.h
===================================================================
--- /code/trunk/src/orxonox/tools/Timer.h	(revision 870)
+++ /code/trunk/src/orxonox/tools/Timer.h	(revision 871)
@@ -59,8 +59,5 @@
 
 #include <OgreFrameListener.h>
-
 #include "../OrxonoxPrereqs.h"
-
-#include "../core/CoreIncludes.h"
 
 namespace orxonox
@@ -72,15 +69,5 @@
 
         public:
-            /** @brief Constructor: Sets the default-values. */
-            TimerBase()
-            {
-                RegisterRootObject(TimerBase);
-
-                this->interval_ = 0;
-                this->bLoop_ = false;
-                this->bActive_ = false;
-
-                this->time_ = 0;
-            }
+            TimerBase();
 
             virtual void run() const = 0;
@@ -94,5 +81,5 @@
             /** @brief Unpauses the Timer - continues with the given state. */
             inline void unpauseTimer() { this->bActive_ = true; }
-            /** @returns true if the Timer is active (= not stoped, not paused). */
+            /** @brief Returns true if the Timer is active (= not stoped, not paused). @return True = Time is active */
             inline bool isActive() const { return this->bActive_; }
 
@@ -104,5 +91,4 @@
             float time_;        //!< Internal variable, counting the time till the next function-call
     };
-    ExportAbstractClass(TimerBase, Orxonox);
 
     //! The Timer is a callback-object, calling a given function after a given time-interval.
@@ -158,5 +144,4 @@
             T* object_;
     };
-    ExportAbstractClass(Timer<BaseObject>, Orxonox);
 
     //! The TimerFrameListener manages all Timers in the game.
Index: /code/trunk/src/util/CMakeLists.txt
===================================================================
--- /code/trunk/src/util/CMakeLists.txt	(revision 870)
+++ /code/trunk/src/util/CMakeLists.txt	(revision 871)
@@ -4,17 +4,21 @@
 
 SET (UTIL_SRC_FILES
+  Math.cc
+  String.cc
+  SubString.cc
+  MultiTypePrimitive.cc
+  MultiTypeString.cc
+  MultiTypeMath.cc
   ${TINYXML_SRC_FILES}
-  substring.cc
 )
 
-IF(WIN32)
-  ADD_LIBRARY( util ${UTIL_SRC_FILES} )
-ELSE(WIN32)
-  ADD_LIBRARY( util SHARED ${UTIL_SRC_FILES} )
-ENDIF(WIN32)
+ADD_LIBRARY( util SHARED ${UTIL_SRC_FILES} )
 SET_TARGET_PROPERTIES( util PROPERTIES LINK_FLAGS "--no-undefined" )
-
 
 IF(TESTING_ENABLED)
   ADD_SUBDIRECTORY(testing)
 ENDIF(TESTING_ENABLED)
+
+TARGET_LINK_LIBRARIES( util
+  ${OGRE_LIBRARIES}
+)
Index: /code/trunk/src/util/Convert.h
===================================================================
--- /code/trunk/src/util/Convert.h	(revision 870)
+++ /code/trunk/src/util/Convert.h	(revision 871)
@@ -36,4 +36,9 @@
 #include <sstream>
 
+#include "UtilPrereqs.h"
+#include "Math.h"
+#include "SubString.h"
+#include "MultiTypeMath.h"
+
 
 // DEFAULT CLASS
@@ -41,9 +46,9 @@
 class Converter
 {
- public:
-  bool operator()(ToType* output, const FromType& input) const
-  {
-    return false;
-  }
+  public:
+    bool operator()(ToType* output, const FromType& input) const
+    {
+      return false;
+    }
 };
 
@@ -52,16 +57,16 @@
 class Converter<FromType, std::string>
 {
- public:
-  bool operator()(std::string* output, const FromType& input) const
-  {
-    std::ostringstream oss;
-    if (oss << input)
-    {
-      (*output) = oss.str();
-      return true;
-    }
-    else
-      return false;
-  }
+  public:
+    bool operator()(std::string* output, const FromType& input) const
+    {
+      std::ostringstream oss;
+      if (oss << input)
+      {
+        (*output) = oss.str();
+        return true;
+      }
+      else
+        return false;
+    }
 };
 
@@ -70,13 +75,13 @@
 class Converter<std::string, ToType>
 {
- public:
-  bool operator()(ToType* output, const std::string& input) const
-  {
-    std::istringstream iss(input);
-    if (iss >> (*output))
-      return true;
-    else
-      return false;
-  }
+  public:
+    bool operator()(ToType* output, const std::string& input) const
+    {
+      std::istringstream iss(input);
+      if (iss >> (*output))
+        return true;
+      else
+        return false;
+    }
 };
 
@@ -101,3 +106,431 @@
 }
 
+// THE SAME LIKE BEFORE, BUT NEEDS NO POINTER TO THE OUTPUT
+template<typename FromType, typename ToType>
+static ToType ConvertValueAndReturn(const FromType& input)
+{
+  ToType output;
+  ConvertValue(&output, input);
+  return output;
+}
+
+// THE SAME, BUT WITH DEFAULT VALUE
+template<typename FromType, typename ToType>
+static ToType ConvertValueAndReturn(const FromType& input, const FromType& fallback)
+{
+  ToType output;
+  ConvertValue(&output, input, fallback);
+  return output;
+}
+
+//////////////////////////
+// MORE SPECIALISATIONS //
+//////////////////////////
+
+// STRING TO STRING
+template<>
+class Converter<std::string, std::string>
+{
+  public:
+    bool operator()(std::string* output, const std::string& input) const
+    {
+        (*output) = std::string(input);
+        return true;
+    }
+};
+
+////////////////
+// MULTITYPES //
+////////////////
+
+// PARTIAL SPECIALIZATION TO CONVERT FROM MULTITYPEPRIMITIVE
+template<typename ToType>
+class Converter<MultiTypePrimitive, ToType>
+{
+  public:
+    bool operator()(ToType* output, const MultiTypePrimitive& input) const
+    {
+      if (input.getType() == MT_int)
+        return ConvertValue(output, input.getInt());
+      else if (input.getType() == MT_uint)
+        return ConvertValue(output, input.getUnsignedInt());
+      else if (input.getType() == MT_char)
+        return ConvertValue(output, input.getChar());
+      else if (input.getType() == MT_uchar)
+        return ConvertValue(output, input.getUnsignedChar());
+      else if (input.getType() == MT_short)
+        return ConvertValue(output, input.getShort());
+      else if (input.getType() == MT_ushort)
+        return ConvertValue(output, input.getUnsignedShort());
+      else if (input.getType() == MT_long)
+        return ConvertValue(output, input.getLong());
+      else if (input.getType() == MT_ulong)
+        return ConvertValue(output, input.getUnsignedLong());
+      else if (input.getType() == MT_float)
+        return ConvertValue(output, input.getFloat());
+      else if (input.getType() == MT_double)
+        return ConvertValue(output, input.getDouble());
+      else if (input.getType() == MT_longdouble)
+        return ConvertValue(output, input.getLongDouble());
+      else if (input.getType() == MT_bool)
+        return ConvertValue(output, input.getBool());
+      else
+        return false;
+    }
+};
+template<>
+class Converter<MultiTypePrimitive, std::string>
+{
+  public:
+    bool operator()(std::string* output, const MultiTypePrimitive& input) const
+    {
+      if (input.getType() == MT_int)
+        return ConvertValue(output, input.getInt());
+      else if (input.getType() == MT_uint)
+        return ConvertValue(output, input.getUnsignedInt());
+      else if (input.getType() == MT_char)
+        return ConvertValue(output, input.getChar());
+      else if (input.getType() == MT_uchar)
+        return ConvertValue(output, input.getUnsignedChar());
+      else if (input.getType() == MT_short)
+        return ConvertValue(output, input.getShort());
+      else if (input.getType() == MT_ushort)
+        return ConvertValue(output, input.getUnsignedShort());
+      else if (input.getType() == MT_long)
+        return ConvertValue(output, input.getLong());
+      else if (input.getType() == MT_ulong)
+        return ConvertValue(output, input.getUnsignedLong());
+      else if (input.getType() == MT_float)
+        return ConvertValue(output, input.getFloat());
+      else if (input.getType() == MT_double)
+        return ConvertValue(output, input.getDouble());
+      else if (input.getType() == MT_longdouble)
+        return ConvertValue(output, input.getLongDouble());
+      else if (input.getType() == MT_bool)
+        return ConvertValue(output, input.getBool());
+      else
+        return false;
+    }
+};
+
+// PARTIAL SPECIALIZATION TO CONVERT FROM MULTITYPESTRING
+template<typename ToType>
+class Converter<MultiTypeString, ToType>
+{
+  public:
+    bool operator()(ToType* output, const MultiTypeString& input) const
+    {
+      if (input.getType() == MT_constchar)
+        return ConvertValue(output, input.getConstChar());
+      else if (input.getType() == MT_string)
+        return ConvertValue(output, input.getString());
+      else
+        return ConvertValue(output, (MultiTypePrimitive)input);
+    }
+};
+template<>
+class Converter<MultiTypeString, std::string>
+{
+  public:
+    bool operator()(std::string* output, const MultiTypeString& input) const
+    {
+      if (input.getType() == MT_constchar)
+        return ConvertValue(output, input.getConstChar());
+      else if (input.getType() == MT_string)
+        return ConvertValue(output, input.getString());
+      else
+        return ConvertValue(output, (MultiTypePrimitive)input);
+    }
+};
+
+// PARTIAL SPECIALIZATION TO CONVERT FROM MULTITYPEMATH
+template<typename ToType>
+class Converter<MultiTypeMath, ToType>
+{
+  public:
+    bool operator()(ToType* output, const MultiTypeMath& input) const
+    {
+      if (input.getType() == MT_vector2)
+        return ConvertValue(output, input.getVector2());
+      else if (input.getType() == MT_vector3)
+        return ConvertValue(output, input.getVector3());
+      else if (input.getType() == MT_quaternion)
+        return ConvertValue(output, input.getQuaternion());
+      else if (input.getType() == MT_colourvalue)
+        return ConvertValue(output, input.getColourValue());
+      else if (input.getType() == MT_radian)
+        return ConvertValue(output, input.getRadian());
+      else if (input.getType() == MT_degree)
+        return ConvertValue(output, input.getDegree());
+      else
+        return ConvertValue(output, (MultiTypeString)input);
+    }
+};
+template<>
+class Converter<MultiTypeMath, std::string>
+{
+  public:
+    bool operator()(std::string* output, const MultiTypeMath& input) const
+    {
+      if (input.getType() == MT_vector2)
+        return ConvertValue(output, input.getVector2());
+      else if (input.getType() == MT_vector3)
+        return ConvertValue(output, input.getVector3());
+      else if (input.getType() == MT_quaternion)
+        return ConvertValue(output, input.getQuaternion());
+      else if (input.getType() == MT_colourvalue)
+        return ConvertValue(output, input.getColourValue());
+      else if (input.getType() == MT_radian)
+        return ConvertValue(output, input.getRadian());
+      else if (input.getType() == MT_degree)
+        return ConvertValue(output, input.getDegree());
+      else
+        return ConvertValue(output, (MultiTypeString)input);
+    }
+};
+
+
+////////////////////
+// MATH TO STRING //
+////////////////////
+
+// Vector2 to std::string
+template <>
+class Converter<orxonox::Vector2, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Vector2& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.x << "," << input.y)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// Vector3 to std::string
+template <>
+class Converter<orxonox::Vector3, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Vector3& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.x << "," << input.y << "," << input.z)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// Vector4 to std::string
+template <>
+class Converter<orxonox::Vector4, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Vector4& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.x << "," << input.y << "," << input.z << "," << input.w)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// Quaternion to std::string
+template <>
+class Converter<orxonox::Quaternion, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::Quaternion& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.w << "," << input.x << "," << input.y << "," << input.z)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// ColourValue to std::string
+template <>
+class Converter<orxonox::ColourValue, std::string>
+{
+  public:
+    bool operator()(std::string* output, const orxonox::ColourValue& input) const
+    {
+      std::ostringstream ostream;
+      if (ostream << input.r << "," << input.g << "," << input.b << "," << input.a)
+      {
+        (*output) = ostream.str();
+        return true;
+      }
+
+      return false;
+    }
+};
+
+
+////////////////////
+// STRING TO MATH //
+////////////////////
+
+// std::string to Vector2
+template <>
+class Converter<std::string, orxonox::Vector2>
+{
+  public:
+    bool operator()(orxonox::Vector2* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 2)
+      {
+        if (!ConvertValue(&(output->x), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[1]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to Vector3
+template <>
+class Converter<std::string, orxonox::Vector3>
+{
+  public:
+    bool operator()(orxonox::Vector3* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 3)
+      {
+        if (!ConvertValue(&(output->x), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->z), tokens[2]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to Vector4
+template <>
+class Converter<std::string, orxonox::Vector4>
+{
+  public:
+    bool operator()(orxonox::Vector4* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 4)
+      {
+        if (!ConvertValue(&(output->x), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->z), tokens[2]))
+          return false;
+        if (!ConvertValue(&(output->w), tokens[3]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to Quaternion
+template <>
+class Converter<std::string, orxonox::Quaternion>
+{
+  public:
+    bool operator()(orxonox::Quaternion* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 4)
+      {
+        if (!ConvertValue(&(output->w), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->x), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->y), tokens[2]))
+          return false;
+        if (!ConvertValue(&(output->z), tokens[3]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
+// std::string to ColourValue
+template <>
+class Converter<std::string, orxonox::ColourValue>
+{
+  public:
+    bool operator()(orxonox::ColourValue* output, const std::string& input) const
+    {
+      unsigned int opening_parenthesis, closing_parenthesis = input.find(')');
+      if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; }
+
+      SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0');
+
+      if (tokens.size() >= 4)
+      {
+        if (!ConvertValue(&(output->r), tokens[0]))
+          return false;
+        if (!ConvertValue(&(output->g), tokens[1]))
+          return false;
+        if (!ConvertValue(&(output->b), tokens[2]))
+          return false;
+        if (!ConvertValue(&(output->a), tokens[3]))
+          return false;
+
+        return true;
+      }
+
+      return false;
+    }
+};
+
 #endif /* _Convert_H__ */
Index: /code/trunk/src/util/Math.cc
===================================================================
--- /code/trunk/src/util/Math.cc	(revision 871)
+++ /code/trunk/src/util/Math.cc	(revision 871)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Math.h"
+
+/**
+    @brief Function for writing to a stream.
+*/
+std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian)
+{
+    out << radian.valueRadians();
+    return out;
+}
+
+/**
+    @brief Function for reading from a stream.
+*/
+std::istream& operator>>(std::istream& in, orxonox::Radian& radian)
+{
+    float temp;
+    in >> temp;
+    radian = temp;
+    return in;
+}
+
+/**
+    @brief Function for writing to a stream.
+*/
+std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree)
+{
+    out << degree.valueDegrees();
+    return out;
+}
+
+/**
+    @brief Function for reading from a stream.
+*/
+std::istream& operator>>(std::istream& in, orxonox::Degree& degree)
+{
+    float temp;
+    in >> temp;
+    degree = temp;
+    return in;
+}
Index: /code/trunk/src/util/Math.h
===================================================================
--- /code/trunk/src/util/Math.h	(revision 870)
+++ /code/trunk/src/util/Math.h	(revision 871)
@@ -1,2 +1,36 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Math_H__
+#define _Math_H__
+
+#include <ostream>
+
+#include "UtilPrereqs.h"
+
 #include <OgreMath.h>
 #include <OgreVector2.h>
@@ -18,2 +52,97 @@
   typedef Ogre::ColourValue ColourValue;
 }
+
+_UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian);
+_UtilExport std::istream& operator>>(std::istream& in, orxonox::Radian& radian);
+_UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree);
+_UtilExport std::istream& operator>>(std::istream& in, orxonox::Degree& degree);
+
+template <typename T>
+inline T sgn(T x)
+{
+    return (x >= 0) ? 1 : -1;
+}
+
+template <typename T>
+inline T min(T a, T b)
+{
+    return (a <= b) ? a : b;
+}
+
+template <typename T>
+inline T max(T a, T b)
+{
+    return (a >= b) ? a : b;
+}
+
+template <typename T>
+inline T clamp(T x, T min, T max)
+{
+    if (x < min)
+        return min;
+
+    if (x > max)
+        return max;
+
+    return x;
+}
+
+template <typename T>
+inline T square(T x)
+{
+    return x*x;
+}
+
+template <typename T>
+inline T cube(T x)
+{
+    return x*x*x;
+}
+
+template <typename T>
+inline int floor(T x)
+{
+    return (int)(x);
+}
+
+template <typename T>
+inline int ceil(T x)
+{
+    int temp = floor(x);
+    return (temp != x) ? (temp + 1) : temp;
+}
+
+template <typename T>
+inline int round(T x)
+{
+    return (int)(x + 0.5);
+}
+
+template <typename T>
+T interpolate(float time, const T& start, const T& end)
+{
+    return time * (end - start) + start;
+}
+
+template <typename T>
+T interpolateSmooth(float time, const T& start, const T& end)
+{
+    return (-2 * (end - start) * cube(time)) + (3 * (end - start) * square(time)) + start;
+}
+
+inline _UtilExport float rnd()
+{
+    return ((float)rand() / RAND_MAX);
+}
+
+inline _UtilExport float rnd(float max)
+{
+    return rnd() * max;
+}
+
+inline _UtilExport float rnd(float min, float max)
+{
+    return rnd(max - min) + min;
+}
+
+#endif /* _Math_H__ */
Index: /code/trunk/src/util/MultiType.h
===================================================================
--- /code/trunk/src/util/MultiType.h	(revision 871)
+++ /code/trunk/src/util/MultiType.h	(revision 871)
@@ -0,0 +1,75 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiType_H__
+#define _MultiType_H__
+
+#include "UtilPrereqs.h"
+
+enum _UtilExport MultiType
+{
+    MT_null,
+    MT_int,
+    MT_uint,
+    MT_char,
+    MT_uchar,
+    MT_short,
+    MT_ushort,
+    MT_long,
+    MT_ulong,
+    MT_float,
+    MT_double,
+    MT_longdouble,
+    MT_bool,
+    MT_constchar,
+    MT_string,
+    MT_vector2,
+    MT_vector3,
+    MT_colourvalue,
+    MT_quaternion,
+    MT_degree,
+    MT_radian
+};
+
+union _UtilExport MultiTypeValue
+{
+    int             int_;
+    unsigned int    uint_;
+    char            char_;
+    unsigned char   uchar_;
+    short           short_;
+    unsigned short  ushort_;
+    long            long_;
+    unsigned long   ulong_;
+    float           float_;
+    double          double_;
+    long double     longdouble_;
+    bool            bool_;
+};
+
+#endif /* _MultiType_H__ */
Index: /code/trunk/src/util/MultiTypeMath.cc
===================================================================
--- /code/trunk/src/util/MultiTypeMath.cc	(revision 871)
+++ /code/trunk/src/util/MultiTypeMath.cc	(revision 871)
@@ -0,0 +1,186 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#include "MultiTypeMath.h"
+#include "Convert.h"
+
+MultiTypeMath::MultiTypeMath(MultiType type) : MultiTypeString(type)
+{
+    if (type == MT_vector2)
+        this->vector2_ = orxonox::Vector2(0, 0);
+    else if (type == MT_vector3)
+        this->vector3_ = orxonox::Vector3(0, 0, 0);
+    else if (type == MT_colourvalue)
+        this->colourvalue_ = orxonox::ColourValue(0, 0, 0, 0);
+    else if (type == MT_quaternion)
+        this->quaternion_ = orxonox::Quaternion(1, 0, 0, 0);
+    else if (type == MT_radian)
+        this->radian_ = orxonox::Radian(0);
+    else if (type == MT_degree)
+        this->degree_ = orxonox::Degree(0);
+}
+
+bool MultiTypeMath::operator==(const MultiTypeMath& mtm) const
+{
+    if (!MultiTypeString::operator==(mtm) && this->type_ == mtm.type_)
+    {
+        if (this->type_ == MT_vector2)
+            return (this->vector2_ == mtm.vector2_);
+        else if (this->type_ == MT_vector3)
+            return (this->vector3_ == mtm.vector3_);
+        else if (this->type_ == MT_colourvalue)
+            return (this->colourvalue_ == mtm.colourvalue_);
+        else if (this->type_ == MT_quaternion)
+            return (this->quaternion_ == mtm.quaternion_);
+        else if (this->type_ == MT_radian)
+            return (this->radian_ == mtm.radian_);
+        else if (this->type_ == MT_degree)
+            return (this->degree_ == mtm.degree_);
+    }
+
+    return false;
+}
+
+bool MultiTypeMath::operator!=(const MultiTypeMath& mtm) const
+{
+    if (MultiTypeString::operator==(mtm) && this->type_ == mtm.type_)
+    {
+        if (this->type_ == MT_vector2)
+            return (this->vector2_ != mtm.vector2_);
+        else if (this->type_ == MT_vector3)
+            return (this->vector3_ != mtm.vector3_);
+        else if (this->type_ == MT_colourvalue)
+            return (this->colourvalue_ != mtm.colourvalue_);
+        else if (this->type_ == MT_quaternion)
+            return (this->quaternion_ != mtm.quaternion_);
+        else if (this->type_ == MT_radian)
+            return (this->radian_ != mtm.radian_);
+        else if (this->type_ == MT_degree)
+            return (this->degree_ != mtm.degree_);
+    }
+
+    return true;
+}
+
+MultiTypeMath::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeMath, int>(*this); }
+MultiTypeMath::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeMath, unsigned int>(*this); }
+MultiTypeMath::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeMath, char>(*this); }
+MultiTypeMath::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeMath, unsigned char>(*this); }
+MultiTypeMath::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeMath, short>(*this); }
+MultiTypeMath::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeMath, unsigned short>(*this); }
+MultiTypeMath::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeMath, long>(*this); }
+MultiTypeMath::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeMath, unsigned long>(*this); }
+MultiTypeMath::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeMath, float>(*this); }
+MultiTypeMath::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeMath, double>(*this); }
+MultiTypeMath::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeMath, long double>(*this); }
+MultiTypeMath::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeMath, bool>(*this); }
+MultiTypeMath::operator std::string() const
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this); }
+MultiTypeMath::operator const char*() const
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this)).c_str(); }
+MultiTypeMath::operator orxonox::Vector2() const
+{ return (this->type_ == MT_vector2) ? this->vector2_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector2>(*this); }
+MultiTypeMath::operator orxonox::Vector3() const
+{ return (this->type_ == MT_vector3) ? this->vector3_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector3>(*this); }
+MultiTypeMath::operator orxonox::Quaternion() const
+{ return (this->type_ == MT_quaternion) ? this->quaternion_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Quaternion>(*this); }
+MultiTypeMath::operator orxonox::ColourValue() const
+{ return (this->type_ == MT_colourvalue) ? this->colourvalue_ : ConvertValueAndReturn<MultiTypeMath, orxonox::ColourValue>(*this); }
+MultiTypeMath::operator orxonox::Radian() const
+{ return (this->type_ == MT_radian) ? this->radian_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Radian>(*this); }
+MultiTypeMath::operator orxonox::Degree() const
+{ return (this->type_ == MT_degree) ? this->degree_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Degree>(*this); }
+
+void MultiTypeMath::setValue(const MultiTypeMath& mtm)
+{
+    MultiTypeString::setValue(mtm);
+    this->vector2_ = mtm.vector2_;
+    this->vector3_ = mtm.vector3_;
+    this->quaternion_ = mtm.quaternion_;
+    this->colourvalue_ = mtm.colourvalue_;
+    this->radian_ = mtm.radian_;
+    this->degree_ = mtm.degree_;
+}
+
+std::string MultiTypeMath::toString() const
+{
+    std::string output;
+
+    if (this->type_ == MT_vector2)
+        ConvertValue(&output, this->vector2_);
+    else if (this->type_ == MT_vector3)
+        ConvertValue(&output, this->vector3_);
+    else if (this->type_ == MT_colourvalue)
+        ConvertValue(&output, this->colourvalue_);
+    else if (this->type_ == MT_quaternion)
+        ConvertValue(&output, this->quaternion_);
+    else if (this->type_ == MT_radian)
+        ConvertValue(&output, this->radian_);
+    else if (this->type_ == MT_degree)
+        ConvertValue(&output, this->degree_);
+    else
+        return MultiTypeString::toString();
+
+    return output;
+}
+
+bool MultiTypeMath::fromString(const std::string value)
+{
+    if (this->type_ == MT_vector2)
+        return ConvertValue(&this->vector2_, value, orxonox::Vector2(0, 0));
+    else if (this->type_ == MT_vector3)
+        return ConvertValue(&this->vector3_, value, orxonox::Vector3(0, 0, 0));
+    else if (this->type_ == MT_colourvalue)
+        return ConvertValue(&this->colourvalue_, value, orxonox::ColourValue(0, 0, 0, 0));
+    else if (this->type_ == MT_quaternion)
+        return ConvertValue(&this->quaternion_, value, orxonox::Quaternion(1, 0, 0, 0));
+    else if (this->type_ == MT_radian)
+        return ConvertValue(&this->radian_, value, orxonox::Radian(0));
+    else if (this->type_ == MT_degree)
+        return ConvertValue(&this->degree_, value, orxonox::Degree(0));
+    else
+        return MultiTypeString::fromString(value);
+}
+
+std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm)
+{
+    out << mtm.toString();
+    return out;
+}
Index: /code/trunk/src/util/MultiTypeMath.h
===================================================================
--- /code/trunk/src/util/MultiTypeMath.h	(revision 871)
+++ /code/trunk/src/util/MultiTypeMath.h	(revision 871)
@@ -0,0 +1,157 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiTypeMath_H__
+#define _MultiTypeMath_H__
+
+#include "UtilPrereqs.h"
+
+#include "MultiTypeString.h"
+#include "Math.h"
+
+class _UtilExport MultiTypeMath : public MultiTypeString
+{
+    public:
+        MultiTypeMath(MultiType      type = MT_null);
+        inline MultiTypeMath(int            value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned int   value) : MultiTypeString(value) {}
+        inline MultiTypeMath(char           value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned char  value) : MultiTypeString(value) {}
+        inline MultiTypeMath(short          value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned short value) : MultiTypeString(value) {}
+        inline MultiTypeMath(long           value) : MultiTypeString(value) {}
+        inline MultiTypeMath(unsigned long  value) : MultiTypeString(value) {}
+        inline MultiTypeMath(float          value) : MultiTypeString(value) {}
+        inline MultiTypeMath(double         value) : MultiTypeString(value) {}
+        inline MultiTypeMath(long double    value) : MultiTypeString(value) {}
+        inline MultiTypeMath(bool           value) : MultiTypeString(value) {}
+        inline MultiTypeMath(const char*        value) : MultiTypeString(value) {}
+        inline MultiTypeMath(const std::string& value) : MultiTypeString(value) {}
+        inline MultiTypeMath(const orxonox::Vector2&     value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Vector3&     value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::ColourValue& value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Quaternion&  value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Radian&      value) { this->setValue(value); }
+        inline MultiTypeMath(const orxonox::Degree&      value) { this->setValue(value); }
+        inline MultiTypeMath(const MultiTypeMath& mtm)          { this->setValue(mtm);   }
+        virtual inline ~MultiTypeMath() {}
+
+        using MultiTypeString::operator=;
+        inline MultiTypeMath& operator=(const orxonox::Vector2&     value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Vector3&     value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::ColourValue& value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Quaternion&  value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Radian&      value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const orxonox::Degree&      value) { this->setValue(value); return *this; }
+        inline MultiTypeMath& operator=(const MultiTypeMath& mtm)          { this->setValue(mtm);   return *this; }
+
+        using MultiTypeString::operator==;
+        inline bool operator==(const orxonox::Vector2&     value) const { return (this->vector2_     == value); }
+        inline bool operator==(const orxonox::Vector3&     value) const { return (this->vector3_     == value); }
+        inline bool operator==(const orxonox::ColourValue& value) const { return (this->colourvalue_ == value); }
+        inline bool operator==(const orxonox::Quaternion&  value) const { return (this->quaternion_  == value); }
+        inline bool operator==(const orxonox::Radian&      value) const { return (this->radian_      == value); }
+        inline bool operator==(const orxonox::Degree&      value) const { return (this->degree_      == value); }
+        bool operator==(const MultiTypeMath& mtm) const;
+
+        using MultiTypeString::operator!=;
+        inline bool operator!=(const orxonox::Vector2&     value) const { return (this->vector2_     != value); }
+        inline bool operator!=(const orxonox::Vector3&     value) const { return (this->vector3_     != value); }
+        inline bool operator!=(const orxonox::ColourValue& value) const { return (this->colourvalue_ != value); }
+        inline bool operator!=(const orxonox::Quaternion&  value) const { return (this->quaternion_  != value); }
+        inline bool operator!=(const orxonox::Radian&      value) const { return (this->radian_      != value); }
+        inline bool operator!=(const orxonox::Degree&      value) const { return (this->degree_      != value); }
+        bool operator!=(const MultiTypeMath& mtm) const;
+
+        virtual operator int()                  const;
+        virtual operator unsigned int()         const;
+        virtual operator char()                 const;
+        virtual operator unsigned char()        const;
+        virtual operator short()                const;
+        virtual operator unsigned short()       const;
+        virtual operator long()                 const;
+        virtual operator unsigned long()        const;
+        virtual operator float ()               const;
+        virtual operator double ()              const;
+        virtual operator long double()          const;
+        virtual operator bool()                 const;
+        virtual operator std::string()          const;
+        virtual operator const char*()          const;
+        virtual operator orxonox::Vector2()     const;
+        virtual operator orxonox::Vector3()     const;
+        virtual operator orxonox::ColourValue() const;
+        virtual operator orxonox::Quaternion()  const;
+        virtual operator orxonox::Radian()      const;
+        virtual operator orxonox::Degree()      const;
+
+        using MultiTypeString::setValue;
+        inline void setValue(const orxonox::Vector2&     value) { this->type_ = MT_vector2;     this->vector2_     = value; }
+        inline void setValue(const orxonox::Vector3&     value) { this->type_ = MT_vector3;     this->vector3_     = value; }
+        inline void setValue(const orxonox::ColourValue& value) { this->type_ = MT_colourvalue; this->colourvalue_ = value; }
+        inline void setValue(const orxonox::Quaternion&  value) { this->type_ = MT_quaternion;  this->quaternion_  = value; }
+        inline void setValue(const orxonox::Radian&      value) { this->type_ = MT_radian;      this->radian_      = value; }
+        inline void setValue(const orxonox::Degree&      value) { this->type_ = MT_degree;      this->degree_      = value; }
+        void setValue(const MultiTypeMath& mtm);
+
+        inline orxonox::Vector2     getVector2()     const { return this->vector2_;     }
+        inline orxonox::Vector3     getVector3()     const { return this->vector3_;     }
+        inline orxonox::ColourValue getColourValue() const { return this->colourvalue_; }
+        inline orxonox::Quaternion  getQuaternion()  const { return this->quaternion_;  }
+        inline orxonox::Radian      getRadian()      const { return this->radian_;      }
+        inline orxonox::Degree      getDegree()      const { return this->degree_;      }
+
+        inline orxonox::Vector2&     getVector2()     { return this->vector2_;     }
+        inline orxonox::Vector3&     getVector3()     { return this->vector3_;     }
+        inline orxonox::ColourValue& getColourValue() { return this->colourvalue_; }
+        inline orxonox::Quaternion&  getQuaternion()  { return this->quaternion_;  }
+        inline orxonox::Radian&      getRadian()      { return this->radian_;      }
+        inline orxonox::Degree&      getDegree()      { return this->degree_;      }
+
+        using MultiTypeString::getValue;
+        inline void getValue(orxonox::Vector2*     variable) const { (*variable) = orxonox::Vector2     (this->vector2_);     }
+        inline void getValue(orxonox::Vector3*     variable) const { (*variable) = orxonox::Vector3     (this->vector3_);     }
+        inline void getValue(orxonox::ColourValue* variable) const { (*variable) = orxonox::ColourValue (this->colourvalue_); }
+        inline void getValue(orxonox::Quaternion*  variable) const { (*variable) = orxonox::Quaternion  (this->quaternion_);  }
+        inline void getValue(orxonox::Radian*      variable) const { (*variable) = orxonox::Radian      (this->radian_);      }
+        inline void getValue(orxonox::Degree*      variable) const { (*variable) = orxonox::Degree      (this->degree_);      }
+
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
+
+    protected:
+        orxonox::Vector2      vector2_;
+        orxonox::Vector3      vector3_;
+        orxonox::ColourValue  colourvalue_;
+        orxonox::Quaternion   quaternion_;
+        orxonox::Radian       radian_;
+        orxonox::Degree       degree_;
+};
+
+std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm);
+
+#endif /* _MultiTypeMath_H__ */
Index: /code/trunk/src/util/MultiTypePrimitive.cc
===================================================================
--- /code/trunk/src/util/MultiTypePrimitive.cc	(revision 871)
+++ /code/trunk/src/util/MultiTypePrimitive.cc	(revision 871)
@@ -0,0 +1,227 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#include "MultiTypePrimitive.h"
+#include "Convert.h"
+
+MultiTypePrimitive::MultiTypePrimitive(MultiType type)
+{
+    this->type_ = type;
+
+    if (type == MT_int)
+        this->value_.int_ = 0;
+    else if (type == MT_uint)
+        this->value_.uint_ = 0;
+    else if (type == MT_char)
+        this->value_.char_ = 0;
+    else if (type == MT_uchar)
+        this->value_.uchar_ = 0;
+    else if (type == MT_short)
+        this->value_.short_ = 0;
+    else if (type == MT_ushort)
+        this->value_.ushort_ = 0;
+    else if (type == MT_long)
+        this->value_.long_ = 0;
+    else if (type == MT_ulong)
+        this->value_.ulong_ = 0;
+    else if (type == MT_float)
+        this->value_.float_ = 0.0;
+    else if (type == MT_double)
+        this->value_.double_ = 0.0;
+    else if (type == MT_longdouble)
+        this->value_.longdouble_ = 0.0;
+    else if (type == MT_bool)
+        this->value_.bool_ = false;
+    else
+        this->value_.int_ = 0;
+}
+
+bool MultiTypePrimitive::operator==(const MultiTypePrimitive& mtp) const
+{
+    if (this->type_ == mtp.type_)
+    {
+        if (this->type_ == MT_int)
+            return (this->value_.int_ == mtp.value_.int_);
+        else if (this->type_ == MT_uint)
+            return (this->value_.uint_ == mtp.value_.uint_);
+        else if (this->type_ == MT_char)
+            return (this->value_.char_ == mtp.value_.char_);
+        else if (this->type_ == MT_uchar)
+            return (this->value_.uchar_ == mtp.value_.uchar_);
+        else if (this->type_ == MT_short)
+            return (this->value_.short_ == mtp.value_.short_);
+        else if (this->type_ == MT_ushort)
+            return (this->value_.ushort_ == mtp.value_.ushort_);
+        else if (this->type_ == MT_long)
+            return (this->value_.long_ == mtp.value_.long_);
+        else if (this->type_ == MT_ulong)
+            return (this->value_.ulong_ == mtp.value_.ulong_);
+        else if (this->type_ == MT_float)
+            return (this->value_.float_ == mtp.value_.float_);
+        else if (this->type_ == MT_double)
+            return (this->value_.double_ == mtp.value_.double_);
+        else if (this->type_ == MT_longdouble)
+            return (this->value_.longdouble_ == mtp.value_.longdouble_);
+        else if (this->type_ == MT_bool)
+            return (this->value_.bool_ == mtp.value_.bool_);
+    }
+
+    return false;
+}
+
+bool MultiTypePrimitive::operator!=(const MultiTypePrimitive& mtp) const
+{
+    if (this->type_ == mtp.type_)
+    {
+        if (this->type_ == MT_int)
+            return (this->value_.int_ != mtp.value_.int_);
+        else if (this->type_ == MT_uint)
+            return (this->value_.uint_ != mtp.value_.uint_);
+        else if (this->type_ == MT_char)
+            return (this->value_.char_ != mtp.value_.char_);
+        else if (this->type_ == MT_uchar)
+            return (this->value_.uchar_ != mtp.value_.uchar_);
+        else if (this->type_ == MT_short)
+            return (this->value_.short_ != mtp.value_.short_);
+        else if (this->type_ == MT_ushort)
+            return (this->value_.ushort_ != mtp.value_.ushort_);
+        else if (this->type_ == MT_long)
+            return (this->value_.long_ != mtp.value_.long_);
+        else if (this->type_ == MT_ulong)
+            return (this->value_.ulong_ != mtp.value_.ulong_);
+        else if (this->type_ == MT_float)
+            return (this->value_.float_ != mtp.value_.float_);
+        else if (this->type_ == MT_double)
+            return (this->value_.double_ != mtp.value_.double_);
+        else if (this->type_ == MT_longdouble)
+            return (this->value_.longdouble_ != mtp.value_.longdouble_);
+        else if (this->type_ == MT_bool)
+            return (this->value_.bool_ != mtp.value_.bool_);
+    }
+
+    return true;
+}
+
+MultiTypePrimitive::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypePrimitive, int>(*this); }
+MultiTypePrimitive::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned int>(*this); }
+MultiTypePrimitive::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypePrimitive, char>(*this); }
+MultiTypePrimitive::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned char>(*this); }
+MultiTypePrimitive::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypePrimitive, short>(*this); }
+MultiTypePrimitive::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned short>(*this); }
+MultiTypePrimitive::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypePrimitive, long>(*this); }
+MultiTypePrimitive::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned long>(*this); }
+MultiTypePrimitive::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypePrimitive, float>(*this); }
+MultiTypePrimitive::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypePrimitive, double>(*this); }
+MultiTypePrimitive::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypePrimitive, long double>(*this); }
+MultiTypePrimitive::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypePrimitive, bool>(*this); }
+
+void MultiTypePrimitive::setValue(const MultiTypePrimitive& mtp)
+{
+    this->type_ = mtp.type_;
+    this->value_ = mtp.value_;
+}
+
+std::string MultiTypePrimitive::toString() const
+{
+    std::string output;
+
+    if (this->type_ == MT_int)
+        ConvertValue(&output, this->value_.int_);
+    else if (this->type_ == MT_uint)
+        ConvertValue(&output, this->value_.uint_);
+    else if (this->type_ == MT_char)
+        ConvertValue(&output, this->value_.char_);
+    else if (this->type_ == MT_uchar)
+        ConvertValue(&output, this->value_.uchar_);
+    else if (this->type_ == MT_short)
+        ConvertValue(&output, this->value_.short_);
+    else if (this->type_ == MT_ushort)
+        ConvertValue(&output, this->value_.ushort_);
+    else if (this->type_ == MT_long)
+        ConvertValue(&output, this->value_.long_);
+    else if (this->type_ == MT_ulong)
+        ConvertValue(&output, this->value_.ulong_);
+    else if (this->type_ == MT_float)
+        ConvertValue(&output, this->value_.float_);
+    else if (this->type_ == MT_double)
+        ConvertValue(&output, this->value_.double_);
+    else if (this->type_ == MT_longdouble)
+        ConvertValue(&output, this->value_.longdouble_);
+    else if (this->type_ == MT_bool)
+        ConvertValue(&output, this->value_.bool_);
+
+    return output;
+}
+
+bool MultiTypePrimitive::fromString(const std::string value)
+{
+    if (this->type_ == MT_int)
+        return ConvertValue(&this->value_.int_, value, (int)0);
+    else if (this->type_ == MT_uint)
+        return ConvertValue(&this->value_.uint_, value, (unsigned int)0);
+    else if (this->type_ == MT_char)
+        return ConvertValue(&this->value_.char_, value, (char)0);
+    else if (this->type_ == MT_uchar)
+        return ConvertValue(&this->value_.uchar_, value, (unsigned char)0);
+    else if (this->type_ == MT_short)
+        return ConvertValue(&this->value_.short_, value, (short)0);
+    else if (this->type_ == MT_ushort)
+        return ConvertValue(&this->value_.ushort_, value, (unsigned short)0);
+    else if (this->type_ == MT_long)
+        return ConvertValue(&this->value_.long_, value, (long)0);
+    else if (this->type_ == MT_ulong)
+        return ConvertValue(&this->value_.ulong_, value, (unsigned long)0);
+    else if (this->type_ == MT_float)
+        return ConvertValue(&this->value_.float_, value, (float)0.0);
+    else if (this->type_ == MT_double)
+        return ConvertValue(&this->value_.double_, value, (double)0.0);
+    else if (this->type_ == MT_longdouble)
+        return ConvertValue(&this->value_.longdouble_, value, (long double)0.0);
+    else if (this->type_ == MT_bool)
+        return ConvertValue(&this->value_.bool_, value, false);
+    else
+        return false;
+}
+
+std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp)
+{
+    out << mtp.toString();
+    return out;
+}
Index: /code/trunk/src/util/MultiTypePrimitive.h
===================================================================
--- /code/trunk/src/util/MultiTypePrimitive.h	(revision 871)
+++ /code/trunk/src/util/MultiTypePrimitive.h	(revision 871)
@@ -0,0 +1,179 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiTypePrimitive_H__
+#define _MultiTypePrimitive_H__
+
+#include <ostream>
+
+#include "UtilPrereqs.h"
+
+#include "MultiType.h"
+
+class _UtilExport MultiTypePrimitive
+{
+    public:
+        MultiTypePrimitive(MultiType      type = MT_null);
+        inline MultiTypePrimitive(int            value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned int   value) { this->setValue(value); }
+        inline MultiTypePrimitive(char           value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned char  value) { this->setValue(value); }
+        inline MultiTypePrimitive(short          value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned short value) { this->setValue(value); }
+        inline MultiTypePrimitive(long           value) { this->setValue(value); }
+        inline MultiTypePrimitive(unsigned long  value) { this->setValue(value); }
+        inline MultiTypePrimitive(float          value) { this->setValue(value); }
+        inline MultiTypePrimitive(double         value) { this->setValue(value); }
+        inline MultiTypePrimitive(long double    value) { this->setValue(value); }
+        inline MultiTypePrimitive(bool           value) { this->setValue(value); }
+        inline MultiTypePrimitive(const MultiTypePrimitive& mtp) { this->setValue(mtp); }
+        virtual inline ~MultiTypePrimitive() {}
+
+        inline MultiTypePrimitive& operator=(MultiType      value) { this->type_ = MT_null; return *this; }
+        inline MultiTypePrimitive& operator=(int            value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned int   value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(char           value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned char  value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(short          value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned short value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(long           value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(unsigned long  value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(float          value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(double         value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(long double    value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(bool           value) { this->setValue(value); return *this; }
+        inline MultiTypePrimitive& operator=(const MultiTypePrimitive& mtp) { this->setValue(mtp); return *this; }
+
+        inline bool operator==(int            value) const { return (this->value_.int_        == value); }
+        inline bool operator==(unsigned int   value) const { return (this->value_.uint_       == value); }
+        inline bool operator==(char           value) const { return (this->value_.char_       == value); }
+        inline bool operator==(unsigned char  value) const { return (this->value_.uchar_      == value); }
+        inline bool operator==(short          value) const { return (this->value_.short_      == value); }
+        inline bool operator==(unsigned short value) const { return (this->value_.ushort_     == value); }
+        inline bool operator==(long           value) const { return (this->value_.long_       == value); }
+        inline bool operator==(unsigned long  value) const { return (this->value_.ulong_      == value); }
+        inline bool operator==(float          value) const { return (this->value_.float_      == value); }
+        inline bool operator==(double         value) const { return (this->value_.double_     == value); }
+        inline bool operator==(long double    value) const { return (this->value_.longdouble_ == value); }
+        inline bool operator==(bool           value) const { return (this->value_.bool_       == value); }
+        bool operator==(const MultiTypePrimitive& mtp) const;
+
+        inline bool operator!=(int            value) const { return (this->value_.int_        != value); }
+        inline bool operator!=(unsigned int   value) const { return (this->value_.uint_       != value); }
+        inline bool operator!=(char           value) const { return (this->value_.char_       != value); }
+        inline bool operator!=(unsigned char  value) const { return (this->value_.uchar_      != value); }
+        inline bool operator!=(short          value) const { return (this->value_.short_      != value); }
+        inline bool operator!=(unsigned short value) const { return (this->value_.ushort_     != value); }
+        inline bool operator!=(long           value) const { return (this->value_.long_       != value); }
+        inline bool operator!=(unsigned long  value) const { return (this->value_.ulong_      != value); }
+        inline bool operator!=(float          value) const { return (this->value_.float_      != value); }
+        inline bool operator!=(double         value) const { return (this->value_.double_     != value); }
+        inline bool operator!=(long double    value) const { return (this->value_.longdouble_ != value); }
+        inline bool operator!=(bool           value) const { return (this->value_.bool_       != value); }
+        bool operator!=(const MultiTypePrimitive& mtp) const;
+
+        virtual operator int()            const;
+        virtual operator unsigned int()   const;
+        virtual operator char()           const;
+        virtual operator unsigned char()  const;
+        virtual operator short()          const;
+        virtual operator unsigned short() const;
+        virtual operator long()           const;
+        virtual operator unsigned long()  const;
+        virtual operator float ()         const;
+        virtual operator double ()        const;
+        virtual operator long double()    const;
+        virtual operator bool()           const;
+
+        inline void setValue(int            value) { this->type_ = MT_int;        this->value_.int_        = value; }
+        inline void setValue(unsigned int   value) { this->type_ = MT_uint;       this->value_.uint_       = value; }
+        inline void setValue(char           value) { this->type_ = MT_char;       this->value_.char_       = value; }
+        inline void setValue(unsigned char  value) { this->type_ = MT_uchar;      this->value_.uchar_      = value; }
+        inline void setValue(short          value) { this->type_ = MT_short;      this->value_.short_      = value; }
+        inline void setValue(unsigned short value) { this->type_ = MT_ushort;     this->value_.ushort_     = value; }
+        inline void setValue(long           value) { this->type_ = MT_long;       this->value_.long_       = value; }
+        inline void setValue(unsigned long  value) { this->type_ = MT_ulong;      this->value_.ulong_      = value; }
+        inline void setValue(float          value) { this->type_ = MT_float;      this->value_.float_      = value; }
+        inline void setValue(double         value) { this->type_ = MT_double;     this->value_.double_     = value; }
+        inline void setValue(long double    value) { this->type_ = MT_longdouble; this->value_.longdouble_ = value; }
+        inline void setValue(bool           value) { this->type_ = MT_bool;       this->value_.bool_       = value; }
+        void setValue(const MultiTypePrimitive& mtp);
+
+        inline int            getInt()           const { return this->value_.int_;        }
+        inline unsigned int   getUnsignedInt()   const { return this->value_.uint_;       }
+        inline char           getChar()          const { return this->value_.char_;       }
+        inline unsigned char  getUnsignedChar()  const { return this->value_.uchar_;      }
+        inline short          getShort()         const { return this->value_.short_;      }
+        inline unsigned short getUnsignedShort() const { return this->value_.ushort_;     }
+        inline long           getLong()          const { return this->value_.long_;       }
+        inline unsigned long  getUnsignedLong()  const { return this->value_.ulong_;      }
+        inline float          getFloat()         const { return this->value_.float_;      }
+        inline double         getDouble()        const { return this->value_.double_;     }
+        inline long double    getLongDouble()    const { return this->value_.longdouble_; }
+        inline bool           getBool()          const { return this->value_.bool_;       }
+
+        inline int&            getInt()           { return this->value_.int_;        }
+        inline unsigned int&   getUnsignedInt()   { return this->value_.uint_;       }
+        inline char&           getChar()          { return this->value_.char_;       }
+        inline unsigned char&  getUnsignedChar()  { return this->value_.uchar_;      }
+        inline short&          getShort()         { return this->value_.short_;      }
+        inline unsigned short& getUnsignedShort() { return this->value_.ushort_;     }
+        inline long&           getLong()          { return this->value_.long_;       }
+        inline unsigned long&  getUnsignedLong()  { return this->value_.ulong_;      }
+        inline float&          getFloat()         { return this->value_.float_;      }
+        inline double&         getDouble()        { return this->value_.double_;     }
+        inline long double&    getLongDouble()    { return this->value_.longdouble_; }
+        inline bool&           getBool()          { return this->value_.bool_;       }
+
+        inline void getValue(int*            variable) const { (*variable) = this->value_.int_;        }
+        inline void getValue(unsigned int*   variable) const { (*variable) = this->value_.uint_;       }
+        inline void getValue(char*           variable) const { (*variable) = this->value_.char_;       }
+        inline void getValue(unsigned char*  variable) const { (*variable) = this->value_.uchar_;      }
+        inline void getValue(short*          variable) const { (*variable) = this->value_.short_;      }
+        inline void getValue(unsigned short* variable) const { (*variable) = this->value_.ushort_;     }
+        inline void getValue(long*           variable) const { (*variable) = this->value_.long_;       }
+        inline void getValue(unsigned long*  variable) const { (*variable) = this->value_.ulong_;      }
+        inline void getValue(float*          variable) const { (*variable) = this->value_.float_;      }
+        inline void getValue(double*         variable) const { (*variable) = this->value_.double_;     }
+        inline void getValue(long double*    variable) const { (*variable) = this->value_.longdouble_; }
+        inline void getValue(bool*           variable) const { (*variable) = this->value_.bool_;       }
+
+        inline MultiType getType()           const { return this->type_; }
+        inline bool      isA(MultiType type) const { return (this->type_ == type); }
+
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
+
+    protected:
+        MultiTypeValue  value_;
+        MultiType       type_;
+};
+
+std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp);
+
+#endif /* _MultiTypePrimitive_H__ */
Index: /code/trunk/src/util/MultiTypeString.cc
===================================================================
--- /code/trunk/src/util/MultiTypeString.cc	(revision 871)
+++ /code/trunk/src/util/MultiTypeString.cc	(revision 871)
@@ -0,0 +1,127 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#include "MultiTypeString.h"
+#include "Convert.h"
+
+MultiTypeString::MultiTypeString(MultiType type) : MultiTypePrimitive(type)
+{
+    if (type == MT_constchar)
+        this->string_ = std::string("");
+    else if (type == MT_string)
+        this->string_ = std::string("");
+}
+
+bool MultiTypeString::operator==(const MultiTypeString& mts) const
+{
+    if (!MultiTypePrimitive::operator==(mts) && this->type_ == mts.type_)
+    {
+        if (this->type_ == MT_constchar)
+            return (this->string_ == mts.string_);
+        else if (this->type_ == MT_string)
+            return (this->string_ == mts.string_);
+    }
+
+    return false;
+}
+
+bool MultiTypeString::operator!=(const MultiTypeString& mts) const
+{
+    if (MultiTypePrimitive::operator==(mts) && this->type_ == mts.type_)
+    {
+        if (this->type_ == MT_constchar)
+            return (this->string_ != mts.string_);
+        else if (this->type_ == MT_string)
+            return (this->string_ != mts.string_);
+    }
+
+    return true;
+}
+
+MultiTypeString::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeString, int>(*this); }
+MultiTypeString::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeString, unsigned int>(*this); }
+MultiTypeString::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeString, char>(*this); }
+MultiTypeString::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeString, unsigned char>(*this); }
+MultiTypeString::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeString, short>(*this); }
+MultiTypeString::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeString, unsigned short>(*this); }
+MultiTypeString::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeString, long>(*this); }
+MultiTypeString::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeString, unsigned long>(*this); }
+MultiTypeString::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeString, float>(*this); }
+MultiTypeString::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeString, double>(*this); }
+MultiTypeString::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeString, long double>(*this); }
+MultiTypeString::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeString, bool>(*this); }
+MultiTypeString::operator std::string() const
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this); }
+MultiTypeString::operator const char*() const
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this)).c_str(); }
+
+void MultiTypeString::setValue(const MultiTypeString& mts)
+{
+    MultiTypePrimitive::setValue(mts);
+    this->string_ = mts.string_;
+}
+
+std::string MultiTypeString::toString() const
+{
+    if (this->type_ == MT_constchar)
+        return this->string_;
+    else if (this->type_ == MT_string)
+        return this->string_;
+    else
+        return MultiTypePrimitive::toString();
+}
+
+bool MultiTypeString::fromString(const std::string value)
+{
+    if (this->type_ == MT_constchar)
+        this->string_ = value;
+    else if (this->type_ == MT_string)
+        this->string_ = value;
+    else
+        return MultiTypePrimitive::fromString(value);
+
+    return true;
+}
+
+std::ostream& operator<<(std::ostream& out, MultiTypeString& mts)
+{
+    out << mts.toString();
+    return out;
+}
Index: /code/trunk/src/util/MultiTypeString.h
===================================================================
--- /code/trunk/src/util/MultiTypeString.h	(revision 871)
+++ /code/trunk/src/util/MultiTypeString.h	(revision 871)
@@ -0,0 +1,113 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ *   Inspiration: MultiType by Benjamin Grauer
+ */
+
+#ifndef _MultiTypeString_H__
+#define _MultiTypeString_H__
+
+#include <string>
+#include <iostream>
+#include "UtilPrereqs.h"
+
+#include "MultiTypePrimitive.h"
+
+class _UtilExport MultiTypeString : public MultiTypePrimitive
+{
+    public:
+        MultiTypeString(MultiType      type = MT_null);
+        inline MultiTypeString(int            value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned int   value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(char           value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned char  value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(short          value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned short value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(long           value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(unsigned long  value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(float          value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(double         value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(long double    value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(bool           value) : MultiTypePrimitive(value) {}
+        inline MultiTypeString(const char*        value)   { this->setValue(value); }
+        inline MultiTypeString(const std::string& value)   { this->setValue(value); }
+        inline MultiTypeString(const MultiTypeString& mts) { this->setValue(mts);   }
+        virtual inline ~MultiTypeString() {}
+
+        using MultiTypePrimitive::operator=;
+        inline MultiTypeString& operator=(const char*        value)   { this->setValue(value); return *this; }
+        inline MultiTypeString& operator=(const std::string& value)   { this->setValue(value); return *this; }
+        inline MultiTypeString& operator=(const MultiTypeString& mts) { this->setValue(mts);   return *this; }
+
+        using MultiTypePrimitive::operator==;
+        inline bool operator==(const char*        value) const { return (this->string_ == std::string(value)); }
+        inline bool operator==(const std::string& value) const { return (this->string_ == value);              }
+        bool operator==(const MultiTypeString& mts) const;
+
+        using MultiTypePrimitive::operator!=;
+        inline bool operator!=(const char*        value) const { return (this->string_ != std::string(value)); }
+        inline bool operator!=(const std::string& value) const { return (this->string_ != value);              }
+        bool operator!=(const MultiTypeString& mts) const;
+
+        virtual operator int()            const;
+        virtual operator unsigned int()   const;
+        virtual operator char()           const;
+        virtual operator unsigned char()  const;
+        virtual operator short()          const;
+        virtual operator unsigned short() const;
+        virtual operator long()           const;
+        virtual operator unsigned long()  const;
+        virtual operator float ()         const;
+        virtual operator double ()        const;
+        virtual operator long double()    const;
+        virtual operator bool()           const;
+        virtual operator std::string()    const;
+        virtual operator const char*()    const;
+
+        using MultiTypePrimitive::setValue;
+        inline void setValue(const char*        value) { this->type_ = MT_string; this->string_ = std::string(value); }
+        inline void setValue(const std::string& value) { this->type_ = MT_string; this->string_ = value;              }
+        void setValue(const MultiTypeString& mts);
+
+        inline const std::string getString() const { return this->string_;         }
+        inline const char*  getConstChar()   const { return this->string_.c_str(); }
+
+        inline const std::string& getString() { return this->string_;         }
+        inline const char*  getConstChar()    { return this->string_.c_str(); }
+
+        using MultiTypePrimitive::getValue;
+        inline void getValue(std::string* variable) const { (*variable) = this->string_;         }
+        inline void getValue(const char** variable) const { (*variable) = this->string_.c_str(); }
+
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
+
+    protected:
+        std::string string_;
+};
+
+std::ostream& operator<<(std::ostream& out, MultiTypeString& mts);
+
+#endif /* _MultiTypeString_H__ */
Index: /code/trunk/src/util/String.cc
===================================================================
--- /code/trunk/src/util/String.cc	(revision 871)
+++ /code/trunk/src/util/String.cc	(revision 871)
@@ -0,0 +1,213 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+ */
+
+#include "String.h"
+
+/**
+    @brief Removes all whitespaces from a string.
+    @param str The string to strip
+*/
+void strip(std::string* str)
+{
+    unsigned int pos;
+    while ((pos = (*str).find(" ")) < (*str).length())
+        (*str).erase(pos, 1);
+    while ((pos = (*str).find("\t")) < (*str).length())
+        (*str).erase(pos, 1);
+}
+
+/**
+    @brief Returns a copy of a string without whitespaces.
+    @param str The string to strip
+    @return The stripped line
+*/
+std::string getStripped(const std::string& str)
+{
+    std::string output = std::string(str);
+    strip(&output);
+    return output;
+}
+
+/**
+    @brief Determines if a string in is a comment.
+    @param str The string to check
+    @return True = it's a comment
+
+    A comment is defined by a leading '#', '%', ';' or '//'.
+*/
+bool isComment(const std::string& str)
+{
+    // Strip the line, whitespaces are disturbing
+    std::string teststring = getStripped(str);
+
+    // There are four possible comment-symbols:
+    //  1) #comment in script-language style
+    //  2) %comment in matlab style
+    //  3) ;comment in unreal tournament config-file style
+    //  4) //comment in code style
+    if (teststring[0] == '#' || teststring[0] == '%' || teststring[0] == ';' || (teststring[0] == '/' && teststring[0] == '/'))
+        return true;
+
+    return false;
+}
+
+/**
+    @brief Determines if a string is empty (contains only whitespaces).
+    @param str The string to check
+    @return True = it's empty
+*/
+bool isEmpty(const std::string& str)
+{
+    return getStripped(str) == "";
+}
+
+/**
+    @brief Determines if a string contains only numbers and maximal one '.'.
+    @param str The string to check
+    @return True = it's a number
+*/
+bool isNumeric(const std::string& str)
+{
+    bool foundPoint = false;
+
+    for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
+    {
+        if (((*it) < '0' || (*it) > '9'))
+        {
+            if ((*it) != '.' && !foundPoint)
+                foundPoint = true;
+            else
+                return false;
+        }
+    }
+
+    return true;
+}
+
+/**
+    @brief Replaces each char between A and Z with its lowercase equivalent.
+    @param str The string to convert
+*/
+void lowercase(std::string* str)
+{
+    static unsigned const char difference_between_A_and_a = 'A' - 'a';
+
+    for (std::string::iterator it = (*str).begin(); it != (*str).end(); ++it)
+        if ((*it) >= 'A' && (*it) <= 'Z')
+            (*it) -= difference_between_A_and_a;
+}
+
+/**
+    @brief Returns a copy of the given string without uppercase chars.
+    @param str The string
+    @return The copy
+*/
+std::string getLowercase(const std::string& str)
+{
+    std::string output = std::string(str);
+    lowercase(&output);
+    return output;
+}
+
+/**
+    @brief Replaces each char between a and z with its uppercase equivalent.
+    @param str The string to convert
+*/
+void uppercase(std::string* str)
+{
+    static unsigned const char difference_between_A_and_a = 'A' - 'a';
+
+    for (std::string::iterator it = (*str).begin(); it != (*str).end(); ++it)
+        if ((*it) >= 'a' && (*it) <= 'z')
+            (*it) += difference_between_A_and_a;
+}
+
+/**
+    @brief Returns a copy of the given string without lowercase chars.
+    @param str The string
+    @return The copy
+*/
+std::string getUppercase(const std::string& str)
+{
+    std::string output = std::string(str);
+    uppercase(&output);
+    return output;
+}
+
+/**
+ * @brief compares two strings without ignoring the case
+ * @param s1 first string
+ * @param s2 second string
+ */
+int nocaseCmp(const std::string& s1, const std::string& s2)
+{
+    std::string::const_iterator it1=s1.begin();
+    std::string::const_iterator it2=s2.begin();
+
+    //stop when either string's end has been reached
+    while ( (it1!=s1.end()) && (it2!=s2.end()) )
+    {
+        if(::toupper(*it1) != ::toupper(*it2)) //letters differ?
+            // return -1 to indicate smaller than, 1 otherwise
+            return (::toupper(*it1)  < ::toupper(*it2)) ? -1 : 1;
+        //proceed to the next character in each string
+        ++it1;
+        ++it2;
+    }
+    size_t size1=s1.size(), size2=s2.size();// cache lengths
+    //return -1,0 or 1 according to strings' lengths
+    if (size1==size2)
+        return 0;
+    return (size1<size2) ? -1 : 1;
+}
+
+
+/**
+ * @brief compares two strings without ignoring the case
+ * @param s1 first string
+ * @param s2 second string
+ * @param len how far from the beginning to start.
+ */
+int nocaseCmp(const std::string& s1, const std::string& s2, unsigned int len)
+{
+    if (len == 0)
+        return 0;
+    std::string::const_iterator it1=s1.begin();
+    std::string::const_iterator it2=s2.begin();
+
+    //stop when either string's end has been reached
+    while ( (it1!=s1.end()) && (it2!=s2.end()) && len-- > 0)
+    {
+        if(::toupper(*it1) != ::toupper(*it2)) //letters differ?
+            // return -1 to indicate smaller than, 1 otherwise
+            return (::toupper(*it1)  < ::toupper(*it2)) ? -1 : 1;
+        //proceed to the next character in each string
+        ++it1;
+        ++it2;
+    }
+    return 0;
+}
Index: /code/trunk/src/util/String.h
===================================================================
--- /code/trunk/src/util/String.h	(revision 871)
+++ /code/trunk/src/util/String.h	(revision 871)
@@ -0,0 +1,146 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+ */
+
+#ifndef _String_H__
+#define _String_H__
+
+#include <string>
+#include <sstream>
+
+#include "UtilPrereqs.h"
+
+_UtilExport void        strip(std::string* str);
+_UtilExport std::string getStripped(const std::string& str);
+
+_UtilExport bool        isEmpty(const std::string& str);
+_UtilExport bool        isComment(const std::string& str);
+_UtilExport bool        isNumeric(const std::string& str);
+
+_UtilExport void        lowercase(std::string* str);
+_UtilExport std::string getLowercase(const std::string& str);
+
+_UtilExport void        uppercase(std::string* str);
+_UtilExport std::string getUppercase(const std::string& str);
+
+_UtilExport int         nocaseCmp(const std::string& s1, const std::string& s2);
+_UtilExport int         nocaseCmp(const std::string& s1, const std::string& s2, unsigned int len);
+
+//! The Convert class has some static member functions to convert strings to values and values to strings.
+class _UtilExport Convert
+{
+    public:
+        /**
+            @brief Converts a value of any type to a string.
+            @param output The string to write the result in
+            @param input The variable to convert
+            @return True if the conversion succeded
+
+            @example
+            float f = 3.14;
+            std::string output;
+            bool success = Convert::ToString(&output, f);
+        */
+        template <typename T>
+        static bool ToString(std::string* output, T input)
+        {
+            std::ostringstream oss;
+            if (oss << input)
+            {
+                (*output) = oss.str();
+                return true;
+            }
+
+            return false;
+        }
+
+        /**
+            @brief Converts a value of any type to a string and assigns a defaultvalue if the conversion fails.
+            @param output The string to write the result in
+            @param input The variable to convert
+            @param fallbackString The assigned string if the conversion fails.
+            @return True if the conversion succeeded
+
+            @example
+            float f = 3.14;
+            std::string output;
+            bool success = Convert::ToString(&output, f, "0.000000");
+        */
+        template <typename T>
+        static bool ToString(std::string* output, T input, const std::string& fallbackString)
+        {
+            if (Convert::ToString(output, input))
+                return true;
+
+            (*output) = fallbackString;
+            return false;
+        }
+
+        /**
+            @brief Converts a string to a value of any type.
+            @param output The variable to assign the result to
+            @param input The string to convert
+            @return True if the conversion succeeded
+
+            @example
+            std::string input = "3.14";
+            float f;
+            bool success = string2Number(&f, input);
+        */
+        template <typename T>
+        static bool FromString(T* output, const std::string& input)
+        {
+            std::istringstream iss(input);
+            if (iss >> (*output))
+                return true;
+
+            return false;
+        }
+
+        /**
+            @brief Converts a string to a value of any type.
+            @param output The variable to assign the result to
+            @param input The string to convert
+            @param fallbackValue The assigned value if the conversion fails
+            @return True if the conversion succeeded
+
+            @example
+            std::string input = "3.14";
+            float f;
+            bool success = string2Number(&f, input, 0.000000);
+        */
+        template <typename T>
+        static bool FromString(T* output, const std::string& input, T fallbackValue)
+        {
+            if (Convert::FromString(output, input))
+                return true;
+
+            (*output) = fallbackValue;
+            return false;
+        }
+};
+
+#endif /* _String_H__ */
Index: /code/trunk/src/util/String2Number.h
===================================================================
--- /code/trunk/src/util/String2Number.h	(revision 870)
+++ /code/trunk/src/util/String2Number.h	(revision 871)
@@ -7,4 +7,5 @@
 
 #include "core/Debug.h"
+#include "UtilPrereqs.h"
 
 /**
Index: /code/trunk/src/util/SubString.cc
===================================================================
--- /code/trunk/src/util/SubString.cc	(revision 871)
+++ /code/trunk/src/util/SubString.cc	(revision 871)
@@ -0,0 +1,500 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christian Meyer
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+//
+//  splitLine
+//  STL string tokenizer
+//
+//  Created by Clemens Wacha.
+//  Version 1.0
+//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
+//
+ */
+
+#include "SubString.h"
+
+/**
+ * @brief default constructor
+ */
+SubString::SubString()
+{}
+
+
+/**
+ * @brief create a SubString from
+ * @param string the String to Split
+ * @param delimiter the Character at which to split string (delimiter)
+ */
+SubString::SubString(const std::string& string, char delimiter)
+{
+  this->split(string, delimiter);
+}
+
+
+/**
+ * @brief Splits a String into multiple splitters.
+ * @param string the String to split
+ * @param delimiters multiple set of characters at what to split. (delimiters)
+ * @param delimiterNeighbours neighbours of the delimiters, that will be erased only when near a delimiter.
+ * @param emptyEntries If empty entries should be allewed or removed.
+ * @param escapeChar The Escape Character that overrides splitters commends and so on...
+ * @param safemode_char within these characters splitting won't happen
+ * @param comment_char the Comment character.
+ */
+SubString::SubString(const std::string& string,
+                     const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
+                     char escapeChar, char safemode_char, char openparenthesis_char, char closeparenthesis_char, char comment_char)
+{
+  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, openparenthesis_char, closeparenthesis_char, comment_char);
+}
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subString the SubString to take a set from.
+ * @param subSetBegin the beginning to the end
+ */
+SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+{
+  for (unsigned int i = subSetBegin; i < subString.size(); i++)
+    this->strings.push_back(subString[i]);
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subString the SubString to take a Set from
+ * @param subSetBegin the beginning to the end
+ * @param subSetEnd the end of the SubSet (max subString.size() will be checked internaly)
+ */
+SubString::SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd)
+{
+  for (unsigned int i = subSetBegin; i < subString.size() || i < subSetEnd; i++)
+    this->strings.push_back(subString[i]);
+}
+
+/**
+ * @brief creates a Substring from a count and values set.
+ * @param argc: the Arguments Count.
+ * @param argv: Argument Values.
+ */
+SubString::SubString(unsigned int argc, const char** argv)
+{
+  for(unsigned int i = 0; i < argc; ++i)
+    this->strings.push_back(std::string(argv[i]));
+}
+
+/**
+ * @brief removes the object from memory
+ */
+SubString::~SubString()
+{ }
+
+/** @brief An empty String */
+// const std::string SubString::emptyString = "";
+/** @brief Helper that gets you a String consisting of all White Spaces */
+const std::string SubString::WhiteSpaces = " \n\t";
+/** @brief Helper that gets you a String consisting of all WhiteSpaces and the Comma */
+const std::string SubString::WhiteSpacesWithComma = " \n\t,";
+/** An Empty SubString */
+const SubString SubString::NullSubString = SubString();
+
+/**
+ * @brief stores the Value of subString in this SubString
+ * @param subString will be copied into this String.
+ * @returns this SubString.
+ */
+SubString& SubString::operator=(const SubString& subString)
+{
+  this->strings = subString.strings;
+  return *this;
+}
+
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::operator==(const SubString& subString) const
+{
+  return (this->strings == subString.strings);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString) const
+{
+  return (*this == subString);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @param length how many entries to compare. (from 0 to length)
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString, unsigned int length) const
+{
+  if (length > this->size() || length > subString.size())
+    return false;
+
+  for (unsigned int i = 0; i < length; i++)
+    if (this->strings[i] != subString.strings[i])
+      return false;
+  return true;
+}
+
+
+/**
+ * @brief append operator
+ * @param subString the String to append.
+ * @returns a SubString where this and subString are appended.
+ */
+SubString SubString::operator+(const SubString& subString) const
+{
+  return SubString(*this) += subString;
+}
+
+
+/**
+ * @brief append operator.
+ * @param subString append subString to this SubString.
+ * @returns this substring appended with subString
+ */
+SubString& SubString::operator+=(const SubString& subString)
+{
+  for (unsigned int i = 0; i < subString.size(); i++)
+    this->strings.push_back(subString[i]);
+  return *this;
+}
+
+
+/**
+ * @brief Split the String at
+ * @param string where to split
+ * @param splitter delimiter.
+ */
+unsigned int SubString::split(const std::string& string, char splitter)
+{
+  this->strings.clear();
+  char split[2];
+  split[0] = splitter;
+  split[1] = '\0';
+  SubString::splitLine(this->strings, string, split);
+  return strings.size();
+}
+
+
+/**
+ * @brief Splits a String into multiple splitters.
+ * @param string the String to split
+ * @param delimiters multiple set of characters at what to split. (delimiters)
+ * @param delimiterNeighbours: Neighbours to the Delimiters that will be erased too.
+ * @param emptyEntries: If empty entries are added to the List of SubStrings
+ * @param escapeChar The Escape Character that overrides splitters commends and so on...
+ * @param safemode_char within these characters splitting won't happen
+ * @param comment_char the Comment character.
+ */
+unsigned int SubString::split(const std::string& string,
+                              const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
+                              char escapeChar, char safemode_char, char openparenthesis_char, char closeparenthesis_char, char comment_char)
+{
+  this->strings.clear();
+  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, openparenthesis_char, closeparenthesis_char, comment_char);
+  return this->strings.size();
+}
+
+
+/**
+ * @brief joins together all Strings of this Substring.
+ * @param delimiter the String between the subStrings.
+ * @returns the joined String.
+ */
+std::string SubString::join(const std::string& delimiter) const
+{
+  if (!this->strings.empty())
+  {
+    std::string retVal = this->strings[0];
+    for (unsigned int i = 1; i < this->strings.size(); i++)
+      retVal += delimiter + this->strings[i];
+    return retVal;
+  }
+  else
+  {
+    static std::string empty;
+    return empty;
+  }
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subSetBegin the beginning to the end
+ * @returns the SubSet
+ *
+ * This function is added for your convenience, and does the same as
+ * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+ */
+SubString SubString::subSet(unsigned int subSetBegin) const
+{
+  return SubString(*this, subSetBegin);
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subSetBegin the beginning to
+ * @param subSetEnd the end of the SubSet to select (if bigger than subString.size() it will be downset.)
+ * @returns the SubSet
+ *
+ * This function is added for your convenience, and does the same as
+ * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+ */
+SubString SubString::subSet(unsigned int subSetBegin, unsigned int subSetEnd) const
+{
+  return SubString(*this, subSetBegin, subSetEnd);
+}
+
+
+/**
+ * @brief splits line into tokens and stores them in ret.
+ * @param ret the Array, where the Splitted strings will be stored in
+ * to the beginning of the current token is stored
+ * @param line the inputLine to split
+ * @param delimiters a String of Delimiters (here the input will be splitted)
+ * @param delimiterNeighbours Naighbours to the Delimitter, that will be removed if they are to the left or the right of a Delimiter.
+ * @param emptyEntries: if empty Strings are added to the List of Strings.
+ * @param escape_char: Escape carater (escapes splitters)
+ * @param safemode_char: the beginning of the safemode is marked with this
+ * @param comment_char: the beginning of a comment is marked with this: (until the end of a Line)
+ * @param start_state: the Initial state on how to parse the String.
+ * @returns SPLIT_LINE_STATE the parser was in when returning
+ *
+ * This is the Actual Splitting Algorithm from Clemens Wacha
+ * Supports delimiters, escape characters,
+ * ignores special  characters between safemode_char and between comment_char and linend '\n'.
+ */
+SubString::SPLIT_LINE_STATE
+SubString::splitLine(std::vector<std::string>& ret,
+                     const std::string& line,
+                     const std::string& delimiters,
+                     const std::string& delimiterNeighbours,
+                     bool emptyEntries,
+                     char escape_char,
+                     char safemode_char,
+                     char openparenthesis_char,
+                     char closeparenthesis_char,
+                     char comment_char,
+                     SPLIT_LINE_STATE start_state)
+{
+  SPLIT_LINE_STATE state = start_state;
+  unsigned int i = 0;
+  unsigned int fallBackNeighbours = 0;
+
+  std::string token;
+
+  if(start_state != SL_NORMAL && ret.size() > 0)
+  {
+    token = ret[ret.size()-1];
+    ret.pop_back();
+  }
+
+  while(i < line.size())
+  {
+    switch(state)
+    {
+      case SL_NORMAL:
+        if(line[i] == escape_char)
+        {
+          state = SL_ESCAPE;
+        }
+        else if(line[i] == safemode_char)
+        {
+          state = SL_SAFEMODE;
+        }
+        else if(line[i] == openparenthesis_char)
+        {
+          state = SL_PARENTHESES;
+        }
+        else if(line[i] == comment_char)
+        {
+          if (fallBackNeighbours > 0)
+            token = token.substr(0, token.size() - fallBackNeighbours);
+          /// FINISH
+          if(emptyEntries || token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          token += line[i];       // EAT
+          state = SL_COMMENT;
+        }
+        else if(delimiters.find(line[i]) != std::string::npos)
+        {
+          // line[i] is a delimiter
+          if (fallBackNeighbours > 0)
+            token = token.substr(0, token.size() - fallBackNeighbours);
+          /// FINISH
+          if(emptyEntries || token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          state = SL_NORMAL;
+        }
+        else
+        {
+          if (delimiterNeighbours.find(line[i]) != std::string::npos)
+          {
+            if (token.size() > 0)
+              ++fallBackNeighbours;
+            else
+            {
+              i++;
+              continue;
+            }
+          }
+          else
+            fallBackNeighbours = 0;
+          token += line[i];       // EAT
+        }
+        break;
+      case SL_ESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_NORMAL;
+        break;
+      case SL_SAFEMODE:
+        if(line[i] == safemode_char)
+        {
+          state = SL_NORMAL;
+        }
+        else if(line[i] == escape_char)
+        {
+          state = SL_SAFEESCAPE;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      case SL_SAFEESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_SAFEMODE;
+        break;
+
+      case SL_PARENTHESES:
+        if(line[i] == closeparenthesis_char)
+        {
+          state = SL_NORMAL;
+        }
+        else if(line[i] == escape_char)
+        {
+          state = SL_PARENTHESESESCAPE;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      case SL_PARENTHESESESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_PARENTHESES;
+        break;
+
+      case SL_COMMENT:
+        if(line[i] == '\n')
+        {
+          /// FINISH
+          if(token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          state = SL_NORMAL;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      default:
+        // nothing
+        break;
+    }
+    i++;
+  }
+
+  /// FINISH
+  if (fallBackNeighbours > 0)
+    token = token.substr(0, token.size() - fallBackNeighbours);
+  if(emptyEntries || token.size() > 0)
+  {
+    ret.push_back(token);
+    token.clear();
+  }
+  return(state);
+}
+
+
+/**
+ * @brief Some nice debug information about this SubString
+ */
+void SubString::debug() const
+{
+  printf("Substring-information::count=%d ::", this->strings.size());
+  for (unsigned int i = 0; i < this->strings.size(); i++)
+    printf("s%d='%s'::", i, this->strings[i].c_str());
+  printf("\n");
+}
Index: /code/trunk/src/util/SubString.h
===================================================================
--- /code/trunk/src/util/SubString.h	(revision 871)
+++ /code/trunk/src/util/SubString.h	(revision 871)
@@ -0,0 +1,161 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christian Meyer
+ *   Co-authors:
+ *      Benjamin Grauer
+ *      Fabian 'x3n' Landau
+ *
+
+//  splitLine
+//  STL string tokenizer
+//
+//  Created by Clemens Wacha.
+//  Version 1.0
+//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
+
+ * Extended by Fabian 'x3n' Landau with the SL_PARENTHESES mode.
+ */
+
+ /*!
+ * @file substring.h
+ * @brief a small class to get the parts of a string separated by commas
+ *
+ * This class is also identified as a Tokenizer. It splits up one long
+ * String into multiple small ones by a designated Delimiter.
+ *
+ * Substring is Advanced, and it is possible, to split a string by ','
+ * but also removing leading and trailing spaces around the comma.
+ *
+ * @example
+ * Split the String std::string st = "1345, The new empire   , is , orxonox"
+ * is splitted with:
+ * SubString(st, ',', " \n\t")
+ * into
+ * "1345", "The new empire", "is", "orxonox"
+ * As you can see, the useless spaces around ',' were removed.
+ */
+
+#ifndef __SUBSTRING_H__
+#define __SUBSTRING_H__
+
+#include <vector>
+#include <string>
+
+#include "UtilPrereqs.h"
+
+//! A class that can load one string and split it in multipe ones
+/**
+ * SubString is a very Powerfull way to create a SubSet from a String
+ * It can be used, to Split strings append them and join them again.
+ */
+class _UtilExport SubString
+{
+public:
+  //! An enumerator for the State the Parser is in
+  typedef enum {
+    SL_NORMAL,            //!< Normal state
+    SL_ESCAPE,            //!< After an escape character
+    SL_SAFEMODE,          //!< In safe mode (between "" mostly).
+    SL_SAFEESCAPE,        //!< In safe mode with the internal escape character, that escapes even the savemode character.
+    SL_COMMENT,           //!< In Comment mode.
+    SL_PARENTHESES,       //!< Between parentheses (usually '(' and ')')
+    SL_PARENTHESESESCAPE, //!< Between parentheses with the internal escape character, that escapes even the closing paranthesis character.
+  } SPLIT_LINE_STATE;
+
+
+public:
+  SubString();
+  SubString(const std::string& string, char delimiter = ',');
+  SubString(const std::string& string,
+            const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries=false,
+            char escapeChar ='\\', char safemode_char = '"', char openparenthesis_char = '(', char closeparenthesis_char = ')', char comment_char = '\0');
+  SubString(unsigned int argc, const char** argv);
+  /** @brief create a Substring as a copy of another one. @param subString the SubString to copy. */
+  SubString(const SubString& subString) { *this = subString; };
+  SubString(const SubString& subString, unsigned int subSetBegin);
+  SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd);
+  ~SubString();
+
+  // operate on the SubString
+  SubString& operator=(const SubString& subString);
+  bool operator==(const SubString& subString) const;
+  bool compare(const SubString& subString) const;
+  bool compare(const SubString& subString, unsigned int length) const;
+  SubString operator+(const SubString& subString) const;
+  SubString& operator+=(const SubString& subString);
+  /** @param subString the String to append @returns appended String. @brief added for convenience */
+  SubString& append(const SubString subString) { return (*this += subString); };
+
+  /////////////////////////////////////////
+  // Split and Join the any String. ///////
+  unsigned int split(const std::string& string = "", char delimiter = ',');
+  unsigned int split(const std::string& string,
+                     const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries = false,
+                     char escapeChar ='\\', char safemode_char = '"', char openparenthesis_char = '(', char closeparenthesis_char = ')', char comment_char = '\0');
+  std::string join(const std::string& delimiter = " ") const;
+  ////////////////////////////////////////
+
+  // retrieve a SubSet from the String
+  SubString subSet(unsigned int subSetBegin) const;
+  SubString subSet(unsigned int subSetBegin, unsigned int subSetEnd) const;
+
+  // retrieve Information from within
+  /** @returns true if the SubString is empty */
+  inline bool empty() const { return this->strings.empty(); };
+  /** @returns the count of Strings stored in this substring */
+  inline unsigned int size() const { return this->strings.size(); };
+  /** @param i the i'th String @returns the i'th string from the subset of Strings */
+  inline const std::string& operator[](unsigned int i) const { return this->strings[i]; };
+  /** @param i the i'th String @returns the i'th string from the subset of Strings */
+  inline const std::string& getString(unsigned int i) const { return (*this)[i]; };
+  /** @returns the front of the StringList. */
+  inline const std::string& front() const { return this->strings.front(); };
+  /** @returns the back of the StringList. */
+  inline const std::string& back() const { return this->strings.back(); };
+  /** @brief removes the back of the strings list. */
+  inline void pop_back() { this->strings.pop_back(); };
+
+  // the almighty algorithm.
+  static SPLIT_LINE_STATE splitLine(std::vector<std::string>& ret,
+                                    const std::string& line,
+                                    const std::string& delimiters = SubString::WhiteSpaces,
+                                    const std::string& delimiterNeighbours = "",
+                                    bool emptyEntries = false,
+                                    char escape_char = '\\',
+                                    char safemode_char = '"',
+                                    char openparenthesis_char = '(',
+                                    char closeparenthesis_char = ')',
+                                    char comment_char = '\0',
+                                    SPLIT_LINE_STATE start_state = SL_NORMAL);
+  // debugging.
+  void debug() const;
+
+public:
+  static const std::string WhiteSpaces;
+  static const std::string WhiteSpacesWithComma;
+  static const SubString   NullSubString;
+
+private:
+  std::vector<std::string>  strings;                      //!< strings produced from a single string splitted in multiple strings
+};
+
+#endif /* __SUBSTRING_H__ */
Index: /code/trunk/src/util/UtilPrereqs.h
===================================================================
--- /code/trunk/src/util/UtilPrereqs.h	(revision 871)
+++ /code/trunk/src/util/UtilPrereqs.h	(revision 871)
@@ -0,0 +1,71 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+/**
+ @file  UtilPrereq.h
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _UtilPrereqs_H__
+#define _UtilPrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( UTIL_STATIC_BUILD )
+#  ifdef UTIL_SHARED_BUILD
+#    define _UtilExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _UtilExport
+#    else
+#      define _UtilExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _UtilExport  __attribute__ ((visibility("default")))
+#else
+#  define _UtilExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+class Convert;
+template <typename FromType, typename ToType>
+class Converter;
+class MultiTypePrimitive;
+class MultiTypeString;
+class MultiTypeMath;
+template <class T>
+class String2Number;
+class SubString;
+
+#endif /* _UtilPrereqs_H__ */
Index: /code/trunk/src/util/XMLIncludes.h
===================================================================
--- /code/trunk/src/util/XMLIncludes.h	(revision 871)
+++ /code/trunk/src/util/XMLIncludes.h	(revision 871)
@@ -0,0 +1,12 @@
+#include "util/tinyxml/TinyXMLPrereqs.h"
+
+namespace orxonox
+{
+    typedef ticpp::Document Document;
+    typedef ticpp::Element Element;
+    typedef ticpp::Declaration Declaration;
+    typedef ticpp::StylesheetReference StylesheetReference;
+    typedef ticpp::Text Text;
+    typedef ticpp::Comment Comment;
+    typedef ticpp::Attribute Attribute;
+}
Index: de/trunk/src/util/substring.cc
===================================================================
--- /code/trunk/src/util/substring.cc	(revision 870)
+++ 	(revision )
@@ -1,466 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Christian Meyer
- *   Co-authors:
- *      Benjamin Grauer
- *
-//
-//  splitLine
-//  STL string tokenizer
-//
-//  Created by Clemens Wacha.
-//  Version 1.0
-//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
-//
- */
-
-#include "substring.h"
-
-/**
- * @brief default constructor
- */
-SubString::SubString()
-{}
-
-
-/**
- * @brief create a SubString from
- * @param string the String to Spilit
- * @param delimiter the Character at which to split string (delimiter)
- */
-SubString::SubString(const std::string& string, char delimiter)
-{
-  this->split(string, delimiter);
-}
-
-
-/**
- * @brief Splits a String into multiple splitters.
- * @param string the String to split
- * @param delimiters multiple set of characters at what to split. (delimiters)
- * @param delimiterNeighbours neighbours of the delimiters, that will be erased only when near a delimiter.
- * @param emptyEntries If empty entries should be allewed or removed.
- * @param escapeChar The Escape Character that overrides splitters commends and so on...
- * @param safemode_char within these characters splitting won't happen
- * @param comment_char the Comment character.
- */
-SubString::SubString(const std::string& string,
-                     const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
-                     char escapeChar, char safemode_char, char comment_char)
-{
-  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, comment_char);
-}
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subString the SubString to take a set from.
- * @param subSetBegin the beginning to the end
- */
-SubString::SubString(const SubString& subString, unsigned int subSetBegin)
-{
-  for (unsigned int i = subSetBegin; i < subString.size(); i++)
-    this->strings.push_back(subString[i]);
-}
-
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subString the SubString to take a Set from
- * @param subSetBegin the beginning to the end
- * @param subSetEnd the end of the SubSet (max subString.size() will be checked internaly)
- */
-SubString::SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd)
-{
-  for (unsigned int i = subSetBegin; i < subString.size() || i < subSetEnd; i++)
-    this->strings.push_back(subString[i]);
-}
-
-/**
- * @brief creates a Substring from a count and values set.
- * @param argc: the Arguments Count.
- * @param argv: Argument Values.
- */
-SubString::SubString(unsigned int argc, const char** argv)
-{
-  for(unsigned int i = 0; i < argc; ++i)
-    this->strings.push_back(std::string(argv[i]));
-}
-
-/**
- * @brief removes the object from memory
- */
-SubString::~SubString()
-{ }
-
-/** @brief An empty String */
-// const std::string SubString::emptyString = "";
-/** @brief Helper that gets you a String consisting of all White Spaces */
-const std::string SubString::WhiteSpaces = " \n\t";
-/** @brief Helper that gets you a String consisting of all WhiteSpaces and the Comma */
-const std::string SubString::WhiteSpacesWithComma = " \n\t,";
-/** An Empty SubString */
-const SubString SubString::NullSubString = SubString();
-
-/**
- * @brief stores the Value of subString in this SubString
- * @param subString will be copied into this String.
- * @returns this SubString.
- */
-SubString& SubString::operator=(const SubString& subString)
-{
-  this->strings = subString.strings;
-  return *this;
-}
-
-
-/**
- * @brief comparator.
- * @param subString the SubString to compare against this one.
- * @returns true if the Stored Strings match
- */
-bool SubString::operator==(const SubString& subString) const
-{
-  return (this->strings == subString.strings);
-}
-
-/**
- * @brief comparator.
- * @param subString the SubString to compare against this one.
- * @returns true if the Stored Strings match
- */
-bool SubString::compare(const SubString& subString) const
-{
-  return (*this == subString);
-}
-
-/**
- * @brief comparator.
- * @param subString the SubString to compare against this one.
- * @param length how many entries to compare. (from 0 to length)
- * @returns true if the Stored Strings match
- */
-bool SubString::compare(const SubString& subString, unsigned int length) const
-{
-  if (length > this->size() || length > subString.size())
-    return false;
-
-  for (unsigned int i = 0; i < length; i++)
-    if (this->strings[i] != subString.strings[i])
-      return false;
-  return true;
-}
-
-
-/**
- * @brief append operator
- * @param subString the String to append.
- * @returns a SubString where this and subString are appended.
- */
-SubString SubString::operator+(const SubString& subString) const
-{
-  return SubString(*this) += subString;
-}
-
-
-/**
- * @brief append operator.
- * @param subString append subString to this SubString.
- * @returns this substring appended with subString
- */
-SubString& SubString::operator+=(const SubString& subString)
-{
-  for (unsigned int i = 0; i < subString.size(); i++)
-    this->strings.push_back(subString[i]);
-  return *this;
-}
-
-
-/**
- * @brief Split the String at
- * @param string where to split
- * @param splitter delimiter.
- */
-unsigned int SubString::split(const std::string& string, char splitter)
-{
-  this->strings.clear();
-  char split[2];
-  split[0] = splitter;
-  split[1] = '\0';
-  SubString::splitLine(this->strings, string, split);
-  return strings.size();
-}
-
-
-/**
- * @brief Splits a String into multiple splitters.
- * @param string the String to split
- * @param delimiters multiple set of characters at what to split. (delimiters)
- * @param delimiterNeighbours: Neighbours to the Delimiters that will be erased too.
- * @param emptyEntries: If empty entries are added to the List of SubStrings
- * @param escapeChar The Escape Character that overrides splitters commends and so on...
- * @param safemode_char within these characters splitting won't happen
- * @param comment_char the Comment character.
- */
-unsigned int SubString::split(const std::string& string,
-                              const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
-                              char escapeChar,char safemode_char, char comment_char)
-{
-  this->strings.clear();
-  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, comment_char);
-  return this->strings.size();
-}
-
-
-/**
- * @brief joins together all Strings of this Substring.
- * @param delimiter the String between the subStrings.
- * @returns the joined String.
- */
-std::string SubString::join(const std::string& delimiter) const
-{
-  if (!this->strings.empty())
-  {
-    std::string retVal = this->strings[0];
-    for (unsigned int i = 1; i < this->strings.size(); i++)
-      retVal += delimiter + this->strings[i];
-    return retVal;
-  }
-  else
-  {
-    static std::string empty;
-    return empty;
-  }
-}
-
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subSetBegin the beginning to the end
- * @returns the SubSet
- *
- * This function is added for your convenience, and does the same as
- * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
- */
-SubString SubString::subSet(unsigned int subSetBegin) const
-{
-  return SubString(*this, subSetBegin);
-}
-
-
-/**
- * @brief creates a SubSet of a SubString.
- * @param subSetBegin the beginning to
- * @param subSetEnd the end of the SubSet to select (if bigger than subString.size() it will be downset.)
- * @returns the SubSet
- *
- * This function is added for your convenience, and does the same as
- * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
- */
-SubString SubString::subSet(unsigned int subSetBegin, unsigned int subSetEnd) const
-{
-  return SubString(*this, subSetBegin, subSetEnd);
-}
-
-
-/**
- * @brief splits line into tokens and stores them in ret.
- * @param ret the Array, where the Splitted strings will be stored in
- * to the beginning of the current token is stored
- * @param line the inputLine to split
- * @param delimiters a String of Delimiters (here the input will be splitted)
- * @param delimiterNeighbours Naighbours to the Delimitter, that will be removed if they are to the left or the right of a Delimiter.
- * @param emptyEntries: if empty Strings are added to the List of Strings.
- * @param escape_char: Escape carater (escapes splitters)
- * @param safemode_char: the beginning of the safemode is marked with this
- * @param comment_char: the beginning of a comment is marked with this: (until the end of a Line)
- * @param start_state: the Initial state on how to parse the String.
- * @returns SPLIT_LINE_STATE the parser was in when returning
- *
- * This is the Actual Splitting Algorithm from Clemens Wacha
- * Supports delimiters, escape characters,
- * ignores special  characters between safemode_char and between comment_char and linend '\n'.
- */
-SubString::SPLIT_LINE_STATE
-SubString::splitLine(std::vector<std::string>& ret,
-                     const std::string& line,
-                     const std::string& delimiters,
-                     const std::string& delimiterNeighbours,
-                     bool emptyEntries,
-                     char escape_char,
-                     char safemode_char,
-                     char comment_char,
-                     SPLIT_LINE_STATE start_state)
-{
-  SPLIT_LINE_STATE state = start_state;
-  unsigned int i = 0;
-  unsigned int fallBackNeighbours = 0;
-
-  std::string token;
-
-  if(start_state != SL_NORMAL && ret.size() > 0)
-  {
-    token = ret[ret.size()-1];
-    ret.pop_back();
-  }
-
-  while(i < line.size())
-  {
-    switch(state)
-    {
-      case SL_NORMAL:
-        if(line[i] == escape_char)
-        {
-          state = SL_ESCAPE;
-        }
-        else if(line[i] == safemode_char)
-        {
-          state = SL_SAFEMODE;
-        }
-        else if(line[i] == comment_char)
-        {
-          if (fallBackNeighbours > 0)
-            token = token.substr(0, token.size() - fallBackNeighbours);
-          /// FINISH
-          if(emptyEntries || token.size() > 0)
-          {
-            ret.push_back(token);
-            token.clear();
-          }
-          token += line[i];       // EAT
-          state = SL_COMMENT;
-        }
-        else if(delimiters.find(line[i]) != std::string::npos)
-        {
-          // line[i] is a delimiter
-          if (fallBackNeighbours > 0)
-            token = token.substr(0, token.size() - fallBackNeighbours);
-          /// FINISH
-          if(emptyEntries || token.size() > 0)
-          {
-            ret.push_back(token);
-            token.clear();
-          }
-          state = SL_NORMAL;
-        }
-        else
-        {
-          if (delimiterNeighbours.find(line[i]) != std::string::npos)
-          {
-            if (token.size() > 0)
-              ++fallBackNeighbours;
-            else
-            {
-              i++;
-              continue;
-            }
-          }
-          else
-            fallBackNeighbours = 0;
-          token += line[i];       // EAT
-        }
-        break;
-      case SL_ESCAPE:
-        if(line[i] == 'n') token += '\n';
-        else if(line[i] == 't') token += '\t';
-        else if(line[i] == 'v') token += '\v';
-        else if(line[i] == 'b') token += '\b';
-        else if(line[i] == 'r') token += '\r';
-        else if(line[i] == 'f') token += '\f';
-        else if(line[i] == 'a') token += '\a';
-        else if(line[i] == '?') token += '\?';
-        else token += line[i];  // EAT
-        state = SL_NORMAL;
-        break;
-      case SL_SAFEMODE:
-        if(line[i] == safemode_char)
-        {
-          state = SL_NORMAL;
-        }
-        else if(line[i] == escape_char)
-        {
-          state = SL_SAFEESCAPE;
-        }
-        else
-        {
-          token += line[i];       // EAT
-        }
-        break;
-
-      case SL_SAFEESCAPE:
-        if(line[i] == 'n') token += '\n';
-        else if(line[i] == 't') token += '\t';
-        else if(line[i] == 'v') token += '\v';
-        else if(line[i] == 'b') token += '\b';
-        else if(line[i] == 'r') token += '\r';
-        else if(line[i] == 'f') token += '\f';
-        else if(line[i] == 'a') token += '\a';
-        else if(line[i] == '?') token += '\?';
-        else token += line[i];  // EAT
-        state = SL_SAFEMODE;
-        break;
-
-      case SL_COMMENT:
-        if(line[i] == '\n')
-        {
-          /// FINISH
-          if(token.size() > 0)
-          {
-            ret.push_back(token);
-            token.clear();
-          }
-          state = SL_NORMAL;
-        }
-        else
-        {
-          token += line[i];       // EAT
-        }
-        break;
-
-      default:
-        // nothing
-        break;
-    }
-    i++;
-  }
-
-  /// FINISH
-  if (fallBackNeighbours > 0)
-    token = token.substr(0, token.size() - fallBackNeighbours);
-  if(emptyEntries || token.size() > 0)
-  {
-    ret.push_back(token);
-    token.clear();
-  }
-  return(state);
-}
-
-
-/**
- * @brief Some nice debug information about this SubString
- */
-void SubString::debug() const
-{
-  printf("Substring-information::count=%d ::", this->strings.size());
-  for (unsigned int i = 0; i < this->strings.size(); i++)
-    printf("s%d='%s'::", i, this->strings[i].c_str());
-  printf("\n");
-}
Index: de/trunk/src/util/substring.h
===================================================================
--- /code/trunk/src/util/substring.h	(revision 870)
+++ 	(revision )
@@ -1,154 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Christian Meyer
- *   Co-authors:
- *      Benjamin Grauer
- *
-//
-//  splitLine
-//  STL string tokenizer
-//
-//  Created by Clemens Wacha.
-//  Version 1.0
-//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
-//
- */
-
- /*!
- * @file substring.h
- * @brief a small class to get the parts of a string separated by commas
- *
- * This class is also identified as a Tokenizer. It splits up one long
- * String into multiple small ones by a designated Delimiter.
- *
- * Substring is Advanced, and it is possible, to split a string by ','
- * but also removing leading and trailing spaces around the comma.
- *
- * @example
- * Split the String std::string st = "1345, The new empire   , is , orxonox"
- * is splitted with:
- * SubString(st, ',', " \n\t")
- * into
- * "1345", "The new empire", "is", "orxonox"
- * As you can see, the useless spaces around ',' were removed.
- */
-
-#ifndef __SUBSTRING_H__
-#define __SUBSTRING_H__
-
-#include <vector>
-#include <string>
-
-
-//! A class that can load one string and split it in multipe ones
-/**
- * SubString is a very Powerfull way to create a SubSet from a String
- * It can be used, to Split strings append them and join them again.
- */
-class SubString
-{
-public:
-  //! An enumerator for the State the Parser is in
-  typedef enum {
-    SL_NORMAL,            //!< Normal state
-    SL_ESCAPE,            //!< After an escape character
-    SL_SAFEMODE,          //!< In safe mode (between "" mostly).
-    SL_SAFEESCAPE,        //!< In safe mode with the internal escape character, that escapes even the savemode character.
-    SL_COMMENT,           //!< In Comment mode.
-  } SPLIT_LINE_STATE;
-
-
-public:
-  SubString();
-  SubString(const std::string& string, char delimiter = ',');
-  SubString(const std::string& string,
-            const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries=false,
-            char escapeChar ='\\', char safemode_char = '"', char comment_char = '\0');
-  SubString(unsigned int argc, const char** argv);
-  /** @brief create a Substring as a copy of another one. @param subString the SubString to copy. */
-  SubString(const SubString& subString) { *this = subString; };
-  SubString(const SubString& subString, unsigned int subSetBegin);
-  SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd);
-  ~SubString();
-
-  // operate on the SubString
-  SubString& operator=(const SubString& subString);
-  bool operator==(const SubString& subString) const;
-  bool compare(const SubString& subString) const;
-  bool compare(const SubString& subString, unsigned int length) const;
-  SubString operator+(const SubString& subString) const;
-  SubString& operator+=(const SubString& subString);
-  /** @param subString the String to append @returns appended String. @brief added for convenience */
-  SubString& append(const SubString subString) { return (*this += subString); };
-
-  /////////////////////////////////////////
-  // Split and Join the any String. ///////
-  unsigned int split(const std::string& string = "", char delimiter = ',');
-  unsigned int split(const std::string& string,
-                     const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries = false,
-                     char escapeChar ='\\', char safemode_char = '"', char comment_char = '\0');
-  std::string join(const std::string& delimiter = " ") const;
-  ////////////////////////////////////////
-
-  // retrieve a SubSet from the String
-  SubString subSet(unsigned int subSetBegin) const;
-  SubString subSet(unsigned int subSetBegin, unsigned int subSetEnd) const;
-
-  // retrieve Information from within
-  /** @returns true if the SubString is empty */
-  inline bool empty() const { return this->strings.empty(); };
-  /** @returns the count of Strings stored in this substring */
-  inline unsigned int size() const { return this->strings.size(); };
-  /** @param i the i'th String @returns the i'th string from the subset of Strings */
-  inline const std::string& operator[](unsigned int i) const { return this->strings[i]; };
-  /** @param i the i'th String @returns the i'th string from the subset of Strings */
-  inline const std::string& getString(unsigned int i) const { return (*this)[i]; };
-  /** @returns the front of the StringList. */
-  inline const std::string& front() const { return this->strings.front(); };
-  /** @returns the back of the StringList. */
-  inline const std::string& back() const { return this->strings.back(); };
-  /** @brief removes the back of the strings list. */
-  inline void pop_back() { this->strings.pop_back(); };
-
-  // the almighty algorithm.
-  static SPLIT_LINE_STATE splitLine(std::vector<std::string>& ret,
-                                    const std::string& line,
-                                    const std::string& delimiters = SubString::WhiteSpaces,
-                                    const std::string& delimiterNeighbours = "",
-                                    bool emptyEntries = false,
-                                    char escape_char = '\\',
-                                    char safemode_char = '"',
-                                    char comment_char = '\0',
-                                    SPLIT_LINE_STATE start_state = SL_NORMAL);
-  // debugging.
-  void debug() const;
-
-public:
-  static const std::string WhiteSpaces;
-  static const std::string WhiteSpacesWithComma;
-  static const SubString   NullSubString;
-
-private:
-  std::vector<std::string>  strings;                      //!< strings produced from a single string splitted in multiple strings
-};
-
-#endif /* __SUBSTRING_H__ */
Index: /code/trunk/src/util/tinyxml/TinyXMLPrereqs.h
===================================================================
--- /code/trunk/src/util/tinyxml/TinyXMLPrereqs.h	(revision 870)
+++ /code/trunk/src/util/tinyxml/TinyXMLPrereqs.h	(revision 871)
@@ -73,3 +73,14 @@
 class TiXmlParsingData;
 
+namespace ticpp
+{
+    class Document;
+    class Element;
+    class Declaration;
+    class StylesheetReference;
+    class Text;
+    class Comment;
+    class Attribute;
+}
+
 #endif /* _TinyXMLPrereqs_H__ */
Index: /code/trunk/src/util/tinyxml/ticpp.cc
===================================================================
--- /code/trunk/src/util/tinyxml/ticpp.cc	(revision 870)
+++ /code/trunk/src/util/tinyxml/ticpp.cc	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 http://code.google.com/p/ticpp/
Index: /code/trunk/src/util/tinyxml/ticpp.h
===================================================================
--- /code/trunk/src/util/tinyxml/ticpp.h	(revision 870)
+++ /code/trunk/src/util/tinyxml/ticpp.h	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 http://code.google.com/p/ticpp/
Index: /code/trunk/src/util/tinyxml/ticpprc.h
===================================================================
--- /code/trunk/src/util/tinyxml/ticpprc.h	(revision 870)
+++ /code/trunk/src/util/tinyxml/ticpprc.h	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 http://code.google.com/p/ticpp/
Index: /code/trunk/src/util/tinyxml/tinyxml.h
===================================================================
--- /code/trunk/src/util/tinyxml/tinyxml.h	(revision 870)
+++ /code/trunk/src/util/tinyxml/tinyxml.h	(revision 871)
@@ -1,2 +1,4 @@
+#define TIXML_USE_TICPP
+
 /*
 www.sourceforge.net/projects/tinyxml
