Index: /code/branches/core2/src/orxonox/core/Executor.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/Executor.cc	(revision 930)
+++ /code/branches/core2/src/orxonox/core/Executor.cc	(revision 931)
@@ -39,4 +39,5 @@
         this->bAddedDescription_ = false;
         this->bAddedDescriptionReturnvalue_ = false;
+
         this->bAddedDescriptionParam_[0] = false;
         this->bAddedDescriptionParam_[1] = false;
@@ -44,8 +45,61 @@
         this->bAddedDescriptionParam_[3] = false;
         this->bAddedDescriptionParam_[4] = false;
+
+        this->bAddedDefaultValue_[0] = false;
+        this->bAddedDefaultValue_[1] = false;
+        this->bAddedDefaultValue_[2] = false;
+        this->bAddedDefaultValue_[3] = false;
+        this->bAddedDefaultValue_[4] = false;
     }
 
     Executor::~Executor()
     {
+        delete this->functor_;
+    }
+
+    bool Executor::parse(const std::string& params, const std::string& delimiter) const
+    {
+        unsigned int paramCount = this->functor_->getParamCount();
+
+        if (paramCount == 0)
+        {
+            (*this->functor_)();
+        }
+        else if (paramCount == 1)
+        {
+            (*this->functor_)(MultiTypeMath(params));
+        }
+        else
+        {
+            SubString tokens(params, delimiter, SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
+
+            for (unsigned int i = tokens.size(); i < this->functor_->getParamCount(); i++)
+                if (!this->bAddedDefaultValue_[i])
+                    return false;
+
+            MultiTypeMath param[paramCount];
+            for (unsigned int i = 0; i < tokens.size(); i++)
+                param[i] = tokens[i];
+            for (unsigned int i = tokens.size(); i < paramCount; i++)
+                param[i] = this->defaultValue_[i];
+
+            switch(paramCount)
+            {
+                case 2:
+                    (*this->functor_)(param[0], param[1]);
+                    break;
+                case 3:
+                    (*this->functor_)(param[0], param[1], param[2]);
+                    break;
+                case 4:
+                    (*this->functor_)(param[0], param[1], param[2], param[3]);
+                    break;
+                case 5:
+                    (*this->functor_)(param[0], param[1], param[2], param[3], param[4]);
+                    break;
+            }
+        }
+
+        return true;
     }
 
@@ -77,5 +131,5 @@
     void Executor::descriptionParam(int param, const std::string& description)
     {
-        if (param > 0 && param <= 5)
+        if (param >= 0 && param < MAX_FUNCTOR_ARGUMENTS)
         {
             if (!this->bAddedDescriptionParam_[param])
@@ -94,8 +148,6 @@
     const std::string& Executor::getDescriptionParam(int param) const
     {
-        if (param > 0 && param <= 5)
-        {
+        if (param >= 0 && param < MAX_FUNCTOR_ARGUMENTS)
             return GetLocalisation(this->descriptionParam_[param]);
-        }
 
         return this->descriptionParam_[0];
@@ -116,3 +168,62 @@
         return GetLocalisation(this->descriptionReturnvalue_);
     }
+
+    void Executor::setDefaultValues(const MultiTypeMath& param1)
+    {
+        this->defaultValue_[0] = param1;
+        this->bAddedDefaultValue_[0] = true;
+    }
+
+    void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2)
+    {
+        this->defaultValue_[0] = param1;
+        this->bAddedDefaultValue_[0] = true;
+        this->defaultValue_[1] = param2;
+        this->bAddedDefaultValue_[1] = true;
+    }
+
+    void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3)
+    {
+        this->defaultValue_[0] = param1;
+        this->bAddedDefaultValue_[0] = true;
+        this->defaultValue_[1] = param2;
+        this->bAddedDefaultValue_[1] = true;
+        this->defaultValue_[2] = param3;
+        this->bAddedDefaultValue_[2] = true;
+    }
+
+    void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4)
+    {
+        this->defaultValue_[0] = param1;
+        this->bAddedDefaultValue_[0] = true;
+        this->defaultValue_[1] = param2;
+        this->bAddedDefaultValue_[1] = true;
+        this->defaultValue_[2] = param3;
+        this->bAddedDefaultValue_[2] = true;
+        this->defaultValue_[3] = param4;
+        this->bAddedDefaultValue_[3] = true;
+    }
+
+    void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5)
+    {
+        this->defaultValue_[0] = param1;
+        this->bAddedDefaultValue_[0] = true;
+        this->defaultValue_[1] = param2;
+        this->bAddedDefaultValue_[1] = true;
+        this->defaultValue_[2] = param3;
+        this->bAddedDefaultValue_[2] = true;
+        this->defaultValue_[3] = param4;
+        this->bAddedDefaultValue_[3] = true;
+        this->defaultValue_[4] = param5;
+        this->bAddedDefaultValue_[4] = true;
+    }
+
+    void Executor::setDefaultValue(int index, const MultiTypeMath& param)
+    {
+        if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
+        {
+            this->defaultValue_[index] = param;
+            this->bAddedDefaultValue_[index] = true;
+        }
+    }
 }
