Index: branches/new_class_id/src/lib/util/executor/executor_functional.h
===================================================================
--- branches/new_class_id/src/lib/util/executor/executor_functional.h	(revision 9730)
+++ branches/new_class_id/src/lib/util/executor/executor_functional.h	(revision 9731)
@@ -58,11 +58,14 @@
  * @param default The default Values.
  */
-template<typename type, int index> type Evaluate(const SubString& sub, const MultiType* const defaults)
-{
-  return (sub.size() > index) ?
-      fromString<type>(sub[index], getDefault<type>(defaults, index)) :
-      fromMulti<type>(defaults[index]);
-};
-
+template<typename FromType, typename ToType, int index> class ExecutorEvaluater
+{
+public:
+  ToType operator()(FromType& sub, const MultiType* const defaults)
+  {
+    return (sub.size() > index) ?
+           fromString<ToType>(sub[index], getDefault<ToType>(defaults, index)) :
+           fromMulti<ToType>(defaults[index]);
+  }
+};
 
 #endif /* __EXECUTOR_FUNCTIONAL_H_ */
@@ -77,6 +80,6 @@
 #define __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER   T::*functionPointer
 
-#ifdef EXECUTOR_FUNCTIONAL_USE_CONST
- #ifdef __EXECUTOR_FUNCTIONAL_CONST_INCLUDED
+#ifdef EXECUTOR_FUNCTIONAL_USE_CONST            //! USING CONST FUNCTIONALS
+ #ifdef __EXECUTOR_FUNCTIONAL_CONST_INCLUDED    //!< CHECK IF ALREADY INCLUED CONST FUNCTIONALS
   #define __EXECUTOR_FUNCTIONAL_NOT_INCLUDE_THIS
  #else
@@ -122,5 +125,6 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions without any parameters.
-template<class T> class __EXECUTOR_FUNCTIONAL_NAME(0) : public Executor<const SubString>
+template<class T, typename CallType, template<typename, typename, int> class Evaluater = ExecutorEvaluater>
+class __EXECUTOR_FUNCTIONAL_NAME(0) :public Executor<CallType>
 {
 private:
@@ -134,5 +138,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(0) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST )
-      : Executor<const SubString>(false)
+      : Executor<CallType>(false)
   {
     this->functorType = Executor_Objective;
@@ -145,5 +149,5 @@
    * @param sub the SubString to get the Parameters from.
    */
-  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  virtual void operator()(BaseObject* object, CallType& sub = SubString()) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)();
@@ -154,7 +158,7 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor<const SubString>* clone() const
-  {
-    return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(this->functionPointer);
+  virtual Executor<CallType>* clone() const
+  {
+    return new __EXECUTOR_FUNCTIONAL_NAME(0)<T, CallType>(this->functionPointer);
   };
 };
@@ -166,5 +170,6 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with one parameter.
-template<class T, typename type0> class __EXECUTOR_FUNCTIONAL_NAME(1) : public Executor<const SubString>
+template<class T, typename CallType, typename type0, template<typename, typename, int> class Evaluater = ExecutorEvaluater>
+class __EXECUTOR_FUNCTIONAL_NAME(1) : public Executor<CallType>
 {
 private:
@@ -178,5 +183,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(1) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor<const SubString>(false, ExecutorParamType<type0>())
+      : Executor<CallType>(false, ExecutorParamType<type0>())
   {
     this->functorType = Executor_Objective;
@@ -189,8 +194,8 @@
    * @param sub the SubString to get the Parameters from.
    */
-  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  virtual void operator()(BaseObject* object, CallType& sub = SubString()) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
-      Evaluate<type0, 0>(sub, this->defaultValue));
+      Evaluater<CallType, type0, 0>()(sub, this->defaultValue));
   };
 
@@ -199,7 +204,7 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor<const SubString>* clone() const
-  {
-    return  new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0>(this->functionPointer);
+  virtual Executor<CallType>* clone() const
+  {
+    return  new __EXECUTOR_FUNCTIONAL_NAME(1)<T, CallType, type0>(this->functionPointer);
   };
 };
