Index: /trunk/src/lib/util/executor/executor.cc
===================================================================
--- /trunk/src/lib/util/executor/executor.cc	(revision 7713)
+++ /trunk/src/lib/util/executor/executor.cc	(revision 7714)
@@ -18,19 +18,9 @@
 #include "executor.h"
 
-#include "debug.h"
-#include "class_list.h"
-
-#include "key_names.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-using namespace std;
-
 ////////////////////////
 // SHELL COMMAND BASE //
 ////////////////////////
 /**
- * constructs and registers a new Command
+ * @brief constructs and registers a new Command
  * @param commandName the name of the Command
  * @param className the name of the class to apply this command to
@@ -43,5 +33,5 @@
                    const MultiType& param4)
 {
-  this->setClassID(CL_EXECUTOR, "Executor");
+//  this->setClassID(CL_EXECUTOR, "Executor");
 
   // What Parameters have we got
Index: /trunk/src/lib/util/executor/executor.h
===================================================================
--- /trunk/src/lib/util/executor/executor.h	(revision 7713)
+++ /trunk/src/lib/util/executor/executor.h	(revision 7714)
@@ -36,43 +36,43 @@
  *  Functions with many types (@see functor_list.h)
  */
-class Executor: public BaseObject
+class Executor : public BaseObject
 {
-  public:
-    virtual ~Executor();
-
-    virtual Executor* clone () const = 0;
-
-    // SETTING up the EXECUTOR
-    Executor* defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
-                            const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
-                            const MultiType& value4 = MT_NULL);
-    /** @param i the i'th defaultValue, @returns reference to the MultiType */
-    inline MultiType& getDefaultValue(unsigned int i) { return defaultValue[i]; };
-
-    // EXECUTE
-    /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
-    virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const = 0;
-    /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes @brief here for your convenience*/
-    void execute (BaseObject* object, const std::string& parameters = "") const { (*this)(object, parameters); };
-
-    // RETRIEVE INFORMATION
-    /** @returns the Type of this Function (either static or objective) */
-    inline long getType() const { return this->functorType; };
-    /** @returns the Count of Parameters this Executor takes */
-    inline unsigned int getParamCount() const { return this->paramCount; };
-
-    static void debug();
-
-  protected:
-    Executor(const MultiType& param0 = MT_NULL, const MultiType& param1 = MT_NULL,
-             const MultiType& param2 = MT_NULL, const MultiType& param3 = MT_NULL,
-             const MultiType& param4 = MT_NULL);
-
-    void cloning(Executor* executor) const;
-
-  protected:
-    short                       functorType;      //!< The type of Function we've got (either static or objective).
-    unsigned int                paramCount;       //!< the count of parameters.
-    MultiType                   defaultValue[5];  //!< Default Values.
+public:
+  virtual ~Executor();
+
+  virtual Executor* clone () const = 0;
+
+  // SETTING up the EXECUTOR
+  Executor* defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
+                          const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
+                          const MultiType& value4 = MT_NULL);
+  /** @param i the i'th defaultValue, @returns reference to the MultiType */
+  inline MultiType& getDefaultValue(unsigned int i) { return defaultValue[i]; };
+
+  // EXECUTE
+  /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
+  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const = 0;
+  /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes @brief here for your convenience*/
+  void execute (BaseObject* object, const std::string& parameters = "") const { (*this)(object, parameters); };
+
+  // RETRIEVE INFORMATION
+  /** @returns the Type of this Function (either static or objective) */
+  inline long getType() const { return this->functorType; };
+  /** @returns the Count of Parameters this Executor takes */
+  inline unsigned int getParamCount() const { return this->paramCount; };
+
+  static void debug();
+
+protected:
+  Executor(const MultiType& param0 = MT_NULL, const MultiType& param1 = MT_NULL,
+           const MultiType& param2 = MT_NULL, const MultiType& param3 = MT_NULL,
+           const MultiType& param4 = MT_NULL);
+
+  void cloning(Executor* executor) const;
+
+protected:
+  short                       functorType;      //!< The type of Function we've got (either static or objective).
+  unsigned int                paramCount;       //!< the count of parameters.
+  MultiType                   defaultValue[5];  //!< Default Values.
 };
 
