Index: /code/branches/core2/src/orxonox/core/Executor.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/Executor.cc	(revision 932)
+++ /code/branches/core2/src/orxonox/core/Executor.cc	(revision 933)
@@ -81,5 +81,5 @@
             else
             {
-                COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given." << std::endl;
+                COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl;
                 return false;
             }
@@ -93,5 +93,5 @@
                 if (!this->bAddedDefaultValue_[i])
                 {
-                    COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given." << std::endl;
+                    COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input:" << params << ")." << std::endl;
                     return false;
                 }
@@ -151,5 +151,5 @@
     }
 
-    void Executor::description(const std::string& description)
+    void Executor::setDescription(const std::string& description)
     {
         if (!this->bAddedDescription_)
@@ -166,5 +166,5 @@
     }
 
-    void Executor::descriptionParam(int param, const std::string& description)
+    void Executor::setDescriptionParam(int param, const std::string& description)
     {
         if (param >= 0 && param < MAX_FUNCTOR_ARGUMENTS)
@@ -191,5 +191,5 @@
     }
 
-    void Executor::descriptionReturnvalue(const std::string& description)
+    void Executor::setDescriptionReturnvalue(const std::string& description)
     {
         if (!this->bAddedDescriptionReturnvalue_)
@@ -256,5 +256,5 @@
     }
 
-    void Executor::setDefaultValue(int index, const MultiTypeMath& param)
+    void Executor::setDefaultValue(unsigned int index, const MultiTypeMath& param)
     {
         if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
@@ -264,3 +264,12 @@
         }
     }
+
+    bool Executor::allDefaultValuesSet() const
+    {
+        for (unsigned int i = 0; i < this->functor_->getParamCount(); i++)
+            if (!this->bAddedDefaultValue_[i])
+                return false;
+
+        return true;
+    }
 }
Index: /code/branches/core2/src/orxonox/core/Executor.h
===================================================================
--- /code/branches/core2/src/orxonox/core/Executor.h	(revision 932)
+++ /code/branches/core2/src/orxonox/core/Executor.h	(revision 933)
@@ -62,11 +62,11 @@
             const std::string& getName() const;
 
-            void description(const std::string& description);
+            void setDescription(const std::string& description);
             const std::string& getDescription() const;
 
-            void descriptionParam(int param, const std::string& description);
+            void setDescriptionParam(int param, const std::string& description);
             const std::string& getDescriptionParam(int param) const;
 
-            void descriptionReturnvalue(const std::string& description);
+            void setDescriptionReturnvalue(const std::string& description);
             const std::string& getDescriptionReturnvalue(int param) const;
 
@@ -89,12 +89,15 @@
             void setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4);
             void setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5);
-            void setDefaultValue(int index, const MultiTypeMath& param);
+            void setDefaultValue(unsigned int index, const MultiTypeMath& param);
+
+            bool allDefaultValuesSet() const;
 
         protected:
             Functor* functor_;
+            std::string name_;
+            MultiTypeMath defaultValue_[MAX_FUNCTOR_ARGUMENTS];
+            bool bAddedDefaultValue_[MAX_FUNCTOR_ARGUMENTS];
 
         private:
-            std::string name_;
-
             LanguageEntryLabel description_;
             LanguageEntryLabel descriptionReturnvalue_;
@@ -104,7 +107,4 @@
             bool bAddedDescriptionReturnvalue_;
             bool bAddedDescriptionParam_[MAX_FUNCTOR_ARGUMENTS];
-
-            MultiTypeMath defaultValue_[MAX_FUNCTOR_ARGUMENTS];
-            bool bAddedDefaultValue_[MAX_FUNCTOR_ARGUMENTS];
     };
 
@@ -155,5 +155,5 @@
                 { ((FunctorMember<T>*)this->functor_)->setObject(object); }
 
