Index: trunk/src/lib/util/executor/executor.cc
===================================================================
--- trunk/src/lib/util/executor/executor.cc	(revision 6645)
+++ 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;*/
 }