@@ -209,5 +214,6 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with two parameters.
-template<class T, typename type0, typename type1> class __EXECUTOR_FUNCTIONAL_NAME(2) : public Executor<const SubString>
+template<class T, typename CallType, typename type0, typename type1, template<typename, typename, int> class Evaluater = ExecutorEvaluater>
+class __EXECUTOR_FUNCTIONAL_NAME(2) : public Executor<CallType>
 {
 private:
@@ -221,5 +227,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(2) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>())
+      : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>())
   {
     this->functorType = Executor_Objective;
@@ -232,9 +238,9 @@
    * @param sub the SubString to get the Parameters from.
    */
-  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  virtual void operator()(BaseObject* object, CallType& sub = SubString()) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
-      Evaluate<type0, 0>(sub, this->defaultValue),
-      Evaluate<type1, 1>(sub, this->defaultValue));
+      Evaluater<CallType, type0, 0>()(sub, this->defaultValue),
+      Evaluater<CallType, type1, 1>()(sub, this->defaultValue));
   };
 
@@ -243,7 +249,7 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor<const SubString>* clone() const
-  {
-    return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0, type1>(this->functionPointer);
+  virtual Executor<CallType>* clone() const
+  {
+    return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, CallType, type0, type1>(this->functionPointer);
   };
 };
@@ -254,5 +260,6 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with three parameters.
-template<class T, typename type0, typename type1, typename type2> class __EXECUTOR_FUNCTIONAL_NAME(3) : public Executor<const SubString>
+template<class T, typename CallType, typename type0, typename type1, typename type2, template<typename, typename, int> class Evaluater = ExecutorEvaluater>
+class __EXECUTOR_FUNCTIONAL_NAME(3) : public Executor<CallType>
 {
 private:
@@ -266,5 +273,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(3) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
+      : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
   {
     this->functorType = Executor_Objective;
@@ -277,10 +284,10 @@
    * @param sub the SubString to get the Parameters from.
    */
-  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  virtual void operator()(BaseObject* object, CallType& sub = SubString()) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
-      Evaluate<type0, 0>(sub, this->defaultValue),
-      Evaluate<type1, 1>(sub, this->defaultValue),
-      Evaluate<type2, 2>(sub, this->defaultValue));
+      Evaluater<CallType, type0, 0>()(sub, this->defaultValue),
+      Evaluater<CallType, type1, 1>()(sub, this->defaultValue),
+      Evaluater<CallType, type2, 2>()(sub, this->defaultValue));
   };
 
@@ -289,7 +296,7 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor<const SubString>* clone() const
-  {
-    return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0, type1, type2>(this->functionPointer);
+  virtual Executor<CallType>* clone() const
+  {
+    return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, CallType, type0, type1, type2>(this->functionPointer);
   };
 };
@@ -301,5 +308,6 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with four parameters.
-template<class T, typename type0, typename type1, typename type2, typename type3> class __EXECUTOR_FUNCTIONAL_NAME(4) : public Executor<const SubString>
+template<class T, typename CallType, typename type0, typename type1, typename type2, typename type3, template<typename, typename, int> class Evaluater = ExecutorEvaluater>
+class __EXECUTOR_FUNCTIONAL_NAME(4) : public Executor<CallType>
 {
 private:
@@ -313,5 +321,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(4) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
+      : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
   {
     this->functorType = Executor_Objective;
@@ -324,11 +332,11 @@
   * @param sub the SubString to get the Parameters from.
    */
-  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  virtual void operator()(BaseObject* object, CallType& sub = SubString()) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
-      Evaluate<type0, 0>(sub, this->defaultValue),
-      Evaluate<type1, 1>(sub, this->defaultValue),
-      Evaluate<type2, 2>(sub, this->defaultValue),
-      Evaluate<type3, 3>(sub, this->defaultValue));
+      Evaluater<CallType, type0, 0>()(sub, this->defaultValue),
+      Evaluater<CallType, type1, 1>()(sub, this->defaultValue),
+      Evaluater<CallType, type2, 2>()(sub, this->defaultValue),
+      Evaluater<CallType, type3, 3>()(sub, this->defaultValue));
   };
 
