Index: /trunk/src/util/shell.cc
===================================================================
--- /trunk/src/util/shell.cc	(revision 5129)
+++ /trunk/src/util/shell.cc	(revision 5130)
@@ -76,6 +76,7 @@
     evh->subscribe(this, ES_SHELL, i);
 
-
-//  this->registerCommand("clear", Shell::)
+  //void ShellCommand<T>::registerCommand(const char* commandName, ClassID classID, T* object, void* functionPointer, unsigned int paramCount, ...)
+
+  ShellCommand<Shell>::registerCommand("clear", CL_NULL, this, &Shell::clear, 0, 1);
 }
 
@@ -458,6 +459,5 @@
   if (!strcmp(this->inputLine, "clear"))
   {
-    this->flushBuffers();
-    this->addBufferLine("orxonox - shell\n ==================== \n", NULL);
+    this->clear();
   }
 
@@ -465,4 +465,10 @@
 
   return false;
+}
+
+void Shell::clear()
+{
+  this->flushBuffers();
+  this->addBufferLine("orxonox - shell\n ==================== \n", NULL);
 }
 
Index: /trunk/src/util/shell.h
===================================================================
--- /trunk/src/util/shell.h	(revision 5129)
+++ /trunk/src/util/shell.h	(revision 5130)
@@ -61,4 +61,6 @@
     bool executeCommand();
 
+    void clear();
+
     void setRepeatDelay(float repeatDelay, float repeatRate);
 
Index: /trunk/src/util/shell_command.cc
===================================================================
--- /trunk/src/util/shell_command.cc	(revision 5129)
+++ /trunk/src/util/shell_command.cc	(revision 5130)
@@ -28,18 +28,32 @@
 using namespace std;
 
-ShellCommandBase::ShellCommandBase(const char* commandName, ClassID classID)
+ShellCommandBase::ShellCommandBase(const char* commandName, ClassID classID, void* functionPointer, unsigned int paramCount, va_list parameters)
 {
   this->classID = classID;
+  this->functionPointer = functionPointer;
   this->commandName = new char[strlen(commandName)+1];
   strcpy(this->commandName, commandName);
 
+  // handling parameters, and storing them:
+  this->paramCount = paramCount;
+  this->parameters = new ShellParameterType[paramCount];
+
+  for (unsigned int i = 0; i < paramCount; i++)
+    parameters[i] = va_arg(parameters, long);
+
+  // adding this ShellCommand to the list of known Commands
   ShellCommandBase::commandList->add(this);
 }
 
+ShellCommandBase::~ShellCommandBase()
+{
+  delete[] this->commandName;
+  delete[] this->parameters;
+}
 
 
 tList<ShellCommandBase>* ShellCommandBase::commandList = NULL;
 
-bool ShellCommandBase::isRegistered(const char* commandName, ClassID classID)
+bool ShellCommandBase::isRegistered(const char* commandName, ClassID classID, unsigned int paramCount, va_list parameters)
 {
   if (ShellCommandBase::commandList == NULL)
Index: /trunk/src/util/shell_command.h
===================================================================
--- /trunk/src/util/shell_command.h	(revision 5129)
+++ /trunk/src/util/shell_command.h	(revision 5130)
@@ -11,4 +11,6 @@
 #include <stdarg.h>
 
+#define MAX_SHELL_COMMAND_SIZE
+
 typedef enum ShellParameterType
 {
@@ -22,19 +24,27 @@
 };
 
+
 // FORWARD DECLARATION
 template<class T> class tList;
 template<class T> class tIterator;
-#define MAX_SHELL_COMMAND_SIZE
 
-class ShellCommandBase
+class ShellCommandBase : public BaseObject
 {
   public:
     static bool execute (const char* executionString);
 
+//    virtual void execute (...);
+
   protected:
-    ShellCommandBase(const char* commandName, ClassID classID);
+    ShellCommandBase(const char* commandName, ClassID classID, void* functionPointer, unsigned int paramCount, va_list parameters);
+    ~ShellCommandBase();
 
-    static bool isRegistered(const char* commandName, ClassID classID);
+    static bool isRegistered(const char* commandName, ClassID classID, unsigned int paramCount, va_list parameters);
 
+
+  protected:
+    void*                            functionPointer;     //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
+    unsigned int                     paramCount;          //!< the count of parameters
+    ShellParameterType*              parameters;          //!< Parameters
 
   private:
@@ -42,5 +52,5 @@
     long                             classID;             //!< The ID of the Class asociated to this Command
 
-
+    // STATIC MEMBERS
     static tList<ShellCommandBase>*  commandList;         //!< A list of availiable commands.
 };
@@ -50,20 +60,19 @@
 {
   public:
-    static void registerCommand(const char* commandName, void* pointerToFunction, ClassID classID, ShellParameterType param1Type, void* Object = NULL);
+    static void registerCommand(const char* commandName, ClassID classID, T* object, void (T::*functionPointer)(), unsigned int paramCount, ...);
 
     static void unregisterCommand(const char* commandNaame, ClassID classID);
 
   private:
-    ShellCommand(const char* command, void* pointerToFunction, ClassID classID, ShellParameterType param1Type, void* Object = NULL);
+    ShellCommand(const char* command, ClassID classID, T* object, void* functionPointer, unsigned int paramCount, va_list parameters);
 
 
   public:
-    void*                functionPointer;     //!< The pointer to the function of the Class (or static pointer if ClassID == CL_NULL )
-    T*                   Object;              //!< The pointer to the object to apply this function to (NULL if classID == CL_NULL )
+    T*                   objectPointer;       //!< The pointer to the object to apply this function to (NULL if classID == CL_NULL )
 };
 
 template<class T>
-    ShellCommand<T>::ShellCommand(const char* commandName, void* pointerToFunction, ClassID classID, ShellParameterType param1Type, void* Object)
-  : ShellCommandBase (command, classID)
+    ShellCommand<T>::ShellCommand(const char* commandName, ClassID classID, T* object, void* functionPointer, unsigned int paramCount, va_list parameters)
+  : ShellCommandBase (commandName, classID, functionPointer, paramCount, parameters)
 {
 
@@ -71,16 +80,15 @@
 
 template<class T>
-    void ShellCommand<T>::registerCommand(const char* commandName, void* pointerToFunction, ClassID classID, ShellParameterType param1Type, void* Object)
+    void ShellCommand<T>::registerCommand(const char* commandName, ClassID classID, T* object, void (T::*functionPointer)(), unsigned int paramCount, ...)
 {
-  if (isRegistered() == true)
+  va_list parameters;
+  va_start(parameters, paramCount);
+
+  if (isRegistered(commandName, classID, paramCount, parameters) == true)
     return;
   else
   {
-    ShellCommand<T>* newCommand = new ShellCommand<T>(command);
-    elem->functionPointer = pointerToFunction;
-    elem->parameter1 = param1Type;
-    elem->Object = Object;
 
-
+//    ShellCommand<T>* newCommand = new ShellCommand<T>(commandName, classID, object, functionPointer, paramCount, parameters);
   }
 }