Index: /code/branches/core2/src/orxonox/core/Executor.h
===================================================================
--- /code/branches/core2/src/orxonox/core/Executor.h	(revision 930)
+++ /code/branches/core2/src/orxonox/core/Executor.h	(revision 931)
@@ -32,4 +32,6 @@
 #include "CorePrereqs.h"
 #include "Functor.h"
+#include "util/SubString.h"
+
 
 namespace orxonox
@@ -41,6 +43,18 @@
             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)
+            inline void operator()() const
+                { (*this->functor_)(this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const MultiTypeMath& param1) const
+                { (*this->functor_)(param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const MultiTypeMath& param1, const MultiTypeMath& param2) const
+                { (*this->functor_)(param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) const
+                { (*this->functor_)(param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) const
+                { (*this->functor_)(param1, param2, param3, param4, this->defaultValue_[4]); }
+            inline void operator()(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) const
                 { (*this->functor_)(param1, param2, param3, param4, param5); }
+
+            bool parse(const std::string& params, const std::string& delimiter = " ") const;
 
             void setName(const std::string name);
@@ -69,4 +83,11 @@
                 { return this->functor_->getTypenameReturnvalue(); }
 
+            void setDefaultValues(const MultiTypeMath& param1);
+            void setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2);
+            void setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3);
+            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);
+
         protected:
             Functor* functor_;
@@ -77,9 +98,12 @@
             LanguageEntryLabel description_;
             LanguageEntryLabel descriptionReturnvalue_;
-            LanguageEntryLabel descriptionParam_[5];
+            LanguageEntryLabel descriptionParam_[MAX_FUNCTOR_ARGUMENTS];
 
             bool bAddedDescription_;
             bool bAddedDescriptionReturnvalue_;
-            bool bAddedDescriptionParam_[5];
+            bool bAddedDescriptionParam_[MAX_FUNCTOR_ARGUMENTS];
+
+            MultiTypeMath defaultValue_[MAX_FUNCTOR_ARGUMENTS];
+            bool bAddedDefaultValue_[MAX_FUNCTOR_ARGUMENTS];
     };
 
@@ -89,7 +113,4 @@
             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); }
     };
 
@@ -101,15 +122,127 @@
             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); }
