Index: /trunk/src/lib/util/executor/executor.cc
===================================================================
--- /trunk/src/lib/util/executor/executor.cc	(revision 7196)
+++ /trunk/src/lib/util/executor/executor.cc	(revision 7197)
@@ -31,10 +31,4 @@
 // SHELL COMMAND BASE //
 ////////////////////////
-// empty constructor
-Executor::Executor()
-{
-  this->defaultValue = NULL;
-}
-
 /**
  * constructs and registers a new Command
@@ -43,23 +37,33 @@
  * @param paramCount the count of parameters this command takes
  */
-Executor::Executor(unsigned int paramCount, ...)
+Executor::Executor(const MultiType& param0,
+                   const MultiType& param1,
+                   const MultiType& param2,
+                   const MultiType& param3,
+                   const MultiType& param4)
 {
   this->setClassID(CL_EXECUTOR, "Executor");
 
-  if (paramCount > FUNCTOR_MAX_ARGUMENTS)
-    paramCount = FUNCTOR_MAX_ARGUMENTS;
-  // reading in Parameters.
-  this->paramCount = paramCount;
-  this->defaultValue = new MultiType[paramCount];
 
-  va_list parameterList;
-  va_start(parameterList, paramCount);
+  // What Parameters have we got
+  this->defaultValue[0] = param0;
+  this->defaultValue[1] = param1;
+  this->defaultValue[2] = param2;
+  this->defaultValue[3] = param3;
+  this->defaultValue[4] = param4;
 
-  // What Parameters we have got
-  for (unsigned int i = 0; i < paramCount; i++)
+  for (unsigned int i = 0; i < FUNCTOR_MAX_ARGUMENTS; i++)
   {
-    int type = va_arg(parameterList, int);
-    this->defaultValue[i].setType((MT_Type)type);
+    printf("%d ", i);
+    if (this->defaultValue[i] == MT_NULL)
+    {
+      this->paramCount = i;
+      break;
+    }
+
   }
+  printf("%d\n", this->paramCount);
+
+  assert (paramCount <= FUNCTOR_MAX_ARGUMENTS);
 }
 
@@ -68,7 +72,5 @@
  */
 Executor::~Executor()
-{
-  delete[] this->defaultValue;
-}
+{}
 
 /**
@@ -79,10 +81,6 @@
   executor->functorType  = this->functorType;
   executor->paramCount   = this->paramCount;
-  executor->defaultValue = new MultiType[this->paramCount];
   for (unsigned int i = 0; i < this->paramCount; i++)
-  {
     executor->defaultValue[i] =  this->defaultValue[i];
-//    printf("1: %s 2: %s\n", MultiType::MultiTypeToString(this->defaultValue[i].getType()),  MultiType::MultiTypeToString(executor->defaultValue[i].getType()));
-  }
 }
 
@@ -132,13 +130,13 @@
         this->defaultValue[i].setInt(va_arg(values, int));
         break;
-/*      case MT_UINT:
-        this->defaultValue[i].setInt((int)va_arg(values, unsigned int));
-        break;*/
+        /*      case MT_UINT:
+                this->defaultValue[i].setInt((int)va_arg(values, unsigned int));
+                break;*/
       case MT_FLOAT:
         this->defaultValue[i].setFloat(va_arg(values, double));
         break;
-/*      case MT_LONG:
-        this->defaultValue[i].setInt((int) va_arg(values, long));
-        break;*/
+        /*      case MT_LONG:
+                this->defaultValue[i].setInt((int) va_arg(values, long));
+                break;*/
       default:
         break;