-            bool parse(T* object, const std::string& params, const std::string& delimiter) const
+            bool parse(T* object, const std::string& params, const std::string& delimiter = " ") const
             {
                 unsigned int paramCount = this->functor_->getParamCount();
@@ -179,5 +179,5 @@
                     else
                     {
-                        COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given." << std::endl;
+                        COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl;
                         return false;
                     }
@@ -191,5 +191,5 @@
                         if (!this->bAddedDefaultValue_[i])
                         {
-                            COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given." << std::endl;
+                            COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input:" << params << ")." << std::endl;
                             return false;
                         }
@@ -239,5 +239,5 @@
             }
 
-            bool parse(const T* object, const std::string& params, const std::string& delimiter) const
+            bool parse(const T* object, const std::string& params, const std::string& delimiter = " ") const
             {
                 unsigned int paramCount = this->functor_->getParamCount();
@@ -263,5 +263,5 @@
                     else
                     {
-                        COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given." << std::endl;
+                        COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl;
                         return false;
                     }
@@ -275,5 +275,5 @@
                         if (!this->bAddedDefaultValue_[i])
                         {
-                            COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given." << std::endl;
+                            COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input:" << params << ")." << std::endl;
                             return false;
                         }
@@ -323,4 +323,20 @@
             }
     };
+
+    inline Executor* createExecutor(Functor* functor, const std::string& name = "")
+    {
+        return new Executor(functor, name);
+    }
+
+    template <class T>
+    inline ExecutorMember<T>* createExecutor(FunctorMember<T>* functor, const std::string& name = "")
+    {
+        return new ExecutorMember<T>(functor, name);
+    }
+
+    inline ExecutorStatic* createExecutor(FunctorStatic* functor, const std::string& name = "")
+    {
+        return new ExecutorStatic(functor, name);
+    }
 }
 
Index: /code/branches/core2/src/orxonox/core/XMLPort.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/XMLPort.cc	(revision 932)
+++ /code/branches/core2/src/orxonox/core/XMLPort.cc	(revision 933)
@@ -34,57 +34,7 @@
 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;
