Index: trunk/src/lib/shell/shell_command.cc
===================================================================
--- trunk/src/lib/shell/shell_command.cc	(revision 5325)
+++ trunk/src/lib/shell/shell_command.cc	(revision 5326)
@@ -432,6 +432,4 @@
 //  long completeType = SHELLC_NONE;      //< the Type we'd like to complete.
   SubString inputSplits(executionString, true);
-
-  printf("!!!!%s!!!\n", executionString);
 
   if (inputSplits.getCount() == 0)
Index: trunk/src/lib/shell/shell_command.h
===================================================================
--- trunk/src/lib/shell/shell_command.h	(revision 5325)
+++ trunk/src/lib/shell/shell_command.h	(revision 5326)
@@ -127,7 +127,7 @@
 ///////////////////////////////////////////////////
 
-///////////////////////
-// MACRO DEFINITIONS //
-///////////////////////
+/////////////////////////////////
+// MACRO DEFINITION EXTENSIONS //
+/////////////////////////////////
 //! where to chek for default BOOL values
 #define   l_BOOL_DEFGRAB(i)         this->defaultBools[i]
@@ -146,7 +146,9 @@
 // COMMAND REGISTRATION //
 //////////////////////////
+// SHELLCOMMAND can be redefined as ShellCommand or ShellCommandStatic
+// SHELLCOMMANDEXECUTER can be redefined too.
 //! registers a command without any parameters
 #define ShellCommandRegister0() \