@@ -153,25 +151,25 @@
 void Executor::debug()
 {
-/*  tIterator<ExecutorClass>* iteratorCL = ExecutorClass::commandClassList->getIterator();
-  ExecutorClass* elemCL = iteratorCL->firstElement();
-  while(elemCL != NULL)
-  {
-    PRINT(0)("Class:'%s' registered %d commands: \n", elemCL->className, elemCL->commandList->getSize());
-    tIterator<Executor>* iterator = elemCL->commandList->getIterator();
-    const Executor* elem = iterator->firstElement();
-    while(elem != NULL)
+  /*  tIterator<ExecutorClass>* iteratorCL = ExecutorClass::commandClassList->getIterator();
+    ExecutorClass* elemCL = iteratorCL->firstElement();
+    while(elemCL != NULL)
     {
-      PRINT(0)("  command:'%s' : params:%d: ", elem->getName(), elem->paramCount);
-      for (unsigned int i = 0; i< elem->paramCount; i++)
-       printf("%s ", Executor::paramToString(elem->parameters[i]));
-      if (elem->description != NULL)
-       printf("- %s", elem->description);
-      printf("\n");
+      PRINT(0)("Class:'%s' registered %d commands: \n", elemCL->className, elemCL->commandList->getSize());
+      tIterator<Executor>* iterator = elemCL->commandList->getIterator();
+      const Executor* elem = iterator->firstElement();
+      while(elem != NULL)
+      {
+        PRINT(0)("  command:'%s' : params:%d: ", elem->getName(), elem->paramCount);
+        for (unsigned int i = 0; i< elem->paramCount; i++)
+         printf("%s ", Executor::paramToString(elem->parameters[i]));
+        if (elem->description != NULL)
+         printf("- %s", elem->description);
+        printf("\n");
 
-      elem = iterator->nextElement();
+        elem = iterator->nextElement();
+      }
+      delete iterator;
+      elemCL = iteratorCL->nextElement();
     }
-    delete iterator;
-    elemCL = iteratorCL->nextElement();
-  }
-  delete iteratorCL;*/
+    delete iteratorCL;*/
 }
Index: /trunk/src/lib/util/executor/executor.h
===================================================================
--- /trunk/src/lib/util/executor/executor.h	(revision 7196)
+++ /trunk/src/lib/util/executor/executor.h	(revision 7197)
@@ -1,5 +1,5 @@
 /*!
  * @file executor.h
- * Definition of a on-screen-shell
+ * Definition of an Executor
  */
 
@@ -16,7 +16,4 @@
 #include <stdarg.h>
 
-// FORWARD DECLARATION
-template<class T> class tList;
-
 //! an enumerator for the definition of the Type.
 typedef enum {
@@ -30,5 +27,15 @@
 // BASE CLASS //
 ////////////////
-//! a baseClass for all possible Executors
+//! a BaseClass for all possible Executors
+/**
+ * An Executor is an Object, that is able to call Objects of Any type (class)
+ * and execute a function with given parameters on it.
+ *
+ * The Executor is able to handle:
+ *  Objects of any Class (Templated)
+ *  Default Values
+ *  Functions with up to 5 parameters (more seems useless)
+ *  Functions with many types (see functor_list.h)
+ */
 class Executor: public BaseObject
 {
@@ -52,15 +59,16 @@
 
   protected:
-    Executor();
-    Executor(unsigned int paramCount, ...);
+    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;
-
-//    const SubString& getSubString(const char* string) const { return SubString(string); };
 
   protected:
     long                        functorType;      //!< The type of Function we've got (either static or objective).
     unsigned int                paramCount;       //!< the count of parameters.
-    MultiType*                  defaultValue;     //!< Default Values.
+    MultiType                   defaultValue[5];  //!< Default Values.
 };
 
@@ -132,5 +140,5 @@
 #define ExecutorConstructor1(t1) \
   EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE)) \