-        this->bApplyLoaderMask_ = 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)
     {
Index: /code/branches/core2/src/orxonox/core/XMLPort.h
===================================================================
--- /code/branches/core2/src/orxonox/core/XMLPort.h	(revision 932)
+++ /code/branches/core2/src/orxonox/core/XMLPort.h	(revision 933)
@@ -33,5 +33,5 @@
 #include "util/tinyxml/ticpp.h"
 #include "util/SubString.h"
-#include "Functor.h"
+#include "Executor.h"
 #include "Debug.h"
 #include "CoreIncludes.h"
@@ -41,34 +41,37 @@
 
 
-#define XMLPortParam(classname, paramname, loadfunction, savefunction, xmlelement, loading) \
-    XMLPortParamGeneric(classname, paramname, xmlcontainer##loadfunction##savefunction, createFunctor(&classname::loadfunction), createFunctor(&classname::savefunction), xmlelement, loading)
-#define XMLPortParam_Template(classname, paramname, loadtemplate, loadfunction, savetemplate, savefunction, xmlelement, loading) \
-    XMLPortParamGeneric(classname, paramname, xmlcontainer##loadfunction##savefunction, createFunctor loadtemplate (&classname::loadfunction), createFunctor savetemplate (&classname::savefunction), xmlelement, loading)
-
-
-#define XMLPortParamLoadOnly(classname, paramname, loadfunction, xmlelement, loading) \
-    XMLPortParamGeneric(classname, paramname, xmlcontainer##loadfunction##0, createFunctor(&classname::loadfunction), 0, xmlelement, loading)
-#define XMLPortParamLoadOnly_Template(classname, paramname, loadtemplate, loadfunction, xmlelement, loading) \
-    XMLPortParamGeneric(classname, paramname, xmlcontainer##loadfunction##0, createFunctor loadtemplate (&classname::loadfunction), 0, xmlelement, loading)
-
-
-#define XMLPortParamGeneric(classname, paramname, containername, loadfunctor, savefunctor, xmlelement, loading) \
+#define XMLPortParam(classname, paramname, loadfunction, savefunction, xmlelement, mode) \
+    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, paramname, createExecutor(createFunctor(&classname::loadfunction), #loadfunction), createExecutor(createFunctor(&classname::savefunction), #savefunction), xmlelement, mode)
+#define XMLPortParam_Template(classname, paramname, loadtemplate, loadfunction, savetemplate, savefunction, xmlelement, mode) \
+    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, paramname, createExecutor(createFunctor loadtemplate (&classname::loadfunction), #loadfunction), createExecutor(createFunctor savetemplate (&classname::savefunction), #savefunction), xmlelement, mode)
+
+#define XMLPortParamLoadOnly(classname, paramname, loadfunction, xmlelement, mode) \
+    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, paramname, createExecutor(createFunctor(&classname::loadfunction), #loadfunction), 0, xmlelement, mode)
+#define XMLPortParamLoadOnly_Template(classname, paramname, loadtemplate, loadfunction, xmlelement, mode) \
+    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, paramname, createExecutor(createFunctor loadtemplate (&classname::loadfunction), #loadfunction), 0, xmlelement, mode)
+
+#define XMLPortParamGeneric(containername, classname, paramname, loadexecutor, saveexecutor, xmlelement, mode) \
     orxonox::XMLPortClassParamContainer<classname>* containername = (orxonox::XMLPortClassParamContainer<classname>*)(this->getIdentifier()->getXMLPortParamContainer(paramname)); \
     if (!containername) \
     { \
-        containername = new orxonox::XMLPortClassParamContainer<classname>(this->getIdentifier()->getName(), std::string(paramname), loadfunctor, savefunctor); \
+        containername = new orxonox::XMLPortClassParamContainer<classname>(std::string(paramname), loadexecutor, saveexecutor); \
         this->getIdentifier()->addXMLPortParamContainer(paramname, containername); \
     } \
-    containername->port(this, xmlelement, loading)
-
-
-#define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, loading, bApplyLoaderMask, bLoadBefore) \
-    orxonox::XMLPortClassObjectContainer<classname, objectclass>* xmlcontainer##loadfunction##savefunction = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(this->getIdentifier()->getXMLPortObjectContainer(sectionname)); \
-    if (!xmlcontainer##loadfunction##savefunction) \
+    containername->port(this, xmlelement, mode)
+
+
+#define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
+    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, createExecutor(createFunctor(&classname::loadfunction), #loadfunction), createExecutor(createFunctor(&classname::savefunction), #savefunction), xmlelement, mode, bApplyLoaderMask, bLoadBefore)
+#define XMLPortObject_Template(classname, objectclass, sectionname, loadtemplate, loadfunction, savetemplate, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
+    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, createExecutor(createFunctor loadtemplate (&classname::loadfunction), #loadfunction), createExecutor(createFunctor savetemplate (&classname::savefunction), #savefunction), xmlelement, mode, bApplyLoaderMask, bLoadBefore)
+
+#define XMLPortObjectGeneric(containername, classname, objectclass, sectionname, loadexecutor, saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
+    orxonox::XMLPortClassObjectContainer<classname, objectclass>* containername = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(this->getIdentifier()->getXMLPortObjectContainer(sectionname)); \
+    if (!containername) \
     { \
-        xmlcontainer##loadfunction##savefunction = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(this->getIdentifier()->getName(), std::string(sectionname), &classname::loadfunction, &classname::savefunction, bApplyLoaderMask, bLoadBefore); \
-        this->getIdentifier()->addXMLPortObjectContainer(sectionname, xmlcontainer##loadfunction##savefunction); \
+        containername = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(std::string(sectionname), loadexecutor, saveexecutor, bApplyLoaderMask, bLoadBefore); \
+        this->getIdentifier()->addXMLPortObjectContainer(sectionname, containername); \
     } \
-    xmlcontainer##loadfunction##savefunction->port(this, xmlelement, loading)
+    containername->port(this, xmlelement, mode)
 
 
@@ -93,21 +96,33 @@
     class _CoreExport XMLPortParamContainer
     {
+        enum ParseResult
+        {
+            PR_not_started,
+            PR_finished,
+            PR_waiting_for_default_values
+        };
+
         public:
-            XMLPortParamContainer();
+            XMLPortParamContainer()
+                { this->parseResult_ = PR_not_started; }
+            virtual ~XMLPortParamContainer() {}
 
             inline const std::string& getName() const
                 { return this->paramname_; }
 
-            XMLPortParamContainer& description(const std::string description);
-            const std::string& getDescription();
+            virtual XMLPortParamContainer& description(const std::string description) = 0;
+            virtual const std::string& getDescription() = 0;
+
+            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiTypeMath& param) = 0;
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1) = 0;
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2) = 0;
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) = 0;
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) = 0;
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) = 0;
 
         protected:
-            std::string classname_;
             std::string paramname_;
-
-        private:
-            LanguageEntryLabel description_;
-            bool bAddedDescription_;
-            bool bAddedDefaultValues_;
+            ParseResult parseResult_;
+
     };
 
@@ -115,15 +130,31 @@
     class XMLPortClassParamContainer : public XMLPortParamContainer
     {
+        struct ParseParams
+        {
+            T* object;
+            Element* xmlelement;
+            XMLPort::Mode mode;
+        };
+
         public:
-            XMLPortClassParamContainer(const std::string classname, const std::string paramname, FunctorMember<T>* loadfunction, FunctorMember<T>* savefunction)
-            {
-                this->classname_ = classname;
+            XMLPortClassParamContainer(const std::string paramname, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor)
+            {
                 this->paramname_ = paramname;
-                this->loadfunction_ = loadfunction;
-                this->savefunction_ = savefunction;
+                this->loadexecutor_ = loadexecutor;
+                this->saveexecutor_ = saveexecutor;
+
+                this->setDefaultValue_[0] = false;
+                this->setDefaultValue_[1] = false;
+                this->setDefaultValue_[2] = false;
+                this->setDefaultValue_[3] = false;
+                this->setDefaultValue_[4] = false;
             }
 
             XMLPortParamContainer& port(T* object, Element& xmlelement, XMLPort::Mode mode)
             {
+                this->parseParams_.object = object;
+                this->parseParams_.xmlelement = &xmlelement;
+                this->parseParams_.mode = mode;
+
                 if (mode == XMLPort::LoadObject)
                 {
@@ -131,35 +162,11 @@
                     {
                         std::string attribute = xmlelement.GetAttribute(this->paramname_);
-                        if (attribute.size() > 0)
+                        if ((attribute.size() > 0) || (this->loadexecutor_->allDefaultValuesSet()))
                         {
-                            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);
-                                }
-                            }
+                            COUT(5) << object->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << object->getIdentifier()->getName() << " (objectname " << object->getName() << ")." << std::endl << object->getLoaderIndentation();
+                            if (this->loadexecutor_->parse(object, attribute, ","))
+                                this->parseResult_ = PR_finished;
                             else
-                            {
-                                COUT(2) << object->getLoaderIndentation() << "Warning: Parameter \"" << this->paramname_ << "\" in \"" << this->classname_ << "\" (objectname: " << object->getName() << ") is incomplete and couln't be loaded." << std::endl;
-                            }
+                                this->parseResult_ = PR_waiting_for_default_values;
                         }
                     }
@@ -167,5 +174,5 @@
                     {
                         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) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << object->getIdentifier()->getName() << "' (objectname: " << object->getName() << ") in " << object->getLevelfile() << ":" << std::endl;
                         COUT(1) << ex.what() << std::endl;
                     }
@@ -173,5 +180,5 @@
                 else
                 {
-                    if (this->savefunction_)
+                    if (this->saveexecutor_)
                     {
 //                        xmlelement.SetAttribute(this->paramname_, "...");
@@ -182,7 +189,92 @@
             }
 
+            XMLPortParamContainer& port(const ParseParams& parseParams)
+            {
+                return this->port(parseParams.object, *parseParams.xmlelement, parseParams.mode);
+            }
+
+            XMLPortParamContainer& portIfWaitingForDefaultValues(const ParseResult& result, const ParseParams& params)
+            {
+                if (result == PR_waiting_for_default_values)
+                    return this->port(params);
+                else
+                    return (*this);
+            }
+
+            virtual XMLPortParamContainer& description(const std::string description)
+                { this->loadexecutor_->setDescription(description); return (*this); }
+            virtual const std::string& getDescription()
+                { return this->loadexecutor_->getDescription(); }
+
+            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiTypeMath& param)
+            {
+                if (!this->setDefaultValue_[index])
+                {
+                    this->setDefaultValue_[index] = true;
+                    this->loadexecutor_->setDefaultValue(index, param);
+                }
+                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
+            }
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1)
+            {
+                if (!this->setDefaultValue_[0])
+                {
+                    this->setDefaultValue_[0] = true;
+                    this->loadexecutor_->setDefaultValues(param1);
+                }
+                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
+            }
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2)
+            {
+                if ((!this->setDefaultValue_[0]) || (!this->setDefaultValue_[1]))
+                {
+                    this->setDefaultValue_[0] = true;
+                    this->setDefaultValue_[1] = true;
+                    this->loadexecutor_->setDefaultValues(param1, param2);
+                }
+                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
+            }
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3)
+            {
+                if ((!this->setDefaultValue_[0]) || (!this->setDefaultValue_[1]) || (!this->setDefaultValue_[2]))
+                {
+                    this->setDefaultValue_[0] = true;
+                    this->setDefaultValue_[1] = true;
+                    this->setDefaultValue_[3] = true;
+                    this->loadexecutor_->setDefaultValues(param1, param2, param3);
+                }
+                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
+            }
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4)
+            {
+                if ((!this->setDefaultValue_[0]) || (!this->setDefaultValue_[1]) || (!this->setDefaultValue_[2]) || (!this->setDefaultValue_[3]))
+                {
+                    this->setDefaultValue_[0] = true;
+                    this->setDefaultValue_[1] = true;
+                    this->setDefaultValue_[3] = true;
+                    this->setDefaultValue_[4] = true;
+                    this->loadexecutor_->setDefaultValues(param1, param2, param3, param4);
+                }
+                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
+            }
+            virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5)
+            {
+                if ((!this->setDefaultValue_[0]) || (!this->setDefaultValue_[1]) || (!this->setDefaultValue_[2]) || (!this->setDefaultValue_[3]) || (!this->setDefaultValue_[4]))
+                {
+                    this->setDefaultValue_[0] = true;
+                    this->setDefaultValue_[1] = true;
+                    this->setDefaultValue_[3] = true;
+                    this->setDefaultValue_[4] = true;
+                    this->setDefaultValue_[5] = true;
+                    this->loadexecutor_->setDefaultValues(param1, param2, param3, param4, param5);
+                }
+                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
+            }
+
         private:
-            FunctorMember<T>* loadfunction_;
-            FunctorMember<T>* savefunction_;
+            ExecutorMember<T>* loadexecutor_;
+            ExecutorMember<T>* saveexecutor_;
+            ParseParams parseParams_;
+            bool setDefaultValue_[5];
     };
 
@@ -194,22 +286,20 @@
     {
         public:
-            XMLPortObjectContainer();
+            XMLPortObjectContainer()
+                { this->bApplyLoaderMask_ = false; }
+            virtual ~XMLPortObjectContainer() {}
 
             inline const std::string& getName() const
                 { return this->sectionname_; }
 
-            XMLPortObjectContainer& description(const std::string description);
-            const std::string& getDescription();
+            virtual XMLPortObjectContainer& description(const std::string description) = 0;
+            virtual const std::string& getDescription() = 0;
+
             bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
 
         protected:
-            std::string classname_;
             std::string sectionname_;
             bool bApplyLoaderMask_;
             bool bLoadBefore_;
-
-        private:
-            LanguageEntryLabel description_;
-            bool bAddedDescription_;
     };
 
@@ -218,10 +308,9 @@
     {
         public:
-            XMLPortClassObjectContainer(const std::string classname, const std::string sectionname, void (T::*loadfunction)(O*), const O* (T::*savefunction)(unsigned int) const, bool bApplyLoaderMask, bool bLoadBefore)
-            {
-                this->classname_ = classname;
+            XMLPortClassObjectContainer(const std::string sectionname, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor, bool bApplyLoaderMask, bool bLoadBefore)
+            {
                 this->sectionname_ = sectionname;
-                this->loadfunction_ = loadfunction;
-                this->savefunction_ = savefunction;
+                this->loadexecutor_ = loadexecutor;
+                this->saveexecutor_ = saveexecutor;
                 this->bApplyLoaderMask_ = bApplyLoaderMask;
                 this->bLoadBefore_ = bLoadBefore;
@@ -252,20 +341,26 @@
                                         {
                                             COUT(4) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
+
                                             O* newObject = (O*)identifier->fabricate();
                                             newObject->setLoaderIndentation(object->getLoaderIndentation() + "  ");
                                             newObject->setLevel(object->getLevel());
                                             newObject->setNamespace(object->getNamespace());
+
                                             if (this->bLoadBefore_)
                                             {
                                                 newObject->XMLPort(*child, XMLPort::LoadObject);
-                                                COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->classname_ << " (objectname " << object->getName() << ")" << std::endl;
+                                                COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << object->getIdentifier()->getName() << " (objectname " << object->getName() << ")" << std::endl;
                                             }
                                             else
                                             {
-                                                COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->classname_ << " (objectname " << object->getName() << ")" << std::endl;
+                                                COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << object->getIdentifier()->getName() << " (objectname " << object->getName() << ")" << std::endl;
                                             }
-                                            (*object.*this->loadfunction_)(newObject);
+
+                                            COUT(5) << object->getLoaderIndentation();
+                                            (*this->loadexecutor_)(object, newObject);
+
                                             if (!this->bLoadBefore_)
                                                 newObject->XMLPort(*child, XMLPort::LoadObject);
+
                                             COUT(5) << object->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
                                         }
@@ -286,5 +381,5 @@
                     {
                         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) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << object->getIdentifier()->getName() << "' (objectname: " << object->getName() << ") in " << object->getLevelfile() << ":" << std::endl;
                         COUT(1) << ex.what() << std::endl;
                     }
@@ -297,7 +392,12 @@
             }
 
+            virtual XMLPortObjectContainer& description(const std::string description)
+                { this->loadexecutor_->setDescription(description); return (*this); }
+            virtual const std::string& getDescription()
+                { return this->loadexecutor_->getDescription(); }
+
         private:
-            void     (T::*loadfunction_)(O*);
-            const O* (T::*savefunction_)(unsigned int) const;
+            ExecutorMember<T>* loadexecutor_;
+            ExecutorMember<T>* saveexecutor_;
     };
 }