@@ -89,4 +89,5 @@
 
 
+
 ///////////////////////
 // FUNCTION POINTERS //
@@ -232,35 +233,36 @@
 template<class T> class EXECUTOR : public Executor
 {
-  public:
-    EXECUTOR() : Executor() { };
-    // COPY constuctor (virtual version)
-    virtual Executor* clone () const
-    {
-      EXECUTOR<T>* executor = new EXECUTOR<T>();
-      this->cloning(executor);
-      executor->fp = this->fp;
-      return executor;
-    }
-
-//! FUNCTOR_LIST is the List of CommandConstructors
+public:
+  EXECUTOR() : Executor() { };
+  // COPY constuctor (virtual version)
+  virtual Executor* clone () const
+  {
+    EXECUTOR<T>* executor = new EXECUTOR<T>();
+    this->cloning(executor);
+    executor->fp = this->fp;
+    return executor;
+  }
+
+  //! FUNCTOR_LIST is the List of CommandConstructors
 #define FUNCTOR_LIST(x) ExecutorConstructor ## x
 #include "functor_list.h"
 #undef FUNCTOR_LIST
 
-  private:
-//! FUNCTOR_LIST is the List of FunctionPointers
-    union FunctionPointers {
+private:
+  //! FUNCTOR_LIST is the List of FunctionPointers
+  union FunctionPointers {
 #define FUNCTOR_LIST(x) ExecutorFunctionPoiter ## x
 #include "functor_list.h"
 #undef FUNCTOR_LIST
-    } fp;
-
-    virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
-    {
-//! FUNCTOR_LIST is the List of Executive Functions
+  } fp;
+
+  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  {
+    //! FUNCTOR_LIST is the List of Executive Functions
 #define FUNCTOR_LIST(x) ExecutorExecute ## x
 #include "functor_list.h"
 #undef FUNCTOR_LIST
-    }
+
+  }
 };
 
@@ -292,36 +294,37 @@
 template<class T> class ExecutorStatic : public Executor
 {
-  public:
-    EXECUTOR() : Executor() { };
-    // COPY constuctor
-    virtual Executor* clone () const
-    {
-      EXECUTOR<T>* executor = new EXECUTOR<T>();
-      this->cloning(executor);
-      executor->fp = this->fp;
-      return executor;
-    }
-
-//! FUNCTOR_LIST is the List of CommandConstructors
+public:
+  EXECUTOR() : Executor() { };
+  // COPY constuctor
+  virtual Executor* clone () const
+  {
+    EXECUTOR<T>* executor = new EXECUTOR<T>();
+    this->cloning(executor);
+    executor->fp = this->fp;
+    return executor;
+  }
+
+  //! FUNCTOR_LIST is the List of CommandConstructors
 #define FUNCTOR_LIST(x) ExecutorConstructor ## x
 #include "functor_list.h"
 #undef FUNCTOR_LIST
 
-  private:
-//! FUNCTOR_LIST is the List of FunctionPointers
-    union FunctionPointers {
+private:
+  //! FUNCTOR_LIST is the List of FunctionPointers
+  union FunctionPointers {
 #define FUNCTOR_LIST(x) ExecutorFunctionPoiter ## x
 #include "functor_list.h"
 #undef FUNCTOR_LIST
-    } fp;
-
-
-    virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
-    {
-//! FUNCTOR_LIST is the List of Executive Functions
+  } fp;
+
+
+  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  {
+    //! FUNCTOR_LIST is the List of Executive Functions
 #define FUNCTOR_LIST(x) ExecutorExecute ## x
 #include "functor_list.h"
 #undef FUNCTOR_LIST
-    }
+
+  }
 };
 
Index: /trunk/src/lib/util/helper_functions.cc
===================================================================
--- /trunk/src/lib/util/helper_functions.cc	(revision 7713)
+++ /trunk/src/lib/util/helper_functions.cc	(revision 7714)
@@ -101,5 +101,5 @@
  * @return returns the contained string (char-array), if STRING was correct otherwise defaultValue
  */