-  : Executor(1, t1##_PARAM) \
+  : Executor(t1##_PARAM) \
   { \
     this->functorType = EXECUTORTYPE; \
@@ -141,5 +149,5 @@
 #define ExecutorConstructor2(t1,t2) \
   EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE)) \
-  : Executor(2, t1##_PARAM, t2##_PARAM) \
+  : Executor(t1##_PARAM, t2##_PARAM) \
   { \
     this->functorType = EXECUTORTYPE; \
@@ -150,5 +158,5 @@
 #define ExecutorConstructor3(t1,t2,t3) \
   EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE)) \
-  : Executor(3, t1##_PARAM, t2##_PARAM, t3##_PARAM) \
+  : Executor(t1##_PARAM, t2##_PARAM, t3##_PARAM) \
   { \
     this->functorType = EXECUTORTYPE; \
@@ -159,5 +167,5 @@
 #define ExecutorConstructor4(t1,t2,t3,t4) \
   EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE)) \
-  : Executor(4, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM) \
+  : Executor(t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM) \
   { \
     this->functorType = EXECUTORTYPE; \
@@ -168,5 +176,5 @@
 #define ExecutorConstructor5(t1,t2,t3,t4,t5) \
   EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE)) \
-  : Executor(5, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM) \
+  : Executor(t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM) \
   { \
     this->functorType = EXECUTORTYPE; \
Index: /trunk/src/lib/util/executor/executor_specials.h
===================================================================
--- /trunk/src/lib/util/executor/executor_specials.h	(revision 7196)
+++ /trunk/src/lib/util/executor/executor_specials.h	(revision 7197)
@@ -29,5 +29,5 @@
      */
     ExecutorXML(void(T::*function)(const TiXmlElement*), const TiXmlElement* root, const char* paramName)
-      : Executor(1, MT_EXT1)
+      : Executor(MT_EXT1)
     {
       PRINTF(4)("Loading %s from XML-element %p\n", paramName, root);
Index: /trunk/src/lib/util/multi_type.cc
===================================================================
--- /trunk/src/lib/util/multi_type.cc	(revision 7196)
+++ /trunk/src/lib/util/multi_type.cc	(revision 7197)
@@ -33,7 +33,8 @@
  * creates a multiType without any stored value at all.
  */
-MultiType::MultiType()
-{
-  this->init();
+MultiType::MultiType(MT_Type type)
+{
+  this->init();
+  this->type = type;
 }
 /**
@@ -274,5 +275,5 @@
   else if (this->type & MT_FLOAT) return (this->value.Float == 0.0f)? false : true;
   else if (this->type & MT_CHAR) return (this->value.Char == '\0')? false : true;
-  else if (this->type & MT_STRING) return (!strncmp(this->value.String, "true", 4) || !strncmp(this->value.String, "TRUE", 4) || !strncmp(this->value.String, "1", 1))? true : false; //! @TODO make this better.
+  else if (this->type & MT_STRING && this->value.String != NULL) return (!strncmp(this->value.String, "true", 4) || !strncmp(this->value.String, "TRUE", 4) || !strncmp(this->value.String, "1", 1))? true : false; //! @TODO make this better.
 
   return false;
@@ -290,5 +291,5 @@
   else if (this->type & MT_FLOAT) return (int) this->value.Float;
   else if (this->type & MT_CHAR) return (int) this->value.Char;
-  else if (this->type & MT_STRING) {
+  else if (this->type & MT_STRING && this->value.String != NULL) {
     char* endPtr = NULL;
     int result = strtol(this->value.String, &endPtr, 10);
@@ -313,5 +314,5 @@
   else if (this->type & MT_INT) return (float) this->value.Int;
   else if (this->type & MT_CHAR) return (float) this->value.Char;
-  else if (this->type & MT_STRING) {
+  else if (this->type & MT_STRING && this->value.String != NULL) {
     char* endPtr = NULL;
     double result = strtod(this->value.String, &endPtr);
@@ -337,5 +338,5 @@
   else if (this->type & MT_INT) return (int) this->value.Int;
   else if (this->type & MT_FLOAT) return (char) this->value.Float;
-  else if (this->type & MT_STRING) return *this->value.String;
+  else if (this->type & MT_STRING && this->value.String != NULL) return *this->value.String;
 
   return '\0';
Index: /trunk/src/lib/util/multi_type.h
===================================================================
--- /trunk/src/lib/util/multi_type.h	(revision 7196)
+++ /trunk/src/lib/util/multi_type.h	(revision 7197)
@@ -32,5 +32,5 @@
 class MultiType {
   public:
-    MultiType();
+    MultiType(MT_Type type = MT_NULL);
     MultiType(bool value);
     MultiType(int value);