Index: /code/branches/core2/src/util/Math.h
===================================================================
--- /code/branches/core2/src/util/Math.h	(revision 932)
+++ /code/branches/core2/src/util/Math.h	(revision 933)
@@ -26,6 +26,6 @@
  */
 
-#ifndef _Math_H__
-#define _Math_H__
+#ifndef _Util_Math_H__
+#define _Util_Math_H__
 
 #include <ostream>
@@ -146,3 +146,3 @@
 }
 
-#endif /* _Math_H__ */
+#endif /* _Util_Math_H__ */
Index: /code/branches/core2/src/util/MultiTypeMath.cc
===================================================================
--- /code/branches/core2/src/util/MultiTypeMath.cc	(revision 932)
+++ /code/branches/core2/src/util/MultiTypeMath.cc	(revision 933)
@@ -88,6 +88,4 @@
 }
 
-MultiTypeMath::operator orxonox::BaseObject*() const
-{ return (this->type_ == MT_void) ? (orxonox::BaseObject*)this->value_.void_ : (orxonox::BaseObject*)ConvertValueAndReturn<MultiTypeMath, void*>(*this); }
 MultiTypeMath::operator void*() const
 { return (this->type_ == MT_void) ? this->value_.void_ : ConvertValueAndReturn<MultiTypeMath, void*>(*this); }