@@ -337,7 +345,7 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor<const SubString>* clone() const
-  {
-    return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0, type1, type2, type3>(this->functionPointer);
+  virtual Executor<CallType>* clone() const
+  {
+    return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, CallType, type0, type1, type2, type3>(this->functionPointer);
   };
 };
@@ -349,5 +357,6 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with five parameters.
-template<class T, typename type0, typename type1, typename type2, typename type3, typename type4> class __EXECUTOR_FUNCTIONAL_NAME(5) : public Executor<const SubString>
+template<class T, typename CallType, typename type0, typename type1, typename type2, typename type3, typename type4, template<typename, typename, int> class Evaluater = ExecutorEvaluater>
+class __EXECUTOR_FUNCTIONAL_NAME(5) : public Executor<CallType>
 {
 private:
@@ -361,5 +370,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(5) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())
+      : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())
   {
     this->functorType = Executor_Objective;
@@ -372,12 +381,12 @@
   * @param sub the SubString to get the Parameters from.
    */
-  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
+  virtual void operator()(BaseObject* object, CallType& sub = SubString()) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
-      Evaluate<type0, 0>(sub, this->defaultValue),
-      Evaluate<type1, 1>(sub, this->defaultValue),
-      Evaluate<type2, 2>(sub, this->defaultValue),
-      Evaluate<type3, 3>(sub, this->defaultValue),
-      Evaluate<type4, 4>(sub, this->defaultValue));
+      Evaluater<CallType, type0, 0>()(sub, this->defaultValue),
+      Evaluater<CallType, type1, 1>()(sub, this->defaultValue),
+      Evaluater<CallType, type2, 2>()(sub, this->defaultValue),
+      Evaluater<CallType, type3, 3>()(sub, this->defaultValue),
+      Evaluater<CallType, type4, 4>()(sub, this->defaultValue));
   };
 
@@ -386,12 +395,21 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor<const SubString>* clone() const
-  {
-    return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, type0, type1, type2, type3, type4>(this->functionPointer);
-  };
-};
-
-
-
+  virtual Executor<CallType>* clone() const
+  {
+    return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, CallType, type0, type1, type2, type3, type4>(this->functionPointer);
+  };
+};
+
+
+
+
+
+
+
+
+
+// // // // // // // // // // // // //
+//// EXTENSION TO HIDE CONSTRUCT /////
+// // // // // // // // // // // // //
 /**
  * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all)
@@ -400,5 +418,5 @@
 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \
 { \
-  return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(functionPointer); \
+  return new __EXECUTOR_FUNCTIONAL_NAME(0)<T, const SubString>(functionPointer); \
 }
 
@@ -410,5 +428,5 @@
 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
-  return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0##_TYPE>(functionPointer); \
+  return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, const SubString, type0##_TYPE>(functionPointer); \
 }
 
@@ -421,5 +439,5 @@
 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
-  return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0##_TYPE, type1##_TYPE>(functionPointer); \
+  return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, const SubString, type0##_TYPE, type1##_TYPE>(functionPointer); \
 }
 
@@ -433,5 +451,5 @@
 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
-  return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE>(functionPointer); \
+  return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, const SubString, type0##_TYPE, type1##_TYPE, type2##_TYPE>(functionPointer); \
 }
 
@@ -446,5 +464,5 @@
 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
-  return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE>(functionPointer); \
+  return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, const SubString, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE>(functionPointer); \
 }
 
@@ -460,5 +478,5 @@
 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
-    return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE>(functionPointer); \
+    return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, const SubString, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE>(functionPointer); \
 }
 
