Index: trunk/src/lib/util/executor/executor.cc
===================================================================
--- trunk/src/lib/util/executor/executor.cc	(revision 5632)
+++ trunk/src/lib/util/executor/executor.cc	(revision 5633)
@@ -47,6 +47,6 @@
   if (paramCount > FUNCTOR_MAX_ARGUMENTS)
     paramCount = FUNCTOR_MAX_ARGUMENTS;
+  // reading in Parameters.
   this->paramCount = paramCount;
-  this->parameters = new unsigned int[paramCount];
   this->defaultValue = new MultiType[paramCount];
 
@@ -56,5 +56,5 @@
   // What Parameters we have got
   for (unsigned int i = 0; i < paramCount; i++)
-    this->parameters[i] = va_arg(parameterList, int);
+    this->defaultValue[i].setType(va_arg(parameterList, int));
 }
 
@@ -64,5 +64,4 @@
 Executor::~Executor()
 {
-  delete[] this->parameters;
   delete[] this->defaultValue;
 }
@@ -106,29 +105,27 @@
   for (unsigned int i = 0; i < count; i++)
   {
-
-
-    switch (this->parameters[i])
+    switch (this->defaultValue[i].getType())
     {
-      case ParameterBool:
+      case MT_BOOL:
         this->defaultValue[i].setInt(va_arg(defaultList, int));
         break;
-      case ParameterChar:
+      case MT_CHAR:
         this->defaultValue[i].setChar((char)va_arg(defaultList, int));
         break;
-      case ParameterString:
+      case MT_STRING:
         this->defaultValue[i].setString(va_arg(defaultList, char*));
         break;
-      case ParameterInt:
+      case MT_INT:
         this->defaultValue[i].setInt(va_arg(defaultList, int));
         break;
-      case ParameterUInt:
+/*      case MT_UINT:
         this->defaultValue[i].setInt((int)va_arg(defaultList, unsigned int));
-        break;
-      case ParameterFloat:
+        break;*/
+      case MT_FLOAT:
         this->defaultValue[i].setFloat(va_arg(defaultList, double));
         break;
-      case ParameterLong:
+/*      case MT_LONG:
         this->defaultValue[i].setInt((int) va_arg(defaultList, long));
-        break;
+        break;*/
       default:
         break;
Index: trunk/src/lib/util/executor/executor.h
===================================================================
--- trunk/src/lib/util/executor/executor.h	(revision 5632)
+++ trunk/src/lib/util/executor/executor.h	(revision 5633)
@@ -37,6 +37,7 @@
     Executor* defaultValues(unsigned int count, ...);
 
-    /** @returns the CommandList of the Shell */
-    static void unregisterCommand(const char* commandName, const char* className);
+    /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
+    virtual void execute (BaseObject* object, const char* parameters) = 0;
+
 
     static void debug();
@@ -49,16 +50,7 @@
     inline Executor_Type getType() { return this->functorType; };
 
-    static bool isRegistered(const char* commandName, const char* className, unsigned int paramCount, ...);
-    static const char* paramToString(long parameter);
-
-  private:
-    /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
-    virtual void executeCommand (BaseObject* object, const char* parameters) = 0;
-
   protected:
     Executor_Type                    functorType;                          //!< The type of Function we've got (either static or objective).
-    void*                            functionPointer;                      //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
     unsigned int                     paramCount;                           //!< the count of parameters.
-    unsigned int*                    parameters;                           //!< Parameters the function of this Command takes.
     MultiType*                       defaultValue;                         //!< Default Values.
 
@@ -93,57 +85,4 @@
 // EXECUTORINCLASS
 // EXECUTORTYPE
-//! registers a command without any parameters
-#define ExecutorRegister0() \
-  static EXECUTOR<T>* registerCommand(const char* commandName, const char* className, void EXECUTORINCLASS(*function)()) \
-  { \
-    if (isRegistered(commandName, className, 0)== true) \
-      return NULL; \
-    return new EXECUTOR<T>(commandName, className, function); \
-  }
-
-//! registers a command with 1 parameter
-#define ExecutorRegister1(t1) \
-  static EXECUTOR<T>* registerCommand(const char* commandName, const char* className, void EXECUTORINCLASS(*function)(t1##_TYPE)) \
-  { \
-    if (isRegistered(commandName, className, 1, t1##_PARAM)== true) \
-      return NULL; \
-    return new EXECUTOR<T>(commandName, className, function); \
-  }
-
-//! registers a command with 2 parameters
-#define ExecutorRegister2(t1,t2) \
-  static EXECUTOR<T>* registerCommand(const char* commandName, const char* className, void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE)) \
-  { \
-    if (isRegistered(commandName, className, 2, t1##_PARAM, t2##_PARAM)== true) \
-      return NULL; \
-    return new EXECUTOR<T>(commandName, className, function); \
-  }
-
-//! registers a command with 3 parameters
-#define ExecutorRegister3(t1,t2,t3) \
-  static EXECUTOR<T>* registerCommand(const char* commandName, const char* className, void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE)) \
-  { \
-    if (isRegistered(commandName, className, 3, t1##_PARAM, t2##_PARAM, t3##_PARAM)== true) \
-      return NULL; \
-    return new EXECUTOR<T>(commandName, className, function); \
-  }
-
-//! registers a command with 4 parameters
-#define ExecutorRegister4(t1,t2,t3,t4) \
-  static EXECUTOR<T>* registerCommand(const char* commandName, const char* className, void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE)) \
-  { \
-    if (isRegistered(commandName, className, 4, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM)== true) \
-      return NULL; \
-    return new EXECUTOR<T>(commandName, className, function); \
-  }
-
-//! registers a command with 5 parameters
-#define ExecutorRegister5(t1,t2,t3,t4,t5) \
-  static EXECUTOR<T>* registerCommand(const char* commandName, const char* className, void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE)) \
-  { \
-    if (isRegistered(commandName, className, 5, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM)== true) \
-      return NULL; \
-    return new EXECUTOR<T>(commandName, className, function); \
-  }
 
 ///////////////////////
@@ -238,25 +177,25 @@
 //! execute-macro for functions with one parameter
 #define ExecutorExecute1(t1) \
-   else if (this->paramCount == 1 && this->parameters[0] == t1##_PARAM) \
+   else if (this->paramCount == 1 && this->defaultValue[0].getType() == t1##_PARAM) \
     EXECUTOREXECUTER(_1_##t1)(t1##_FUNC(parameters, t1##_DEFGRAB(0)))
 
 //! execute-macro for functions with two parameters
 #define ExecutorExecute2(t1,t2) \
-   else if (this->paramCount == 2 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM) \
+   else if (this->paramCount == 2 && this->defaultValue[0].getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM) \
     EXECUTOREXECUTER(_2_##t1##_##t2)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)))
 
 //! execute-macro for functions with three parameters
 #define ExecutorExecute3(t1,t2,t3) \
-   else if (this->paramCount == 3 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM && this->parameters[2] == t3##_PARAM) \
+   else if (this->paramCount == 3 && this->defaultValue[0].getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType() == t3##_PARAM) \
     EXECUTOREXECUTER(_3_##t1##_##t2##_##t3)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)))
 
 //! execute-macro for functions with four parameters
 #define ExecutorExecute4(t1,t2,t3,t4) \
-   else if (this->paramCount == 4 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM && this->parameters[2] == t3##_PARAM && this->parameters[3] == t4##_PARAM) \
+   else if (this->paramCount == 4 && this->defaultValue[0].getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType() == t3##_PARAM && this->defaultValue[3].getType() == t4##_PARAM) \
     EXECUTOREXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3)))
 
 //! execute-macro for functions with five parameters
 #define ExecutorExecute5(t1,t2,t3,t4,t5) \
-   else if (this->paramCount == 5 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM && this->parameters[2] == t3##_PARAM && this->parameters[3] == t4##_PARAM && this->parameters[4] == t5##_PARAM) \
+   else if (this->paramCount == 5 && this->defaultValue[0].getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType() == t3##_PARAM && this->defaultValue[3].getType() == t4##_PARAM && this->defaultValue[4].getType() == t5##_PARAM) \
     EXECUTOREXECUTER(_5_##t1##_##t2##_##t3##_##t4##_##t5)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3)), t5##_FUNC(sub.getString(4), t5##_DEFGRAB(4)))
 
@@ -268,32 +207,32 @@
 // 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 ExecutorObjective : public Executor
 {
+
   public:
-#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
-//! FUNCTOR_LIST is the List of command-registerers
-#define FUNCTOR_LIST(x) ExecutorRegister ## x
-#include "functor_list.h"
-#undef FUNCTOR_LIST
-
+//! FUNCTOR_LIST is the List of CommandConstructors
+#define FUNCTOR_LIST(x) ExecutorConstructor ## x
+#include "functor_list.h"
+#undef FUNCTOR_LIST
 
   private:
@@ -305,10 +244,5 @@
     } fp;
 
-//! FUNCTOR_LIST is the List of CommandConstructors
-#define FUNCTOR_LIST(x) ExecutorConstructor ## x
-#include "functor_list.h"
-#undef FUNCTOR_LIST
-
-    virtual void executeCommand (BaseObject* object, const char* parameters)
+    virtual void execute (BaseObject* object, const char* parameters)
     {
       SubString sub(parameters, true);
@@ -321,34 +255,33 @@
 
 
-
 ////////////////////
 // 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:
-#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
-
-//! FUNCTOR_LIST is the List of command-registerers
-#define FUNCTOR_LIST(x) ExecutorRegister ## x
+//! FUNCTOR_LIST is the List of CommandConstructors
+#define FUNCTOR_LIST(x) ExecutorConstructor ## x
 #include "functor_list.h"
 #undef FUNCTOR_LIST
@@ -362,8 +295,4 @@
     } fp;
 
-//! FUNCTOR_LIST is the List of CommandConstructors
-#define FUNCTOR_LIST(x) ExecutorConstructor ## x
-#include "functor_list.h"
-#undef FUNCTOR_LIST
 
     virtual void executeCommand (BaseObject* object, const char* parameters)