Index: /code/branches/core2/src/util/MultiTypeMath.h
===================================================================
--- /code/branches/core2/src/util/MultiTypeMath.h	(revision 932)
+++ /code/branches/core2/src/util/MultiTypeMath.h	(revision 933)
@@ -91,5 +91,4 @@
         bool operator!=(const MultiTypeMath& mtm) const;
 
-        virtual operator orxonox::BaseObject*()          const;
         virtual operator void*()                const;
         virtual operator int()                  const;
Index: /code/branches/core2/src/util/MultiTypePrimitive.cc
===================================================================
--- /code/branches/core2/src/util/MultiTypePrimitive.cc	(revision 932)
+++ /code/branches/core2/src/util/MultiTypePrimitive.cc	(revision 933)
@@ -134,6 +134,4 @@
 }
 
-MultiTypePrimitive::operator orxonox::BaseObject*() const
-{ return (this->type_ == MT_void) ? (orxonox::BaseObject*)this->value_.void_ : (orxonox::BaseObject*)ConvertValueAndReturn<MultiTypePrimitive, void*>(*this); }
 MultiTypePrimitive::operator void*() const
 { return (this->type_ == MT_void) ? this->value_.void_ : ConvertValueAndReturn<MultiTypePrimitive, void*>(*this); }