+            inline void operator()(T* object) const
+                { (*((FunctorMember<T>*)this->functor_))(object, this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(T* object, const MultiTypeMath& param1) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(T* object, const MultiTypeMath& param1, const MultiTypeMath& param2) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(T* object, const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(T* object, const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, this->defaultValue_[4]); }
+            inline void operator()(T* object, const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, param5); }
+
+
+            inline void operator()(const T* object) const
+                { (*((FunctorMember<T>*)this->functor_))(object, this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const T* object, const MultiTypeMath& param1) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const T* object, const MultiTypeMath& param1, const MultiTypeMath& param2) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const T* object, const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
+            inline void operator()(const T* object, const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, this->defaultValue_[4]); }
+            inline void operator()(const T* object, const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) const
+                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, param5); }
+
+            inline void setObject(T* object) const
+                { ((FunctorMember<T>*)this->functor_)->setObject(object); }
+            inline void setObject(const T* object) const
+                { ((FunctorMember<T>*)this->functor_)->setObject(object); }
+
+            bool parse(T* object, const std::string& params, const std::string& delimiter) const
+            {
+                unsigned int paramCount = this->functor_->getParamCount();
+
+                if (paramCount == 0)
+                {
+                    (*((FunctorMember<T>*)this->functor_))(object);
+                }
+                else if (paramCount == 1)
+                {
+                    (*((FunctorMember<T>*)this->functor_))(object, MultiTypeMath(params));
+                }
+                else
+                {
+                    SubString tokens(params, delimiter, SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
+
+                    for (unsigned int i = tokens.size(); i < this->functor_->getParamCount(); i++)
+                        if (!this->bAddedDefaultValue_[i])
+                            return false;
+
+                    MultiTypeMath param[paramCount];
+                    for (unsigned int i = 0; i < tokens.size(); i++)
+                        param[i] = tokens[i];
+                    for (unsigned int i = tokens.size(); i < paramCount; i++)
+                        param[i] = this->defaultValue_[i];
+
+                    switch(paramCount)
+                    {
+                        case 2:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1]);
+                            break;
+                        case 3:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1], param[2]);
+                            break;
+                        case 4:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1], param[2], param[3]);
+                            break;
+                        case 5:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1], param[2], param[3], param[4]);
+                            break;
+                    }
+                }
+
+                return true;
+            }
+
+            bool parse(const T* object, const std::string& params, const std::string& delimiter) const
+            {
+                unsigned int paramCount = this->functor_->getParamCount();
+
+                if (paramCount == 0)
+                {
+                    (*((FunctorMember<T>*)this->functor_))(object);
+                }
+                else if (paramCount == 1)
+                {
+                    (*((FunctorMember<T>*)this->functor_))(object, MultiTypeMath(params));
+                }
+                else
+                {
+                    SubString tokens(params, delimiter, SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
+
+                    for (unsigned int i = tokens.size(); i < this->functor_->getParamCount(); i++)
+                        if (!this->bAddedDefaultValue_[i])
+                            return false;
+
+                    MultiTypeMath param[paramCount];
+                    for (unsigned int i = 0; i < tokens.size(); i++)
+                        param[i] = tokens[i];
+                    for (unsigned int i = tokens.size(); i < paramCount; i++)
+                        param[i] = this->defaultValue_[i];
+
+                    switch(paramCount)
+                    {
+                        case 2:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1]);
+                            break;
+                        case 3:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1], param[2]);
+                            break;
+                        case 4:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1], param[2], param[3]);
+                            break;
+                        case 5:
+                            (*((FunctorMember<T>*)this->functor_))(object, param[0], param[1], param[2], param[3], param[4]);
+                            break;
+                    }
+                }
+
+                return true;
+            }
     };
 }
Index: /code/branches/core2/src/orxonox/core/Functor.h
===================================================================
--- /code/branches/core2/src/orxonox/core/Functor.h	(revision 930)
+++ /code/branches/core2/src/orxonox/core/Functor.h	(revision 931)
@@ -35,4 +35,5 @@
 #include "CorePrereqs.h"
 
+#define MAX_FUNCTOR_ARGUMENTS 5
 
 enum FunctionType
@@ -80,5 +81,5 @@
         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 unsigned int getParamCount() const { return this->numParams_; }
         inline bool hasReturnvalue() const { return this->hasReturnValue_; }
         inline FunctionType getType() const { return this->type_; }
@@ -89,5 +90,5 @@
 
     protected:
-        int numParams_;
+        unsigned int numParams_;
         bool hasReturnValue_;
         FunctionType type_;
@@ -95,5 +96,5 @@
 
         std::string typeReturnvalue_;
-        std::string typeParam_[5];
+        std::string typeParam_[MAX_FUNCTOR_ARGUMENTS];
 };
 