-std::string isString(const std::string& STRING, const std::string& defaultValue)
+const std::string& isString(const std::string& STRING, const std::string& defaultValue)
 {
   if (STRING.size() > 0)
@@ -124,5 +124,5 @@
   {
     if(::toupper(*it1) != ::toupper(*it2)) //letters differ?
-     // return -1 to indicate smaller than, 1 otherwise
+      // return -1 to indicate smaller than, 1 otherwise
       return (::toupper(*it1)  < ::toupper(*it2)) ? -1 : 1;
     //proceed to the next character in each string
@@ -131,5 +131,5 @@
   }
   size_t size1=s1.size(), size2=s2.size();// cache lengths
-   //return -1,0 or 1 according to strings' lengths
+  //return -1,0 or 1 according to strings' lengths
   if (size1==size2)
     return 0;
@@ -155,5 +155,5 @@
   {
     if(::toupper(*it1) != ::toupper(*it2)) //letters differ?
-     // return -1 to indicate smaller than, 1 otherwise
+      // return -1 to indicate smaller than, 1 otherwise
       return (::toupper(*it1)  < ::toupper(*it2)) ? -1 : 1;
     //proceed to the next character in each string
Index: /trunk/src/lib/util/helper_functions.h
===================================================================
--- /trunk/src/lib/util/helper_functions.h	(revision 7713)
+++ /trunk/src/lib/util/helper_functions.h	(revision 7714)
@@ -18,5 +18,5 @@
 float         isFloat(const std::string& FLOAT, float defaultValue);
 const char*   isCString(const std::string& STRING, const char* defaultValue);
-std::string   isString(const std::string& STRING, const std::string& defaultValue);
+const std::string& isString(const std::string& STRING, const std::string& defaultValue);
 
 
Index: /trunk/src/orxonox.cc
===================================================================
--- /trunk/src/orxonox.cc	(revision 7713)
+++ /trunk/src/orxonox.cc	(revision 7714)
@@ -302,5 +302,6 @@
     NetworkManager::getInstance()->establishConnection(this->serverName, port);
   }
-  else if( this->port > 0) {    // we are a server
+  else if( this->port > 0)
+  {    // we are a server
     State::setOnline(true);
     NetworkManager::getInstance()->createServer(port);
@@ -335,6 +336,6 @@
     PRINTF(1)("The DataDirectory %s could not be verified\n\nh" \
               "!!!  Please Change in File %s Section %s Entry %s to a suitable value !!!\n",
-    ResourceManager::getInstance()->getDataDir().c_str(),
-    this->configFileName.c_str(),
+              ResourceManager::getInstance()->getDataDir().c_str(),
+              this->configFileName.c_str(),
               CONFIG_SECTION_GENERAL,
               CONFIG_NAME_DATADIR );
@@ -413,5 +414,125 @@
 bool showGui = false;
 
-
+/// HACK HACK TEST
+
+
+template<typename type> MT_Type ExecutorParamType() { return MT_EXT1; };
+template<> MT_Type ExecutorParamType<bool>() { return MT_EXT1; };
+template<> MT_Type ExecutorParamType<int>() { return MT_INT; };
+template<> MT_Type ExecutorParamType<unsigned int>() { return MT_UINT; };
+template<> MT_Type ExecutorParamType<float>() { return MT_FLOAT; };
+template<> MT_Type ExecutorParamType<char>() { return MT_CHAR; };
+template<> MT_Type ExecutorParamType<const std::string&>() { return MT_STRING; };
+
+template<typename type> type fromString(const std::string& input, type defaultValue) {return defaultValue; };
+template<> bool fromString<bool>(const std::string& input, bool defaultValue) { return isBool(input, defaultValue); };
+template<> int fromString<int>(const std::string& input, int defaultValue) { return isInt(input, defaultValue); };
+template<> unsigned int fromString<unsigned int>(const std::string& input, unsigned int defaultValue) { return isInt(input, defaultValue); };
+template<> float fromString<float>(const std::string& input, float defaultValue) { return isFloat(input, defaultValue); };
+template<> char fromString<char>(const std::string& input, char defaultValue) { return isInt(input, defaultValue); };
+template<> const std::string& fromString<const std::string&>(const std::string& input, const std::string& defaultValue) { return isString(input, defaultValue); };
+
+template<typename type> type getDefault(const MultiType* const defaultValues, unsigned int i) { return (type)0; };
+template<> bool getDefault<bool>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getBool(); };
+template<> int getDefault<int>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getInt(); };
+template<> unsigned int getDefault<unsigned int>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getInt(); };
+template<> float getDefault<float>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getFloat(); };
+template<> char getDefault<char>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getChar(); };
+template<> std::string getDefault<std::string>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getString(); };
+
+
+template<class T> class Executor0Params : public Executor
+{
+  private:
+    void (T::*functionPointer)();
+
+  public:
+    Executor0Params (void (T::*functionPointer)())
+  : Executor()
+    {
+      this->functorType = Executor_Objective;
+      this->functionPointer = functionPointer;
+    }
+    virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+    {
+      (dynamic_cast<T*>(object)->*functionPointer)();
+    };
+
+    Executor* clone() const {};
+};
+
+
+template<class T, typename type0> class Executor1Params : public Executor
+{
+private:
+  void (T::*functionPointer)(type0);
+
+public:
+  Executor1Params (void (T::*functionPointer)(type0))
+      : Executor(ExecutorParamType<type0>())
+  {
+    this->functorType = Executor_Objective;
+    this->functionPointer = functionPointer;
+  }
+  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  {
+
+    /* // THE VERY COOL DEBUG
+    printf("SUB[0] : %s\n", sub[0].c_str());
+    printf("getDefault<type0>(this->defaultValue, 0):::: %d\n", getDefault<type0>(this->defaultValue, 0));
+    printf("VALUE: %d\n", fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)));
+    */
+    (dynamic_cast<T*>(object)->*functionPointer)( fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)) );
+  };
+
+  virtual Executor* clone() const {};
+};
+
+/// DOUBLE PENETRATION
+template<class T, typename type0, typename type1> class Executor2Params : public Executor
+{
+private:
+  void (T::*functionPointer)(type0, type1);
+
+public:
+  Executor2Params (void (T::*functionPointer)(type0, type1))
+      : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
+  {
+    this->functorType = Executor_Objective;
+    this->functionPointer = functionPointer;
+  }
+  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  {
+    (dynamic_cast<T*>(object)->*functionPointer)(
+      fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)),
+      fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)));
+  };
+
+  virtual Executor* clone() const {};
+};
+
+class TestClass : public BaseObject
+{
+public:
+  TestClass() {};
+
+  void printTest() { printf ("TEST\n"); };
+  void printTestInt(int i) { printf ("%d\n", i); };
+  void printTestBool(bool b) { printf("%d\n", (int)b); };
+  void printTwoVals(bool b, int i) { printf ("%d %d\n", b, i); };
+};
+
+void TEST()
+{
+  TestClass test;
+  SubString testStrings("1, 2, 3", ",", SubString::WhiteSpaces, false);
+  (Executor0Params<TestClass>(&TestClass::printTest))(&test, testStrings);
+  (Executor1Params<TestClass,int>(&TestClass::printTestInt))(&test, testStrings);
+  (Executor1Params<TestClass,bool>(&TestClass::printTestBool))(&test, testStrings);
+  (Executor2Params<TestClass,bool, int>(&TestClass::printTwoVals))(&test, testStrings);
+
+}
+
+//// HACK HACK
 
 /**********************************
@@ -426,4 +547,5 @@
 int main(int argc, char** argv)
 {
+  TEST();
   CmdLinePrefsReader prefs;
 
@@ -444,5 +566,6 @@
   }
   else if ( Preferences::getInstance()->getString("misc", "bt-to-file", "1") == "1" )
-  {      SignalHandler::getInstance()->doCatch( argv[0], GDB_RUN_WRITE_TO_FILE );
+  {
+    SignalHandler::getInstance()->doCatch( argv[0], GDB_RUN_WRITE_TO_FILE );
 
   }
@@ -506,5 +629,5 @@
   // checking for existence of the configuration-files, or if the lock file is still used
   if (showGui || (!File("./orxonox.conf").isFile() &&
-      !File(DEFAULT_CONFIG_FILE).isFile())
+                  !File(DEFAULT_CONFIG_FILE).isFile())
 #if DEBUG < 3 // developers do not need to see the GUI, when orxonox fails
       || ResourceManager::isFile(DEFAULT_LOCK_FILE)
