Index: trunk/src/lib/util/executor/executor.h
===================================================================
--- trunk/src/lib/util/executor/executor.h	(revision 7721)
+++ trunk/src/lib/util/executor/executor.h	(revision 7722)
@@ -77,255 +77,7 @@
 };
 
-///////////////////////////////////////////////////
-///////////////////////////////////////////////////
-
-//////////////////////////
-// COMMAND REGISTRATION //
-//////////////////////////
-// EXECUTOR             can be redefined as Executor or ExecutorStatic
-// EXECUTOREXECUTER     can be redefined too.
-// EXECUTORINCLASS
-// EXECUTORTYPE
-
-
-
-///////////////////////
-// FUNCTION POINTERS //
-///////////////////////
-#define ExecutorFunctionPoiter0() \
-  void EXECUTORINCLASS(*functionPointer_0)();
-
-#define ExecutorFunctionPoiter1(t1) \
-  void EXECUTORINCLASS(*functionPointer_1_##t1)(t1##_TYPE);
-
-#define ExecutorFunctionPoiter2(t1, t2) \
-  void EXECUTORINCLASS(*functionPointer_2_##t1##_##t2)(t1##_TYPE, t2##_TYPE);
-
-
-#define ExecutorFunctionPoiter3(t1, t2, t3) \
-  void EXECUTORINCLASS(*functionPointer_3_##t1##_##t2##_##t3)(t1##_TYPE, t2##_TYPE, t3##_TYPE);
-
-#define ExecutorFunctionPoiter4(t1, t2, t3, t4) \
-  void EXECUTORINCLASS(*functionPointer_4_##t1##_##t2##_##t3##_##t4)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE);
-
-
-#define ExecutorFunctionPoiter5(t1, t2, t3, t4, t5) \
-  void EXECUTORINCLASS(*functionPointer_5_##t1##_##t2##_##t3##_##t4##_##t5)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE);
-
-
-//////////////////
-// CONSTRUCTORS //
-/////////////////
-//! creates a command that takes no parameters
-#define ExecutorConstructor0() \
-  EXECUTOR(void EXECUTORINCLASS(*function)()) \
-  : Executor(0) \
-  { \
-    this->functorType = EXECUTORTYPE; \
-    this->fp.functionPointer_0 = function; \
-  }
-
-//! creates a command that takes one parameter
-#define ExecutorConstructor1(t1) \
-  EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE)) \
-  : Executor(t1##_PARAM) \
-  { \
-    this->functorType = EXECUTORTYPE; \
-    this->fp.functionPointer_1_##t1 = function; \
-  }
-
-//! creates a command that takes two parameters
-#define ExecutorConstructor2(t1,t2) \
-  EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE)) \
-  : Executor(t1##_PARAM, t2##_PARAM) \
-  { \
-    this->functorType = EXECUTORTYPE; \
-    this->fp.functionPointer_2_##t1##_##t2 = function; \
-  }
-
-//! creates a command that takes three parameter
-#define ExecutorConstructor3(t1,t2,t3) \
-  EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE)) \
-  : Executor(t1##_PARAM, t2##_PARAM, t3##_PARAM) \
-  { \
-    this->functorType = EXECUTORTYPE; \
-    this->fp.functionPointer_3_##t1##_##t2##_##t3 = function; \
-  }
-
-//! creates a command that takes four parameter
-#define ExecutorConstructor4(t1,t2,t3,t4) \
-  EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE)) \
-  : Executor(t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM) \
-  { \
-    this->functorType = EXECUTORTYPE; \
-    this->fp.functionPointer_4_##t1##_##t2##_##t3##_##t4 = function; \
-  }
-
-//! creates a command that takes five parameter
-#define ExecutorConstructor5(t1,t2,t3,t4,t5) \
-  EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE)) \
-  : Executor(t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM) \
-  { \
-    this->functorType = EXECUTORTYPE; \
-    this->fp.functionPointer_5_##t1##_##t2##_##t3##_##t4##_##t5 = function; \
-  }
-
-///////////////
-// EXECUTION //
-///////////////
-//! execute-macro for functions with no parameters
-#define ExecutorExecute0() \
-  if (this->paramCount == 0) \
-    EXECUTOREXECUTER(_0)()
-
-//! execute-macro for functions with one parameter
-#define ExecutorExecute1(t1) \
-   else if (this->paramCount == 1 && this->defaultValue[0] == t1##_PARAM) \
-    EXECUTOREXECUTER(_1_##t1)(t1##_FUNC(sub[0], t1##_DEFGRAB(0)))
-
-//! execute-macro for functions with two parameters
-#define ExecutorExecute2(t1,t2) \
-   else if (this->paramCount == 2 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM) \
-    EXECUTOREXECUTER(_2_##t1##_##t2)(t1##_FUNC(sub[0], t1##_DEFGRAB(0)), t2##_FUNC(sub[1], t2##_DEFGRAB(1)))
-
-//! execute-macro for functions with three parameters
-#define ExecutorExecute3(t1,t2,t3) \
-   else if (this->paramCount == 3 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM && this->defaultValue[2] == t3##_PARAM) \
-    EXECUTOREXECUTER(_3_##t1##_##t2##_##t3)(t1##_FUNC(sub[0], t1##_DEFGRAB(0)), t2##_FUNC(sub[1], t2##_DEFGRAB(1)), t3##_FUNC(sub[2], t3##_DEFGRAB(2)))
-
-//! execute-macro for functions with four parameters
-#define ExecutorExecute4(t1,t2,t3,t4) \
-   else if (this->paramCount == 4 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM && this->defaultValue[2] == t3##_PARAM && this->defaultValue[3] == t4##_PARAM) \
-    EXECUTOREXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub[0], t1##_DEFGRAB(0)), t2##_FUNC(sub[1], t2##_DEFGRAB(1)), t3##_FUNC(sub[2], t3##_DEFGRAB(2)), t4##_FUNC(sub[3], t4##_DEFGRAB(3))) \
-
-
-//! execute-macro for functions with five parameters
-#define ExecutorExecute5(t1,t2,t3,t4,t5) \
-   else if (this->paramCount == 5 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM && this->defaultValue[2] == t3##_PARAM && this->defaultValue[3] == t4##_PARAM && this->defaultValue[4] == t5##_PARAM) \
-    EXECUTOREXECUTER(_5_##t1##_##t2##_##t3##_##t4##_##t5)(t1##_FUNC(sub[0], t1##_DEFGRAB(0)), t2##_FUNC(sub[1], t2##_DEFGRAB(1)), t3##_FUNC(sub[2], t3##_DEFGRAB(2)), t4##_FUNC(sub[3], t4##_DEFGRAB(3)), t5##_FUNC(sub[4], t5##_DEFGRAB(4)))
-
-
-
-
-/////////////////////
-// DYNAMIC FUNCTOR //
-/////////////////////
-#ifdef FUNCTOR_LIST
-#undef FUNCTOR_LIST
-#endif
-#ifdef EXECUTOR
-#undef EXECUTOR
-#endif
-#define EXECUTOR                       ExecutorObjective
-#ifdef EXECUTOREXECUTER
-#undef EXECUTOREXECUTER
-#endif
-#define EXECUTOREXECUTER(nameExt)      (dynamic_cast<T*>(object)->*(fp.functionPointer##nameExt))
-#ifdef EXECUTORINCLASS
-#undef EXECUTORINCLASS
-#endif
-#define EXECUTORINCLASS(FUNCTION)      (T::FUNCTION)
-#ifdef EXECUTORTYPE
-#undef EXECUTORTYPE
-#endif
-#define EXECUTORTYPE                   Executor_Objective
-//! keeps information about a Executor
-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
-#define FUNCTOR_LIST(x) ExecutorConstructor ## x
-#include "functor_list.h"
-#undef FUNCTOR_LIST
-
-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
-#define FUNCTOR_LIST(x) ExecutorExecute ## x
-#include "functor_list.h"
-#undef FUNCTOR_LIST
-
-  }
-};
-
-
-////////////////////
-// STATIC FUNCTOR //
-////////////////////
-#ifdef FUNCTOR_LIST
-#undef FUNCTOR_LIST
-#endif
-#ifdef EXECUTOR
-#undef EXECUTOR
-#endif
-#define EXECUTOR                      ExecutorStatic
-#ifdef EXECUTOREXECUTER
-#undef EXECUTOREXECUTER
-#endif
-#define EXECUTOREXECUTER(nameExt)     fp.functionPointer##nameExt
-#ifdef EXECUTORINCLASS
-#undef EXECUTORINCLASS
-#endif
-#define EXECUTORINCLASS(FUNCTION)     (FUNCTION)
-#ifdef EXECUTORTYPE
-#undef EXECUTORTYPE
-#endif
-#define EXECUTORTYPE                   Executor_Static
-
-//! keeps information about a Executor, that points to a Static Function
-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
-#define FUNCTOR_LIST(x) ExecutorConstructor ## x
-#include "functor_list.h"
-#undef FUNCTOR_LIST
-
-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
-#define FUNCTOR_LIST(x) ExecutorExecute ## x
-#include "functor_list.h"
-#undef FUNCTOR_LIST
-
-  }
-};
+#include "executor/executor_functional.h"
+#define EXECUTOR_FUNCTIONAL_USE_STATIC
+#include "executor/executor_functional.h"
 
 #endif /* _EXECUTOR_H */
Index: trunk/src/lib/util/executor/executor_functional.h
===================================================================
--- trunk/src/lib/util/executor/executor_functional.h	(revision 7721)
+++ trunk/src/lib/util/executor/executor_functional.h	(revision 7722)
@@ -23,6 +23,4 @@
 #define __EXECUTOR_FUNCTIONAL_H_
 
-#include "base_object.h"
-#include "multi_type.h"
 #include "executor.h"
 