Index: /code/branches/core2/src/orxonox/core/Language.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/Language.cc	(revision 930)
+++ /code/branches/core2/src/orxonox/core/Language.cc	(revision 931)
@@ -61,5 +61,5 @@
     {
         // Check if the translation is more than just an empty string
-        if (localisation.compare("") != 0)
+        if ((localisation != "") && (localisation.size() > 0))
         {
             this->localisedEntry_ = localisation;
@@ -244,5 +244,5 @@
 
             // Check if the line is empty
-            if (lineString.compare("") != 0)
+            if ((lineString != "") && (lineString.size() > 0))
             {
                 unsigned int pos = lineString.find('=');
@@ -288,5 +288,5 @@
 
             // Check if the line is empty
-            if (lineString.compare("") != 0)
+            if ((lineString != "") && (lineString.size() > 0))
             {
                 unsigned int pos = lineString.find('=');
Index: /code/branches/core2/src/orxonox/core/XMLPort.h
===================================================================
--- /code/branches/core2/src/orxonox/core/XMLPort.h	(revision 930)
+++ /code/branches/core2/src/orxonox/core/XMLPort.h	(revision 931)
@@ -102,19 +102,7 @@
             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:
@@ -247,5 +235,5 @@
                     {
                         Element* xmlsubelement;
-                        if (this->sectionname_ != "")
+                        if ((this->sectionname_ != "") && (this->sectionname_.size() > 0))
                             xmlsubelement = xmlelement.FirstChildElement(this->sectionname_, false);
                         else
Index: /code/branches/core2/src/orxonox/objects/Model.cc
===================================================================
--- /code/branches/core2/src/orxonox/objects/Model.cc	(revision 930)
+++ /code/branches/core2/src/orxonox/objects/Model.cc	(revision 931)
@@ -81,12 +81,14 @@
     }
 
-    bool Model::create(){
-      if(meshSrc_.compare("")!=0){
-        this->mesh_.setMesh(meshSrc_);
-        this->attachObject(this->mesh_.getEntity());
-        COUT(4) << "Loader: Created model" << std::endl;
-      }
-      registerAllVariables();
-      return true;
+    bool Model::create()
+    {
+        if ((this->meshSrc_ != "") && (this->meshSrc_.size() > 0))
+        {
+            this->mesh_.setMesh(meshSrc_);
+            this->attachObject(this->mesh_.getEntity());
+            COUT(4) << "Loader: Created model" << std::endl;
+        }
+        registerAllVariables();
+        return true;
     }
 
Index: /code/branches/core2/src/util/Convert.h
===================================================================
--- /code/branches/core2/src/util/Convert.h	(revision 930)
+++ /code/branches/core2/src/util/Convert.h	(revision 931)
@@ -541,42 +541,3 @@
 };
 
-
-////////////////
-// XMLElement //
-////////////////
-
-// orxonox::Element to std::string
-template <>
-class Converter<orxonox::Element, std::string>
-{
-  public:
-    bool operator()(std::string* output, const orxonox::Element& input) const
-    {
-      std::ostringstream ostream;
-      if (ostream << input)
-      {
-        (*output) = ostream.str();
-        return true;
-      }
-
-      return false;
-    }
-};
-
-// std::string to orxonox::Element
-template <>
-class Converter<std::string, orxonox::Element>
-{
-  public:
-    bool operator()(orxonox::Element* output, const std::string& input) const
-    {
-      std::istringstream istream(input);
-      if (istream >> (*output))
-        return true;
-
-      return false;
-    }
-};
-
-
 #endif /* _Convert_H__ */
Index: /code/branches/core2/src/util/MultiTypeString.cc
===================================================================
--- /code/branches/core2/src/util/MultiTypeString.cc	(revision 930)
+++ /code/branches/core2/src/util/MultiTypeString.cc	(revision 931)
@@ -32,8 +32,5 @@
 MultiTypeString::MultiTypeString(MultiType type) : MultiTypePrimitive(type)
 {
-    if (type == MT_constchar)
-        this->string_ = std::string("");
-    else if (type == MT_string)
-        this->string_ = std::string("");
+    // Nothing to do for string and xml-element
 }
 
Index: /code/branches/core2/src/util/String.cc
===================================================================
--- /code/branches/core2/src/util/String.cc	(revision 930)
+++ /code/branches/core2/src/util/String.cc	(revision 931)
@@ -83,5 +83,6 @@
 bool isEmpty(const std::string& str)
 {
-    return getStripped(str) == "";
+    std::string temp = getStripped(str);
+    return ((temp == "") || (temp.size() == 0));
 }
 