Index: /code/branches/core2/src/util/MultiTypePrimitive.h
===================================================================
--- /code/branches/core2/src/util/MultiTypePrimitive.h	(revision 932)
+++ /code/branches/core2/src/util/MultiTypePrimitive.h	(revision 933)
@@ -105,5 +105,7 @@
         bool operator!=(const MultiTypePrimitive& mtp) const;
 
-        virtual operator orxonox::BaseObject*()    const;
+        template <class T>
+        operator T*()                     const
+        { return ((T*)this->value_.void_); }
         virtual operator void*()          const;
         virtual operator int()            const;
Index: /code/branches/core2/src/util/MultiTypeString.cc
===================================================================
--- /code/branches/core2/src/util/MultiTypeString.cc	(revision 932)
+++ /code/branches/core2/src/util/MultiTypeString.cc	(revision 933)
@@ -65,6 +65,4 @@
 }
 
-MultiTypeString::operator orxonox::BaseObject*() const
-{ return (this->type_ == MT_void) ? (orxonox::BaseObject*)this->value_.void_ : (orxonox::BaseObject*)ConvertValueAndReturn<MultiTypeString, void*>(*this); }
 MultiTypeString::operator void*() const
 { return (this->type_ == MT_void) ? this->value_.void_ : ConvertValueAndReturn<MultiTypeString, void*>(*this); }
Index: /code/branches/core2/src/util/MultiTypeString.h
===================================================================
--- /code/branches/core2/src/util/MultiTypeString.h	(revision 932)
+++ /code/branches/core2/src/util/MultiTypeString.h	(revision 933)
@@ -79,5 +79,4 @@
         bool operator!=(const MultiTypeString& mts) const;
 
-        virtual operator orxonox::BaseObject*() const;
         virtual operator void*()                const;
         virtual operator int()                  const;
Index: /code/branches/core2/src/util/String.h
===================================================================
--- /code/branches/core2/src/util/String.h	(revision 932)
+++ /code/branches/core2/src/util/String.h	(revision 933)
@@ -26,6 +26,6 @@
  */
 
-#ifndef _String_H__
-#define _String_H__
+#ifndef _Util_String_H__
+#define _Util_String_H__
 
 #include <string>
@@ -144,3 +144,3 @@
 };
 
-#endif /* _String_H__ */
+#endif /* _Util_String_H__ */