-  static ShellCommand<T>* registerCommand(const char* commandName, const char* className, void (T::*function)()) \
+  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void (T::*function)()) \
   { \
     if (isRegistered(commandName, className, 0)== true) \
@@ -157,5 +159,5 @@
 //! registers a command with 1 parameter
 #define ShellCommandRegister1(t1) \
-  static ShellCommand<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE), t1##_TYPE d1 = t1##_DEFAULT) \
+  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE), t1##_TYPE d1 = t1##_DEFAULT) \
   { \
     if (isRegistered(commandName, className, 1, t1##_PARAM)== true) \
@@ -166,5 +168,5 @@
 //! registers a command with 2 parameters
 #define ShellCommandRegister2(t1,t2) \
-  static ShellCommand<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT) \
+  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT) \
   { \
     if (isRegistered(commandName, className, 2, t1##_PARAM, t2##_PARAM)== true) \
@@ -175,5 +177,5 @@
 //! registers a command with 3 parameters
 #define ShellCommandRegister3(t1,t2,t3) \
-  static ShellCommand<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT) \
+  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT) \
   { \
     if (isRegistered(commandName, className, 3, t1##_PARAM, t2##_PARAM, t3##_PARAM)== true) \
@@ -184,5 +186,5 @@
 //! registers a command with 4 parameters
 #define ShellCommandRegister4(t1,t2,t3,t4) \
-  static ShellCommand<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT, t4##_TYPE d4 = t4##_DEFAULT) \
+  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT, t4##_TYPE d4 = t4##_DEFAULT) \
   { \
     if (isRegistered(commandName, className, 4, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM)== true) \
@@ -193,5 +195,5 @@
 //! registers a command with 5 parameters
 #define ShellCommandRegister5(t1,t2,t3,t4,t5) \
-  static ShellCommand<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT, t4##_TYPE d4 = t4##_DEFAULT, t5##_TYPE d5 = t5##_DEFAULT) \
+  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT, t4##_TYPE d4 = t4##_DEFAULT, t5##_TYPE d5 = t5##_DEFAULT) \
   { \
     if (isRegistered(commandName, className, 5, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM)== true) \
@@ -206,5 +208,5 @@
 #define ShellCommandConstructor0() \
   void (T::*functionPointer_0)(); \
-  ShellCommand(const char* commandName, const char* className, void (T::*function)()) \
+  SHELLCOMMAND(const char* commandName, const char* className, void (T::*function)()) \
   : ShellCommandBase(commandName, className, 0) \
   { \
@@ -215,5 +217,5 @@
 #define ShellCommandConstructor1(t1) \
   void (T::*functionPointer_1_##t1)(t1##_TYPE); \
-  ShellCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE), t1##_TYPE d1) \
+  SHELLCOMMAND(const char* commandName, const char* className, void (T::*function)(t1##_TYPE), t1##_TYPE d1) \
   : ShellCommandBase(commandName, className, 1, t1##_PARAM, d1) \
   { \
@@ -224,5 +226,5 @@
 #define ShellCommandConstructor2(t1,t2) \
   void (T::*functionPointer_2_##t1##_##t2)(t1##_TYPE, t2##_TYPE); \
-  ShellCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE), t1##_TYPE d1, t2##_TYPE d2) \
+  SHELLCOMMAND(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE), t1##_TYPE d1, t2##_TYPE d2) \
   : ShellCommandBase(commandName, className, 2, t1##_PARAM, d1, t2##_PARAM, d2) \
   { \
@@ -233,5 +235,5 @@
 #define ShellCommandConstructor3(t1,t2,t3) \
   void (T::*functionPointer_3_##t1##_##t2##_##t3)(t1##_TYPE, t2##_TYPE, t3##_TYPE); \
-  ShellCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3) \
+  SHELLCOMMAND(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3) \
   : ShellCommandBase(commandName, className, 3, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3) \
   { \
@@ -242,5 +244,5 @@
 #define ShellCommandConstructor4(t1,t2,t3,t4) \
   void (T::*functionPointer_4_##t1##_##t2##_##t3##_##t4)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE); \
-  ShellCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3, t4##_TYPE d4) \
+  SHELLCOMMAND(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3, t4##_TYPE d4) \
   : ShellCommandBase(commandName, className, 4, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3, t4##_PARAM, d4) \
   { \
@@ -251,5 +253,5 @@
 #define ShellCommandConstructor5(t1,t2,t3,t4,t5) \
   void (T::*functionPointer_5_##t1##_##t2##_##t3##_##t4##_##t5)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE); \
-  ShellCommand(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3, t4##_TYPE d4, t5##_TYPE d5) \
+  SHELLCOMMAND(const char* commandName, const char* className, void (T::*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3, t4##_TYPE d4, t5##_TYPE d5) \
   : ShellCommandBase(commandName, className, 5, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3, t4##_PARAM, d4, t5##_PARAM, d5) \
   { \
@@ -263,30 +265,30 @@
 #define ShellCommandExecute0() \
   if (this->paramCount == 0) \
-    (dynamic_cast<T*>(object)->*functionPointer_0)()
+    SHELLCOMMANDEXECUTER(_0)()
 
 //! execute-macro for functions with one parameter
 #define ShellCommandExecute1(t1) \
    else if (this->paramCount == 1 && this->parameters[0] == t1##_PARAM) \
-    (dynamic_cast<T*>(object)->*functionPointer_1_##t1)(t1##_FUNC(parameters, t1##_DEFGRAB(0)))
+    SHELLCOMMANDEXECUTER(_1_##t1)(t1##_FUNC(parameters, t1##_DEFGRAB(0)))
 
 //! execute-macro for functions with two parameters
 #define ShellCommandExecute2(t1,t2) \
    else if (this->paramCount == 2 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM) \
-    (dynamic_cast<T*>(object)->*functionPointer_2_##t1##_##t2)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)))
+    SHELLCOMMANDEXECUTER(_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 ShellCommandExecute3(t1,t2,t3) \
    else if (this->paramCount == 3 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM && this->parameters[2] == t3##_PARAM) \
-    (dynamic_cast<T*>(object)->*functionPointer_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)))
+    SHELLCOMMANDEXECUTER(_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 ShellCommandExecute4(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) \
-    (dynamic_cast<T*>(object)->*functionPointer_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)))
+    SHELLCOMMANDEXECUTER(_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 ShellCommandExecute5(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) \
-    (dynamic_cast<T*>(object)->*functionPointer_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)))
+    SHELLCOMMANDEXECUTER(_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)))
 
 
@@ -295,8 +297,15 @@
 {
   public:
-
 #ifdef FUNCTOR_LIST
 #undef FUNCTOR_LIST
 #endif
+#ifdef SHELLCOMMAND
+#undef SHELLCOMMAND
+#endif
+#define SHELLCOMMAND         ShellCommand
+#ifdef SHELLCOMMANDEXECUTER
+#undef SHELLCOMMANDEXECUTER
+#endif
+#define SHELLCOMMANDEXECUTER(nameExt)     (dynamic_cast<T*>(object)->*functionPointer##nameExt)
 
 //! FUNCTOR_LIST is the List of command-registerers
@@ -314,6 +323,41 @@
     virtual void executeCommand (BaseObject* object, const char* parameters)
     {
-//      if (parameters != NULL)
       SubString sub(parameters, true);
+//! FUNCTOR_LIST is the List of Executive Functions
+#define FUNCTOR_LIST(x) ShellCommandExecute ## x
+#include "functor_list.h"
+#undef FUNCTOR_LIST
+    }
+};
+
+template<class T> class ShellCommandStatic : public ShellCommandBase
+{
+  public:
+#ifdef FUNCTOR_LIST
+#undef FUNCTOR_LIST
+#endif
+#ifdef SHELLCOMMAND
+#undef SHELLCOMMAND
+#endif
+#define SHELLCOMMAND                      ShellCommandStatic
+#ifdef SHELLCOMMANDEXECUTER
+#undef SHELLCOMMANDEXECUTER
+#endif
+#define SHELLCOMMANDEXECUTER(nameExt)     T::functionPointer##nameExt
+
+//! FUNCTOR_LIST is the List of command-registerers
+#define FUNCTOR_LIST(x) ShellCommandRegister ## x
+#include "functor_list.h"
+#undef FUNCTOR_LIST
+
+  private:
+//! FUNCTOR_LIST is the List of CommandConstructors
+#define FUNCTOR_LIST(x) ShellCommandConstructor ## x
+#include "functor_list.h"
+#undef FUNCTOR_LIST
+
+    virtual void executeCommand (BaseObject* object, const char* parameters)
+    {
+  SubString sub(parameters, true);
 //! FUNCTOR_LIST is the List of Executive Functions
 #define FUNCTOR_LIST(x) ShellCommandExecute ## x
