Index: /trunk/src/lib/shell/shell_command.cc
===================================================================
--- /trunk/src/lib/shell/shell_command.cc	(revision 5326)
+++ /trunk/src/lib/shell/shell_command.cc	(revision 5327)
@@ -211,5 +211,5 @@
   {
     ShellCommandClass::commandClassList = new tList<ShellCommandClass>;
-    ShellCommand<ShellCommandBase>::registerCommand("debug", "ShellCommand", &ShellCommandBase::debugDyn);
+//    ShellCommandStatic<ShellCommandBase>::registerCommand("debug", "ShellCommand", &ShellCommandBase::debug);
   }
 }
Index: /trunk/src/lib/shell/shell_command.h
===================================================================
--- /trunk/src/lib/shell/shell_command.h	(revision 5326)
+++ /trunk/src/lib/shell/shell_command.h	(revision 5327)
@@ -148,52 +148,53 @@
 // SHELLCOMMAND can be redefined as ShellCommand or ShellCommandStatic
 // SHELLCOMMANDEXECUTER can be redefined too.
+// SHELLCOMMANDINCLASS
 //! 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 SHELLCOMMANDINCLASS(*function)()) \
   { \
     if (isRegistered(commandName, className, 0)== true) \
       return NULL; \
-    return new ShellCommand<T>(commandName, className, function); \
+    return new SHELLCOMMAND<T>(commandName, className, function); \
   }
 
 //! 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 SHELLCOMMANDINCLASS(*function)(t1##_TYPE), t1##_TYPE d1 = t1##_DEFAULT) \
   { \
     if (isRegistered(commandName, className, 1, t1##_PARAM)== true) \
       return NULL; \
-    return new ShellCommand<T>(commandName, className, function, d1); \
+    return new SHELLCOMMAND<T>(commandName, className, function, d1); \
   }
 
 //! 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 SHELLCOMMANDINCLASS(*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) \
       return NULL; \
-    return new ShellCommand<T>(commandName, className, function, d1, d2); \
+    return new SHELLCOMMAND<T>(commandName, className, function, d1, d2); \
   }
 
 //! 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 SHELLCOMMANDINCLASS(*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) \
       return NULL; \
-    return new ShellCommand<T>(commandName, className, function, d1, d2, d3); \
+    return new SHELLCOMMAND<T>(commandName, className, function, d1, d2, d3); \
   }
 
 //! 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 SHELLCOMMANDINCLASS(*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) \
       return NULL; \
-    return new ShellCommand<T>(commandName, className, function, d1, d2, d3, d4); \
+    return new SHELLCOMMAND<T>(commandName, className, function, d1, d2, d3, d4); \
   }
 
 //! 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 SHELLCOMMANDINCLASS(*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) \
@@ -207,6 +208,6 @@
 //! creates a command that takes no parameters
 #define ShellCommandConstructor0() \
-  void (T::*functionPointer_0)(); \
-  SHELLCOMMAND(const char* commandName, const char* className, void (T::*function)()) \
+  void SHELLCOMMANDINCLASS(*functionPointer_0)(); \
+  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)()) \
   : ShellCommandBase(commandName, className, 0) \
   { \
@@ -216,6 +217,6 @@
 //! creates a command that takes one parameter
 #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) \
+  void SHELLCOMMANDINCLASS(*functionPointer_1_##t1)(t1##_TYPE); \
+  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE), t1##_TYPE d1) \
   : ShellCommandBase(commandName, className, 1, t1##_PARAM, d1) \
   { \
@@ -225,6 +226,6 @@
 //! creates a command that takes two parameters
 #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) \
+  void SHELLCOMMANDINCLASS(*functionPointer_2_##t1##_##t2)(t1##_TYPE, t2##_TYPE); \
+  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE), t1##_TYPE d1, t2##_TYPE d2) \
   : ShellCommandBase(commandName, className, 2, t1##_PARAM, d1, t2##_PARAM, d2) \
   { \
@@ -234,6 +235,6 @@
 //! creates a command that takes three parameter
 #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) \
+  void SHELLCOMMANDINCLASS(*functionPointer_3_##t1##_##t2##_##t3)(t1##_TYPE, t2##_TYPE, t3##_TYPE); \
+  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*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) \
   { \
@@ -243,6 +244,6 @@
 //! creates a command that takes four parameter
 #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) \
+  void SHELLCOMMANDINCLASS(*functionPointer_4_##t1##_##t2##_##t3##_##t4)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE); \
+  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*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) \
   { \
@@ -252,6 +253,6 @@
 //! creates a command that takes five parameter
 #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) \
+  void SHELLCOMMANDINCLASS(*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 SHELLCOMMANDINCLASS(*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) \
   { \
@@ -303,9 +304,13 @@
 #undef SHELLCOMMAND
 #endif
-#define SHELLCOMMAND         ShellCommand
+#define SHELLCOMMAND                       ShellCommand
 #ifdef SHELLCOMMANDEXECUTER
 #undef SHELLCOMMANDEXECUTER
 #endif
-#define SHELLCOMMANDEXECUTER(nameExt)     (dynamic_cast<T*>(object)->*functionPointer##nameExt)
+#define SHELLCOMMANDEXECUTER(nameExt)      (dynamic_cast<T*>(object)->*functionPointer##nameExt)
+#ifdef SHELLCOMMANDINCLASS
+#undef SHELLCOMMANDINCLASS
+#endif
+#define SHELLCOMMANDINCLASS(FUNCTION)      (T::FUNCTION)
 
 //! FUNCTOR_LIST is the List of command-registerers
@@ -331,4 +336,5 @@
 };
 
+//! keeps information about a ShellCommand, that points to a Static Function
 template<class T> class ShellCommandStatic : public ShellCommandBase
 {
@@ -345,4 +351,8 @@
 #endif
 #define SHELLCOMMANDEXECUTER(nameExt)     T::functionPointer##nameExt
+#ifdef SHELLCOMMANDINCLASS
+#undef SHELLCOMMANDINCLASS
+#endif
+#define SHELLCOMMANDINCLASS(FUNCTION)     (FUNCTION)
 
 //! FUNCTOR_LIST is the List of command-registerers
