Index: trunk/src/defs/debug.h
===================================================================
--- trunk/src/defs/debug.h	(revision 7373)
+++ trunk/src/defs/debug.h	(revision 7374)
@@ -16,10 +16,10 @@
 /*!
  * @file debug.h
-  *  Handles output to console for different Verbose-Modes.
-
-    There are two main modes HARD and SOFT. HARD is precessed during compileTime where SOFT is for runtime.
-    @li HARD: One can choose between different modes. see: // DEFINE_MODULES
-    @li SOFT: If you want each module can have its own variable for processing. just pass it to DEBUG_MODULE_SOFT
-*/
+ * @briefHandles output to console for different Verbose-Modes.
+ *
+ * There are two main modes HARD and SOFT. HARD is precessed during compileTime where SOFT is for runtime.
+ * @li HARD: One can choose between different modes. see: // DEFINE_MODULES
+ * @li SOFT: If you want each module can have its own variable for processing. just pass it to DEBUG_MODULE_SOFT
+ */
 
 #ifndef _DEBUG_H
@@ -114,5 +114,5 @@
 #endif
 #ifndef NO_SHELL
-#define PRINT_EXEC       ShellBuffer::addBufferLineStatic
+#define PRINT_EXEC       OrxShell::ShellBuffer::addBufferLineStatic
 #define COUT_EXEC        std::cout
 #else /* NO_SHELL */
Index: trunk/src/lib/shell/Makefile.am
===================================================================
--- trunk/src/lib/shell/Makefile.am	(revision 7373)
+++ trunk/src/lib/shell/Makefile.am	(revision 7374)
@@ -4,16 +4,20 @@
 noinst_LIBRARIES = libORXshell.a
 
-libORXshell_a_SOURCES = shell.cc \
-			shell_buffer.cc \
-			shell_input.cc \
-		        shell_command.cc \
-		        shell_command_class.cc \
-			shell_completion.cc
+libORXshell_a_SOURCES = \
+		shell.cc \
+		shell_buffer.cc \
+		shell_input.cc \
+		shell_command.cc \
+		shell_command_class.cc \
+		shell_completion.cc \
+		shell_completion_plugin.cc
 
 
-noinst_HEADERS= shell.h \
+noinst_HEADERS= \
+		shell.h \
 		shell_buffer.h \
 		shell_input.h \
-                shell_command.h \
-                shell_command_class.h \
-		shell_completion.h
+		shell_command.h \
+		shell_command_class.h \
+		shell_completion.h \
+		shell_completion_plugin.h
Index: trunk/src/lib/shell/shell.cc
===================================================================
--- trunk/src/lib/shell/shell.cc	(revision 7373)
+++ trunk/src/lib/shell/shell.cc	(revision 7374)
@@ -14,5 +14,5 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL
 
 #include "shell.h"
@@ -33,5 +33,6 @@
 #include <stdio.h>
 
-using namespace std;
+namespace OrxShell
+{
 
 SHELL_COMMAND(clear, Shell, clear)
@@ -132,5 +133,5 @@
   this->setRelCoorSoft2D(0, 0, 5);
 
-  list<std::string>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer().end();
+  std::list<std::string>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer().end();
   bool top = false;
   for (std::list<Text*>::iterator text = this->bufferText.begin(); text != this->bufferText.end(); ++text)
@@ -378,5 +379,5 @@
   }
   // redisplay the buffers
-  list<std::string>::const_iterator it = this->bufferIterator;
+  std::list<std::string>::const_iterator it = this->bufferIterator;
   if (it == ShellBuffer::getInstance()->getBuffer().end())
   {
@@ -518,2 +519,4 @@
 //   PRINTF(3)("This is the Test for one String '%s' and one Float '%f'\n",s , f);
 // }
+
+}
Index: trunk/src/lib/shell/shell.h
===================================================================
--- trunk/src/lib/shell/shell.h	(revision 7373)
+++ trunk/src/lib/shell/shell.h	(revision 7374)
@@ -24,23 +24,26 @@
 class Material;
 
-//! A class that is able to redirect all output to a openGL-Shell, and that one can use to input some commands
-/**
- * the major idea is, that all the Output can be redirected to the Shell,
- * and does not have to be displayed to the opening Shell, this is good,
- * for developers using Windows, where all output is otherwise redirected
- * to stdout.txt
- *
- * Furthermore the Shell should enable us, to input some simple commands
- * Each Class can check itself in to the Shell, and listen for commands.
- *
- * more info: @see ShellCommand
- * @see shell_command.h
- * @see shell_buffer.h
- * @see shell_input.h
- *
- * !! note in order to keep shellbuffer to a minimal (it is included with
- * !! debug.h) Display of it inside the Shell is located here !!
- */
-class Shell : public Element2D, public EventListener {
+namespace OrxShell
+{
+  //! A class that is able to redirect all output to a openGL-Shell, and that one can use to input some commands
+  /**
+   * the major idea is, that all the Output can be redirected to the Shell,
+   * and does not have to be displayed to the opening Shell, this is good,
+   * for developers using Windows, where all output is otherwise redirected
+   * to stdout.txt
+   *
+   * Furthermore the Shell should enable us, to input some simple commands
+   * Each Class can check itself in to the Shell, and listen for commands.
+   *
+   * more info: @see ShellCommand
+   * @see shell_command.h
+   * @see shell_buffer.h
+   * @see shell_input.h
+   *
+   * !! note in order to keep shellbuffer to a minimal (it is included with
+   * !! debug.h) Display of it inside the Shell is located here !!
+   */
+  class Shell : public Element2D, public EventListener
+  {
 
   public:
@@ -104,5 +107,7 @@
     int                         bufferOffset;           //!< how many lines from the bottom up we display the Buffer.
     std::list<std::string>::const_iterator  bufferIterator;         //!< used to move through and print the Buffer
-};
+  };
+
+}
 
 #endif /* _SHELL_H */
Index: trunk/src/lib/shell/shell_buffer.cc
===================================================================
--- trunk/src/lib/shell/shell_buffer.cc	(revision 7373)
+++ trunk/src/lib/shell/shell_buffer.cc	(revision 7374)
@@ -14,5 +14,5 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL
 
 #include "shell_buffer.h"
@@ -22,5 +22,6 @@
 #include "stdlibincl.h"
 
-using namespace std;
+namespace OrxShell
+{
 
 
@@ -189,6 +190,8 @@
   PRINT(3)("Debugging output to console (not this shell)\n");
 
-  list<std::string>::const_iterator bufferLine;
+  std::list<std::string>::const_iterator bufferLine;
   for (bufferLine = this->buffer.begin(); bufferLine != this->buffer.end(); bufferLine++)
     printf((*bufferLine).c_str());
 }
+
+}
Index: trunk/src/lib/shell/shell_buffer.h
===================================================================
--- trunk/src/lib/shell/shell_buffer.h	(revision 7373)
+++ trunk/src/lib/shell/shell_buffer.h	(revision 7374)
@@ -14,36 +14,35 @@
 #define      SHELL_BUFFER_SIZE       16384         //!< The Size of the input-buffers (should be large enough to carry any kind of input)
 
-// FORWARD DECLARATION
-class Shell;
+namespace OrxShell
+{
+  // FORWARD DECLARATION
+  class Shell;
 
-#ifndef NULL
-#define NULL 0            //!< a pointer to NULL
-#endif
+  //! A class handling output from orxonox via debug.h
+  class ShellBuffer
+  {
 
-//! A class handling output from orxonox via debug.h
-class ShellBuffer {
+  public:
+    virtual ~ShellBuffer();
+    /** @returns a Pointer to the only object of this Class */
+    inline static ShellBuffer* getInstance() { if (!ShellBuffer::singletonRef) ShellBuffer::singletonRef = new ShellBuffer();  return ShellBuffer::singletonRef; };
+    /** @returns true if this class is instanciated, false otherwise */
+inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; };
 
- public:
-  virtual ~ShellBuffer();
-  /** @returns a Pointer to the only object of this Class */
-  inline static ShellBuffer* getInstance() { if (!ShellBuffer::singletonRef) ShellBuffer::singletonRef = new ShellBuffer();  return ShellBuffer::singletonRef; };
-  /** @returns true if this class is instanciated, false otherwise */
-  inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; };
+    void registerShell(Shell* shell);
+    void unregisterShell(Shell* shell);
 
-  void registerShell(Shell* shell);
-  void unregisterShell(Shell* shell);
+    // BUFFER //
+    /** @param bufferSize the new Buffer-Size */
+    void setBufferSize(unsigned int bufferSize) { this->bufferSize = bufferSize; };
+    void flush();
+    static bool addBufferLineStatic(const char* line, ...);
+    void addBufferLine(const char* line, va_list arg);
+    /** @returns the List of stings from the Buffer */
+    const std::list<std::string>& getBuffer() const { return this->buffer; };
+    /** @returns the Count of lines processed by the Shell. */
+    inline long getLineCount() const { return this->lineCount; };
 
-  // BUFFER //
-  /** @param bufferSize the new Buffer-Size */
-  void setBufferSize(unsigned int bufferSize) { this->bufferSize = bufferSize; };
-  void flush();
-  static bool addBufferLineStatic(const char* line, ...);
-  void addBufferLine(const char* line, va_list arg);
-  /** @returns the List of stings from the Buffer */
-  const std::list<std::string>& getBuffer() const { return this->buffer; };
- /** @returns the Count of lines processed by the Shell. */
-  inline long getLineCount() const { return this->lineCount; };
-
-  void debug() const;
+    void debug() const;
 
   private:
@@ -63,5 +62,7 @@
 
     static SDL_mutex*        bufferMutex;                        //!< Only one thread may write into the ShellBuffer at a time.
-};
+  };
+
+}
 
 #endif /* _SHELL_BUFFER_H */
Index: trunk/src/lib/shell/shell_command.cc
===================================================================
--- trunk/src/lib/shell/shell_command.cc	(revision 7373)
+++ trunk/src/lib/shell/shell_command.cc	(revision 7374)
@@ -14,5 +14,5 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL
 
 #include "shell_command.h"
@@ -28,331 +28,334 @@
 #include <string.h>
 
-using namespace std;
-
-/**
- * constructs and registers a new Command
- * @param commandName the name of the Command
- * @param className the name of the class to apply this command to
- * @param paramCount the count of parameters this command takes
- */
-ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, const Executor& executor)
+namespace OrxShell
 {
-  this->setClassID(CL_SHELL_COMMAND, "ShellCommand");
-  PRINTF(5)("create shellcommand %s %s\n", commandName, className);
-  this->setName(commandName);
-  this->executor = executor.clone();
-  this->executor->setName(commandName);
-
-  //  this->classID = classID;
-  this->shellClass = ShellCommandClass::getCommandClass(className); //ClassList::IDToString(classID);
-  if (this->shellClass != NULL)
-    this->shellClass->commandList.push_back(this);
-}
-
-/**
- * deconstructs a ShellCommand
- */
-ShellCommand::~ShellCommand()
-{
-  if (this->alias != NULL && ShellCommandClass::aliasList != NULL)
-  {
-    ShellCommandClass::aliasList->remove(this->alias);
-    delete this->alias;
-  }
-  delete this->executor;
-}
-
-/**
- * registers a new ShellCommand
- */
-ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, const Executor& executor)
-{
-  if (ShellCommand::isRegistered(commandName, className))
-    return NULL;
-  else
-    return new ShellCommand(commandName, className, executor);
-
-}
-
-/**
- * unregister an existing commandName
- * @param className the name of the Class the command belongs to.
- * @param commandName the name of the command itself
- */
-void ShellCommand::unregisterCommand(const std::string& commandName, const std::string& className)
-{
-  /// FIXME
-  /*  if (ShellCommandClass::commandClassList == NULL)
+
+  /**
+   * constructs and registers a new Command
+   * @param commandName the name of the Command
+   * @param className the name of the class to apply this command to
+   * @param paramCount the count of parameters this command takes
+   */
+  ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, const Executor& executor)
+  {
+    this->setClassID(CL_SHELL_COMMAND, "ShellCommand");
+    PRINTF(5)("create shellcommand %s %s\n", commandName, className);
+    this->setName(commandName);
+    this->executor = executor.clone();
+    this->executor->setName(commandName);
+
+    //  this->classID = classID;
+    this->shellClass = ShellCommandClass::getCommandClass(className); //ClassList::IDToString(classID);
+    if (this->shellClass != NULL)
+      this->shellClass->commandList.push_back(this);
+  }
+
+  /**
+   * deconstructs a ShellCommand
+   */
+  ShellCommand::~ShellCommand()
+  {
+    if (this->alias != NULL && ShellCommandClass::aliasList != NULL)
+    {
+      ShellCommandClass::aliasList->remove(this->alias);
+      delete this->alias;
+    }
+    delete this->executor;
+  }
+
+  /**
+   * registers a new ShellCommand
+   */
+  ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, const Executor& executor)
+  {
+    if (ShellCommand::isRegistered(commandName, className))
+      return NULL;
+    else
+      return new ShellCommand(commandName, className, executor);
+
+  }
+
+  /**
+   * unregister an existing commandName
+   * @param className the name of the Class the command belongs to.
+   * @param commandName the name of the command itself
+   */
+  void ShellCommand::unregisterCommand(const std::string& commandName, const std::string& className)
+  {
+    /// FIXME
+    /*  if (ShellCommandClass::commandClassList == NULL)
+        ShellCommandClass::initCommandClassList();
+
+     const ShellCommandClass* checkClass = ShellCommandClass::isRegistered(className);
+
+     if (checkClass != NULL)
+      {
+        std::list<ShellCommand*>::iterator elem;
+        for (elem = checkClass->commandList.begin(); elem != checkClass->commandList.end(); elem++)
+        {
+          if (!strcmp(commandName, (*elem)->getName()))
+          {
+            delete (*elem);
+            checkClass->commandList.remove(*elem);
+            break;
+          }
+        }
+
+        if (checkClass->commandList->size() == 0)
+        {
+          ShellCommandClass::commandClassList->remove(checkClass);
+          delete checkClass;
+        }
+      }*/
+  }
+
+  /**
+   * checks if a command has already been registered.
+   * @param commandName the name of the Command
+   * @param className the name of the Class the command should apply to.
+   * @returns true, if the command is registered/false otherwise
+   *
+   * This is used internally, to see, if we have multiple command subscriptions.
+   * This is checked in the registerCommand-function.
+   */
+  bool ShellCommand::isRegistered(const std::string& commandName, const std::string& className)
+  {
+    if (ShellCommandClass::commandClassList == NULL)
+    {
       ShellCommandClass::initCommandClassList();
-
-   const ShellCommandClass* checkClass = ShellCommandClass::isRegistered(className);
-
-   if (checkClass != NULL)
-    {
-      std::list<ShellCommand*>::iterator elem;
+      return false;
+    }
+
+    const ShellCommandClass* checkClass = ShellCommandClass::isRegistered(className);
+    if (checkClass != NULL)
+    {
+      std::list<ShellCommand*>::const_iterator elem;
       for (elem = checkClass->commandList.begin(); elem != checkClass->commandList.end(); elem++)
       {
-        if (!strcmp(commandName, (*elem)->getName()))
-        {
-          delete (*elem);
-          checkClass->commandList.remove(*elem);
-          break;
-        }
-      }
-
-      if (checkClass->commandList->size() == 0)
-      {
-        ShellCommandClass::commandClassList->remove(checkClass);
-        delete checkClass;
-      }
-    }*/
-}
-
-/**
- * checks if a command has already been registered.
- * @param commandName the name of the Command
- * @param className the name of the Class the command should apply to.
- * @returns true, if the command is registered/false otherwise
- *
- * This is used internally, to see, if we have multiple command subscriptions.
- * This is checked in the registerCommand-function.
- */
-bool ShellCommand::isRegistered(const std::string& commandName, const std::string& className)
-{
-  if (ShellCommandClass::commandClassList == NULL)
-  {
-    ShellCommandClass::initCommandClassList();
-    return false;
-  }
-
-  const ShellCommandClass* checkClass = ShellCommandClass::isRegistered(className);
-  if (checkClass != NULL)
-  {
-    std::list<ShellCommand*>::const_iterator elem;
-    for (elem = checkClass->commandList.begin(); elem != checkClass->commandList.end(); elem++)
-    {
-      if (commandName == (*elem)->getName())
-      {
-        PRINTF(2)("Command '%s::%s' already registered\n", className.c_str(), commandName.c_str());
-        return true;
-      }
-    }
-    return false;
-  }
-  else
-    return false;
-}
-
-
-/**
- * executes commands
- * @param executionString the string containing the following input
- * ClassName [ObjectName] functionName [parameter1[,parameter2[,...]]]
- * @return true on success, false otherwise.
- */
-bool ShellCommand::execute(const std::string& executionString)
-{
-  if (ShellCommandClass::commandClassList == NULL)
-    return false;
-
-  long classID = CL_NULL;                      //< the classID retrieved from the Class.
-  ShellCommandClass* commandClass = NULL;      //< the command class this command applies to.
-  const std::list<BaseObject*>* objectList = NULL;   //< the list of Objects stored in classID
-  BaseObject* objectPointer = NULL;            //< a pointer to th Object to Execute the command on
-  bool emptyComplete = false;                  //< if the completion input is empty string. e.g ""
-  //  long completeType = SHELLC_NONE;           //< the Type we'd like to complete.
-  SubString inputSplits(executionString, SubString::WhiteSpacesWithComma);
-
-
-  // if we do not have any input return
-  if (inputSplits.empty())
-    return false;
-
-  // if we only have one input (!MUST BE AN ALIAS)
-  if (inputSplits.size() >= 1)
-  {
-    // CHECK FOR ALIAS
-    if (ShellCommandClass::aliasList != NULL)
-    {
-      list<ShellCommandAlias*>::iterator alias;
-      for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++ )
-      {
-        if (inputSplits.getString(0) == (*alias)->getName() && (*alias)->getCommand() != NULL &&
-            (*alias)->getCommand()->shellClass != NULL )
-        {
-          objectList = ClassList::getList((*alias)->getCommand()->shellClass->getName());
-          if (objectList != NULL)
-          {
-            (*(*alias)->getCommand()->executor)(objectList->front(), inputSplits.getSubSet(1).join()); /// TODO CHECK IF OK
-            return true;
-          }
-          /// TODO CHECK FOR STATIC functions.
-        }
-      }
-    }
-
-    // looking for a Matching Class
-    if (likely(ShellCommandClass::commandClassList != NULL))
-    {
-      list<ShellCommandClass*>::iterator commandClassIT;
-      for (commandClassIT = ShellCommandClass::commandClassList->begin(); commandClassIT != ShellCommandClass::commandClassList->end(); commandClassIT++)
-      {
-        if ((*commandClassIT)->getName() && inputSplits[0] == (*commandClassIT)->getName())
-        {
-          //elemCL->getName();
-          classID = ClassList::StringToID((*commandClassIT)->getName());
-          commandClass = (*commandClassIT);
-          objectList = ClassList::getList((ClassID)classID);
-          break;
-        }
-      }
-    }
-
-    // Second Agument. (either Object, or Function)
-    if (commandClass != NULL && inputSplits.size() >= 2)
-    {
-      int fktPos = 1; // The position of the Function (either at pos 1, or 2)
-      // If we have an ObjectList.
-      if (objectList != NULL)
-      {
-        // Checking for a Match in the Objects of classID (else take the first)
-        list<BaseObject*>::const_iterator object;
-        for (object = objectList->begin(); object != objectList->end(); object++)
-        {
-          if ((*object)->getName() != NULL && inputSplits[1] == (*object)->getName())
-          {
-            objectPointer = (*object);
-            fktPos = 2;
-            break;
-          }
-        }
-
-        // if we did not find an Object with matching name, take the first.
-        if (objectPointer == NULL)
-          objectPointer = objectList->front();
-      }
-
-      // match a function.
-      if (commandClass != NULL && (fktPos == 1 || (fktPos == 2 && inputSplits.size() >= 3)))
-      {
-        list<ShellCommand*>::iterator cmdIT;
-        for (cmdIT = commandClass->commandList.begin(); cmdIT != commandClass->commandList.end(); cmdIT++)
-        {
-          if (inputSplits[fktPos] == (*cmdIT)->getName())
-          {
-            if (objectPointer == NULL && (*cmdIT)->executor->getType() & Executor_Objective)
-              return false;
-            else
+        if (commandName == (*elem)->getName())
+        {
+          PRINTF(2)("Command '%s::%s' already registered\n", className.c_str(), commandName.c_str());
+          return true;
+        }
+      }
+      return false;
+    }
+    else
+      return false;
+  }
+
+
+  /**
+   * executes commands
+   * @param executionString the string containing the following input
+   * ClassName [ObjectName] functionName [parameter1[,parameter2[,...]]]
+   * @return true on success, false otherwise.
+   */
+  bool ShellCommand::execute(const std::string& executionString)
+  {
+    if (ShellCommandClass::commandClassList == NULL)
+      return false;
+
+    long classID = CL_NULL;                      //< the classID retrieved from the Class.
+    ShellCommandClass* commandClass = NULL;      //< the command class this command applies to.
+    const std::list<BaseObject*>* objectList = NULL;   //< the list of Objects stored in classID
+    BaseObject* objectPointer = NULL;            //< a pointer to th Object to Execute the command on
+    bool emptyComplete = false;                  //< if the completion input is empty string. e.g ""
+    //  long completeType = SHELLC_NONE;           //< the Type we'd like to complete.
+    SubString inputSplits(executionString, SubString::WhiteSpacesWithComma);
+
+
+    // if we do not have any input return
+    if (inputSplits.empty())
+      return false;
+
+    // if we only have one input (!MUST BE AN ALIAS)
+    if (inputSplits.size() >= 1)
+    {
+      // CHECK FOR ALIAS
+      if (ShellCommandClass::aliasList != NULL)
+      {
+        std::list<ShellCommandAlias*>::iterator alias;
+        for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++ )
+        {
+          if (inputSplits.getString(0) == (*alias)->getName() && (*alias)->getCommand() != NULL &&
+              (*alias)->getCommand()->shellClass != NULL )
+          {
+            objectList = ClassList::getList((*alias)->getCommand()->shellClass->getName());
+            if (objectList != NULL)
             {
-              (*(*cmdIT)->executor)(objectPointer, inputSplits.getSubSet(fktPos+1).join()); /// TODO CHECK IF OK
+              (*(*alias)->getCommand()->executor)(objectList->front(), inputSplits.getSubSet(1).join()); /// TODO CHECK IF OK
               return true;
             }
-          }
-        }
-      }
-    }
-  }
-  return false;
+            /// TODO CHECK FOR STATIC functions.
+          }
+        }
+      }
+
+      // looking for a Matching Class
+      if (likely(ShellCommandClass::commandClassList != NULL))
+      {
+        std::list<ShellCommandClass*>::iterator commandClassIT;
+        for (commandClassIT = ShellCommandClass::commandClassList->begin(); commandClassIT != ShellCommandClass::commandClassList->end(); commandClassIT++)
+        {
+          if ((*commandClassIT)->getName() && inputSplits[0] == (*commandClassIT)->getName())
+          {
+            //elemCL->getName();
+            classID = ClassList::StringToID((*commandClassIT)->getName());
+            commandClass = (*commandClassIT);
+            objectList = ClassList::getList((ClassID)classID);
+            break;
+          }
+        }
+      }
+
+      // Second Agument. (either Object, or Function)
+      if (commandClass != NULL && inputSplits.size() >= 2)
+      {
+        int fktPos = 1; // The position of the Function (either at pos 1, or 2)
+        // If we have an ObjectList.
+        if (objectList != NULL)
+        {
+          // Checking for a Match in the Objects of classID (else take the first)
+          std::list<BaseObject*>::const_iterator object;
+          for (object = objectList->begin(); object != objectList->end(); object++)
+          {
+            if ((*object)->getName() != NULL && inputSplits[1] == (*object)->getName())
+            {
+              objectPointer = (*object);
+              fktPos = 2;
+              break;
+            }
+          }
+
+          // if we did not find an Object with matching name, take the first.
+          if (objectPointer == NULL)
+            objectPointer = objectList->front();
+        }
+
+        // match a function.
+        if (commandClass != NULL && (fktPos == 1 || (fktPos == 2 && inputSplits.size() >= 3)))
+        {
+          std::list<ShellCommand*>::iterator cmdIT;
+          for (cmdIT = commandClass->commandList.begin(); cmdIT != commandClass->commandList.end(); cmdIT++)
+          {
+            if (inputSplits[fktPos] == (*cmdIT)->getName())
+            {
+              if (objectPointer == NULL && (*cmdIT)->executor->getType() & Executor_Objective)
+                return false;
+              else
+              {
+                (*(*cmdIT)->executor)(objectPointer, inputSplits.getSubSet(fktPos+1).join()); /// TODO CHECK IF OK
+                return true;
+              }
+            }
+          }
+        }
+      }
+    }
+    return false;
+  }
+
+  /**
+   * lets a command be described
+   * @param description the description of the Given command
+   */
+  ShellCommand* ShellCommand::describe(const std::string& description)
+  {
+    if (this == NULL)
+      return NULL;
+    else
+    {
+      this->description = description;
+      return this;
+    }
+  }
+
+  /**
+   * adds an Alias to this Command
+   * @param alias the name of the Alias to set
+   * @returns itself
+   */
+  ShellCommand* ShellCommand::setAlias(const std::string& alias)
+  {
+    if (this == NULL)
+      return NULL;
+
+    if (this->alias != NULL)
+    {
+      PRINTF(2)("not more than one Alias allowed for functions (%s::%s)\n", this->getName(), this->shellClass->getName());
+    }
+    else
+    {
+      if (ShellCommandClass::aliasList == NULL)
+        ShellCommandClass::aliasList = new std::list<ShellCommandAlias*>;
+
+      ShellCommandAlias* aliasCMD = new ShellCommandAlias(alias, this);
+      ShellCommandClass::aliasList->push_back(aliasCMD);
+      this->alias = aliasCMD;
+    }
+    return this;
+  }
+
+  /**
+   * @brief set the default values of the executor
+   * @param value0 the first default value
+   * @param value1 the second default value
+   * @param value2 the third default value
+   * @param value3 the fourth default value
+   * @param value4 the fifth default value
+   */
+  ShellCommand* ShellCommand::defaultValues(const MultiType& value0, const MultiType& value1,
+      const MultiType& value2, const MultiType& value3,
+      const MultiType& value4)
+  {
+    if (this == NULL || this->executor == NULL)
+      return NULL;
+
+    this->executor->defaultValues(value0, value1, value2, value3, value4);
+
+    return this;
+  }
+
+  /**
+   * prints out nice information about the Shells Commands
+   */
+  void ShellCommand::debug()
+  {
+    if (ShellCommandClass::commandClassList == NULL)
+    {
+      PRINT(0)("No Command registered.\n");
+      return;
+    }
+
+    std::list<ShellCommandClass*>::iterator classIT;
+    for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
+    {
+      PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className.c_str(), (*classIT)->commandList.size());
+
+      std::list<ShellCommand*>::iterator cmdIT;
+      for (cmdIT = (*classIT)->commandList.begin(); cmdIT != (*classIT)->commandList.end(); cmdIT++)
+      {
+        PRINT(0)("  command:'%s' : params:%d: ", (*cmdIT)->getName(), (*cmdIT)->executor->getParamCount());
+        /// FIXME
+        /*      for (unsigned int i = 0; i< elem->paramCount; i++)
+         printf("%s ", ShellCommand::paramToString(elem->parameters[i]));*/
+        if (!(*cmdIT)->description.empty())
+          printf("- %s", (*cmdIT)->description.c_str());
+        printf("\n");
+
+      }
+    }
+  }
+
+  /**
+   * converts a Parameter to a String
+   * @param parameter the Parameter we have.
+   * @returns the Name of the Parameter at Hand
+   */
+  const char* ShellCommand::paramToString(long parameter)
+  {
+    return MultiType::MultiTypeToString((MT_Type)parameter);
+  }
+
 }
-
-/**
- * lets a command be described
- * @param description the description of the Given command
- */
-ShellCommand* ShellCommand::describe(const std::string& description)
-{
-  if (this == NULL)
-    return NULL;
-  else
-  {
-    this->description = description;
-    return this;
-  }
-}
-
-/**
- * adds an Alias to this Command
- * @param alias the name of the Alias to set
- * @returns itself
- */
-ShellCommand* ShellCommand::setAlias(const std::string& alias)
-{
-  if (this == NULL)
-    return NULL;
-
-  if (this->alias != NULL)
-  {
-    PRINTF(2)("not more than one Alias allowed for functions (%s::%s)\n", this->getName(), this->shellClass->getName());
-  }
-  else
-  {
-    if (ShellCommandClass::aliasList == NULL)
-      ShellCommandClass::aliasList = new std::list<ShellCommandAlias*>;
-
-    ShellCommandAlias* aliasCMD = new ShellCommandAlias(alias, this);
-    ShellCommandClass::aliasList->push_back(aliasCMD);
-    this->alias = aliasCMD;
-  }
-  return this;
-}
-
-/**
- * @brief set the default values of the executor
- * @param value0 the first default value
- * @param value1 the second default value
- * @param value2 the third default value
- * @param value3 the fourth default value
- * @param value4 the fifth default value
- */
-ShellCommand* ShellCommand::defaultValues(const MultiType& value0, const MultiType& value1,
-    const MultiType& value2, const MultiType& value3,
-    const MultiType& value4)
-{
-  if (this == NULL || this->executor == NULL)
-    return NULL;
-
-  this->executor->defaultValues(value0, value1, value2, value3, value4);
-
-  return this;
-}
-
-/**
- * prints out nice information about the Shells Commands
- */
-void ShellCommand::debug()
-{
-  if (ShellCommandClass::commandClassList == NULL)
-  {
-    PRINT(0)("No Command registered.\n");
-    return;
-  }
-
-  list<ShellCommandClass*>::iterator classIT;
-  for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
-  {
-    PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className.c_str(), (*classIT)->commandList.size());
-
-    list<ShellCommand*>::iterator cmdIT;
-    for (cmdIT = (*classIT)->commandList.begin(); cmdIT != (*classIT)->commandList.end(); cmdIT++)
-    {
-      PRINT(0)("  command:'%s' : params:%d: ", (*cmdIT)->getName(), (*cmdIT)->executor->getParamCount());
-      /// FIXME
-      /*      for (unsigned int i = 0; i< elem->paramCount; i++)
-       printf("%s ", ShellCommand::paramToString(elem->parameters[i]));*/
-      if (!(*cmdIT)->description.empty())
-        printf("- %s", (*cmdIT)->description.c_str());
-      printf("\n");
-
-    }
-  }
-}
-
-/**
- * converts a Parameter to a String
- * @param parameter the Parameter we have.
- * @returns the Name of the Parameter at Hand
- */
-const char* ShellCommand::paramToString(long parameter)
-{
-  return MultiType::MultiTypeToString((MT_Type)parameter);
-}
Index: trunk/src/lib/shell/shell_command.h
===================================================================
--- trunk/src/lib/shell/shell_command.h	(revision 7373)
+++ trunk/src/lib/shell/shell_command.h	(revision 7374)
@@ -16,48 +16,50 @@
 
 
-// FORWARD DECLARATION
-class ShellCommandClass;
-class ShellCommandAlias;
+namespace OrxShell
+{
+  // FORWARD DECLARATION
+  class ShellCommandClass;
+  class ShellCommandAlias;
 
-/**
- * an easy to use Macro to create a Command
- * @param command the name of the command (without "" around the string)
- * @param class the name of the class to apply this command to (without the "" around the string)
- * @param function the function to call
- *
- * MEANING:
- *  ShellCommand* someUniqueVarName =
- *       ShellCommand<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
- *
- * In the Shell you would call this Command using:
- * $ ClassName [ObjectName] commandNameInShell [parameters]
- */
-//#define SHELL_COMMAND(command, class, function) \
-//        ShellCommand* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function)
+  /**
+   * an easy to use Macro to create a Command
+   * @param command the name of the command (without "" around the string)
+   * @param class the name of the class to apply this command to (without the "" around the string)
+   * @param function the function to call
+   *
+   * MEANING:
+   *  ShellCommand* someUniqueVarName =
+   *       ShellCommand<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
+   *
+   * In the Shell you would call this Command using:
+   * $ ClassName [ObjectName] commandNameInShell [parameters]
+   */
+  //#define SHELL_COMMAND(command, class, function) \
+  //        ShellCommand* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function)
 #define SHELL_COMMAND(command, class, function) \
-           ShellCommand* shell_command_##class##_##command = ShellCommand::registerCommand(#command, #class, ExecutorObjective<class>(&class::function))
+           OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, ExecutorObjective<class>(&class::function))
 
-/**
- * an easy to use Macro to create a Command
- * @param command the name of the command (without "" around the string)
- * @param class the name of the class to apply this command to (without the "" around the string)
- * @param function the function to call
- *
- * MEANING:
- *  ShellCommand* someUniqueVarName =
- *       ShellCommand<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
- *
- * In the Shell you would call this Command using:
- * $ ClassName [ObjectName] commandNameInShell [parameters]
- */
+  /**
+   * an easy to use Macro to create a Command
+   * @param command the name of the command (without "" around the string)
+   * @param class the name of the class to apply this command to (without the "" around the string)
+   * @param function the function to call
+   *
+   * MEANING:
+   *  ShellCommand* someUniqueVarName =
+   *       ShellCommand<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
+   *
+   * In the Shell you would call this Command using:
+   * $ ClassName [ObjectName] commandNameInShell [parameters]
+   */
 #define SHELL_COMMAND_STATIC(command, class, function) \
-           ShellCommand* shell_command_##class##_##command = ShellCommand::registerCommand(#command, #class, ExecutorStatic<class>(function))
+           OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, ExecutorStatic<class>(function))
 
 
 
-//! a baseClass for all possible ShellCommands
-class ShellCommand : public BaseObject
-{
-  friend class ShellCommandClass;
+  //! a baseClass for all possible ShellCommands
+  class ShellCommand : public BaseObject
+  {
+    friend class ShellCommandClass;
   public:
     static bool execute (const std::string& executionString);
@@ -89,10 +91,10 @@
     Executor*                        executor;                             //!< The Executor, that really executes the Function.
 
-};
+  };
 
-//! A Class, that handles aliases.
-class ShellCommandAlias
-{
-  friend class ShellCommand;
+  //! A Class, that handles aliases.
+  class ShellCommandAlias
+  {
+    friend class ShellCommand;
   public:
     /** @returns the Name of the Alias. */
@@ -108,5 +110,7 @@
     std::string     aliasName;       //!< the name of the Alias
     ShellCommand*   command;         //!< a pointer to the command, this alias executes.
-};
+  };
+
+}
 
 #endif /* _SHELL_COMMAND_H */
Index: trunk/src/lib/shell/shell_command_class.cc
===================================================================
--- trunk/src/lib/shell/shell_command_class.cc	(revision 7373)
+++ trunk/src/lib/shell/shell_command_class.cc	(revision 7374)
@@ -14,5 +14,5 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL
 
 #include "shell_command_class.h"
@@ -27,193 +27,195 @@
 #include <string.h>
 
-using namespace std;
-
-std::list<ShellCommandClass*>* ShellCommandClass::commandClassList = NULL;
-std::list<ShellCommandAlias*>* ShellCommandClass::aliasList = NULL;
-
-/**
- * creates a new ShellCommandClass
- * @param className the Name of the command-class to create
- */
-ShellCommandClass::ShellCommandClass(const std::string& className)
-  : className(className)
+namespace OrxShell
 {
-  this->setClassID(CL_SHELL_COMMAND_CLASS, "ShellCommandClass");
-  this->setName(className);
-
-  this->classID = CL_NULL;
-
-  ShellCommandClass::commandClassList->push_back(this);
-}
-
-/**
- * destructs the shellCommandClass again
- */
-ShellCommandClass::~ShellCommandClass()
-{
-  while(this->commandList.size() > 0)
-  {
-    delete this->commandList.front();
-    this->commandList.pop_front();
-  }
-}
-
-/**
- * collects the Commands registered to some class.
- * @param className the name of the Class to collect the Commands from.
- * @param stringList a List to paste the Commands into.
- * @returns true on success, false otherwise
- */
-bool ShellCommandClass::getCommandListOfClass(const std::string& className, std::list<std::string>* stringList)
-{
-  if (stringList == NULL)
-    return false;
-
-  list<ShellCommandClass*>::iterator elem;
-  for(elem = ShellCommandClass::commandClassList->begin(); elem != ShellCommandClass::commandClassList->end(); elem++)
-  {
-    if (className == (*elem)->getName())
-    {
-      list<ShellCommand*>::iterator command;
-      for(command = (*elem)->commandList.begin(); command != (*elem)->commandList.end(); command++)
-        stringList->push_back((*command)->getName());
-    }
-  }
-  return true;
-}
-
-/**
- * collects the Aliases registered to the ShellCommands
- * @param stringList a List to paste the Aliases into.
- * @returns true on success, false otherwise
- */
-bool ShellCommandClass::getCommandListOfAlias(std::list<std::string>* stringList)
-{
-  if (stringList == NULL || ShellCommandClass::aliasList == NULL)
-    return false;
-
-  list<ShellCommandAlias*>::iterator alias;
-  for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++)
-    stringList->push_back((*alias)->getName());
-  return true;
-}
-
-/**
- * unregisters all Commands that exist
- */
-void ShellCommandClass::unregisterAllCommands()
-{
-   if (ShellCommandClass::commandClassList != NULL)
-  {
-    // unregister all commands and Classes
+
+  std::list<ShellCommandClass*>* ShellCommandClass::commandClassList = NULL;
+  std::list<ShellCommandAlias*>* ShellCommandClass::aliasList = NULL;
+
+  /**
+   * creates a new ShellCommandClass
+   * @param className the Name of the command-class to create
+   */
+  ShellCommandClass::ShellCommandClass(const std::string& className)
+      : className(className)
+  {
+    this->setClassID(CL_SHELL_COMMAND_CLASS, "ShellCommandClass");
+    this->setName(className);
+
+    this->classID = CL_NULL;
+
+    ShellCommandClass::commandClassList->push_back(this);
+  }
+
+  /**
+   * destructs the shellCommandClass again
+   */
+  ShellCommandClass::~ShellCommandClass()
+  {
+    while(this->commandList.size() > 0)
+    {
+      delete this->commandList.front();
+      this->commandList.pop_front();
+    }
+  }
+
+  /**
+   * collects the Commands registered to some class.
+   * @param className the name of the Class to collect the Commands from.
+   * @param stringList a List to paste the Commands into.
+   * @returns true on success, false otherwise
+   */
+  bool ShellCommandClass::getCommandListOfClass(const std::string& className, std::list<std::string>* stringList)
+  {
+    if (stringList == NULL)
+      return false;
+
+    std::list<ShellCommandClass*>::iterator elem;
+    for(elem = ShellCommandClass::commandClassList->begin(); elem != ShellCommandClass::commandClassList->end(); elem++)
+    {
+      if (className == (*elem)->getName())
+      {
+        std::list<ShellCommand*>::iterator command;
+        for(command = (*elem)->commandList.begin(); command != (*elem)->commandList.end(); command++)
+          stringList->push_back((*command)->getName());
+      }
+    }
+    return true;
+  }
+
+  /**
+   * collects the Aliases registered to the ShellCommands
+   * @param stringList a List to paste the Aliases into.
+   * @returns true on success, false otherwise
+   */
+  bool ShellCommandClass::getCommandListOfAlias(std::list<std::string>* stringList)
+  {
+    if (stringList == NULL || ShellCommandClass::aliasList == NULL)
+      return false;
+
+    std::list<ShellCommandAlias*>::iterator alias;
+    for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++)
+      stringList->push_back((*alias)->getName());
+    return true;
+  }
+
+  /**
+   * unregisters all Commands that exist
+   */
+  void ShellCommandClass::unregisterAllCommands()
+  {
+    if (ShellCommandClass::commandClassList != NULL)
+    {
+      // unregister all commands and Classes
+      std::list<ShellCommandClass*>::iterator classIT;
+      for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
+        delete (*classIT);
+      delete ShellCommandClass::commandClassList;
+      ShellCommandClass::commandClassList = NULL;
+    }
+
+    // unregister all aliases (there should be nothing to do here :))
+    if (ShellCommandClass::aliasList != NULL)
+    {
+      std::list<ShellCommandAlias*>::iterator alias;
+      for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++)
+        delete (*alias);
+      delete ShellCommandClass::aliasList;
+      ShellCommandClass::aliasList = NULL;
+    }
+  }
+
+  /**
+   * checks if a Class is already registered to the Commands' class-stack
+   * @param className the Name of the Class to check for
+   * @returns the CommandClass if found, NULL otherwise
+   */
+  const ShellCommandClass* ShellCommandClass::isRegistered(const std::string& className)
+  {
+    if (ShellCommandClass::commandClassList == NULL)
+      initCommandClassList();
+
+    std::list<ShellCommandClass*>::const_iterator classIT;
+    for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
+    {
+      if (className == (*classIT)->className)
+      {
+        if ((*classIT)->classID == CL_NULL)
+          (*classIT)->classID = ClassList::StringToID(className);
+
+        return (*classIT);
+      }
+    }
+    return NULL;
+  }
+
+  /**
+   * searches for a CommandClass
+   * @param className the name of the CommandClass
+   * @returns the CommandClass if found, or a new CommandClass if not
+   */
+  ShellCommandClass* ShellCommandClass::getCommandClass(const std::string& className)
+  {
+    if (ShellCommandClass::commandClassList == NULL)
+      initCommandClassList();
+
     std::list<ShellCommandClass*>::iterator classIT;
     for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
-      delete (*classIT);
-    delete ShellCommandClass::commandClassList;
-    ShellCommandClass::commandClassList = NULL;
-  }
-
-  // unregister all aliases (there should be nothing to do here :))
-  if (ShellCommandClass::aliasList != NULL)
-  {
-    std::list<ShellCommandAlias*>::iterator alias;
-    for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++)
-      delete (*alias);
-    delete ShellCommandClass::aliasList;
-    ShellCommandClass::aliasList = NULL;
-  }
+    {
+      if (className == (*classIT)->className)
+      {
+        return (*classIT);
+      }
+    }
+    return new ShellCommandClass(className);
+  }
+
+  /**
+   * @brief initializes the CommandList (if it is NULL)
+   */
+  void ShellCommandClass::initCommandClassList()
+  {
+    if (ShellCommandClass::commandClassList == NULL)
+    {
+      ShellCommandClass::commandClassList = new std::list<ShellCommandClass*>;
+      ShellCommand::registerCommand("debug", "ShellCommand", ExecutorStatic<ShellCommand>(ShellCommand::debug));
+    }
+  }
+
+  /**
+   * @brief displays help about ShellCommandClass
+   * @param className: the Class of Commands to show help about
+   */
+  void ShellCommandClass::help(const std::string& className)
+  {
+    if (likely(ShellCommandClass::commandClassList != NULL))
+    {
+      std::list<ShellCommandClass*>::iterator classIT;
+      for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
+      {
+        if (className == (*classIT)->className)
+        {
+          PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className.c_str(), (*classIT)->commandList.size());
+          std::list<ShellCommand*>::const_iterator cmdIT;
+          for (cmdIT = (*classIT)->commandList.begin(); cmdIT != (*classIT)->commandList.end(); cmdIT++)
+          {
+            PRINT(0)("  command:'%s' : params:%d: ", (*cmdIT)->getName(), (*cmdIT)->executor->getParamCount());
+            /// FIXME
+            /*          for (unsigned int i = 0; i< elem->paramCount; i++)
+              PRINT(0)("%s ", ShellCommand::paramToString(elem->parameters[i]));*/
+            if (!(*cmdIT)->description.empty())
+              PRINT(0)("- %s", (*cmdIT)->description.c_str());
+            PRINT(0)("\n");
+          }
+          return;
+        }
+      }
+      PRINTF(3)("Class %s not found in Command's classes\n", className.c_str());
+    }
+    else
+    {
+      PRINTF(1)("List of commandClasses does not exist");
+    }
+  }
+
 }
-
-/**
- * checks if a Class is already registered to the Commands' class-stack
- * @param className the Name of the Class to check for
- * @returns the CommandClass if found, NULL otherwise
- */
-const ShellCommandClass* ShellCommandClass::isRegistered(const std::string& className)
-{
-  if (ShellCommandClass::commandClassList == NULL)
-    initCommandClassList();
-
-  list<ShellCommandClass*>::const_iterator classIT;
-  for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
-  {
-    if (className == (*classIT)->className)
-    {
-      if ((*classIT)->classID == CL_NULL)
-        (*classIT)->classID = ClassList::StringToID(className);
-
-      return (*classIT);
-    }
-  }
-  return NULL;
-}
-
-/**
- * searches for a CommandClass
- * @param className the name of the CommandClass
- * @returns the CommandClass if found, or a new CommandClass if not
- */
-ShellCommandClass* ShellCommandClass::getCommandClass(const std::string& className)
-{
-  if (ShellCommandClass::commandClassList == NULL)
-    initCommandClassList();
-
-  list<ShellCommandClass*>::iterator classIT;
-  for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
-  {
-    if (className == (*classIT)->className)
-    {
-      return (*classIT);
-    }
-  }
-  return new ShellCommandClass(className);
-}
-
-/**
- * initializes the CommandList (if it is NULL)
- */
-void ShellCommandClass::initCommandClassList()
-{
-  if (ShellCommandClass::commandClassList == NULL)
-  {
-    ShellCommandClass::commandClassList = new std::list<ShellCommandClass*>;
-    ShellCommand::registerCommand("debug", "ShellCommand", ExecutorStatic<ShellCommand>(ShellCommand::debug));
-  }
-}
-
-/**
- * displays help about ShellCommandClass
- * @param className: the Class of Commands to show help about
- */
-void ShellCommandClass::help(const std::string& className)
-{
-  if (likely(ShellCommandClass::commandClassList != NULL))
-  {
-    list<ShellCommandClass*>::iterator classIT;
-    for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
-    {
-      if (className == (*classIT)->className)
-      {
-        PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className.c_str(), (*classIT)->commandList.size());
-        list<ShellCommand*>::const_iterator cmdIT;
-        for (cmdIT = (*classIT)->commandList.begin(); cmdIT != (*classIT)->commandList.end(); cmdIT++)
-        {
-          PRINT(0)("  command:'%s' : params:%d: ", (*cmdIT)->getName(), (*cmdIT)->executor->getParamCount());
-          /// FIXME
-          /*          for (unsigned int i = 0; i< elem->paramCount; i++)
-            PRINT(0)("%s ", ShellCommand::paramToString(elem->parameters[i]));*/
-          if (!(*cmdIT)->description.empty())
-            PRINT(0)("- %s", (*cmdIT)->description.c_str());
-          PRINT(0)("\n");
-        }
-        return;
-      }
-    }
-    PRINTF(3)("Class %s not found in Command's classes\n", className.c_str());
-  }
-  else
-  {
-    PRINTF(1)("List of commandClasses does not exist");
-  }
-}
-
Index: trunk/src/lib/shell/shell_command_class.h
===================================================================
--- trunk/src/lib/shell/shell_command_class.h	(revision 7373)
+++ trunk/src/lib/shell/shell_command_class.h	(revision 7374)
@@ -11,16 +11,14 @@
 
 
-// FORWARD DECLARATION
+namespace OrxShell
+{
+  // FORWARD DECLARATION
+  class ShellCommand;
+  class ShellCommandAlias;
 
-////////////////
-// BASE CLASS //
-////////////////
-class ShellCommand;
-class ShellCommandAlias;
-
-//! A class to hold all Classes that have (once) registered Commands.
-class ShellCommandClass : public BaseObject
-{
-  friend class ShellCommand;
+  //! A class to hold all Classes that have (once) registered Commands.
+  class ShellCommandClass : public BaseObject
+  {
+    friend class ShellCommand;
 
   public:
@@ -48,5 +46,7 @@
     static std::list<ShellCommandClass*>*  commandClassList;          //!< A list of Classes
     static std::list<ShellCommandAlias*>*  aliasList;                 //!< An Alias to A Command. (only for classes with one Instance)
-};
+  };
+
+}
 
 #endif /* _SHELL_COMMAND_H */
Index: trunk/src/lib/shell/shell_completion.cc
===================================================================
--- trunk/src/lib/shell/shell_completion.cc	(revision 7373)
+++ trunk/src/lib/shell/shell_completion.cc	(revision 7374)
@@ -14,10 +14,9 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL
 
 #include "shell_completion.h"
 #include "shell_command_class.h"
 
-#include "shell_input.h"
 #include "shell_command.h"
 
@@ -26,321 +25,324 @@
 #include "debug.h"
 
-using namespace std;
-
-/**
- * @brief standard constructor
- */
-ShellCompletion::ShellCompletion()
-{ }
-
-
-/**
- * @brief standard deconstructor
- */
-ShellCompletion::~ShellCompletion ()
-{ }
-
-
-
-/**
- * @brief autocompletes the Shell's inputLine
- * @param input the input to complete.
- * @returns true, if a result was found, false otherwise
- */
-bool ShellCompletion::autoComplete(std::string& input)
+namespace OrxShell
 {
-  const char* completionLine;           //< the inputLine we complete.
-
-  long classID;                         //< the classID retrieved from the Class.
-  const std::list<BaseObject*>* objectList;   //< the list of Objects stored in classID
-  bool emptyComplete = false;           //< if the completion input is empty string. e.g ""
-  long completeType = NullCompletion;   //< the Type we'd like to complete.
-  std::string completeString;           //< the string to complete.
-
-
-  PRINTF(5)("AutoComplete on input\n");
-  this->clearCompletionList();
-
-  // Check if we are in a input. eg. the supplied string "class " and now we complete either function or object
-  if (input[input.size()-1] == ' ')
-    emptyComplete = true;
-
-  // CREATE INPUTS
-  SubString inputSplits(input, SubString::WhiteSpacesWithComma);
-
-  // What String will be completed
-  if (emptyComplete == true)
-    completeString = "";
-  else
-    completeString = inputSplits.getString(inputSplits.size()-1);
-
-  // CLASS COMPLETION
-  if (inputSplits.size() == 0)
-  {
-    completeType |= ClassCompletion;
-    completeType |= AliasCompletion;
-  }
-  else if (inputSplits.size() == 1 && emptyComplete == false)
-  {
-    completeType |= ClassCompletion;
-    completeType |= AliasCompletion;
-  }
-
-  // OBJECT/FUNCTION COMPLETIONS
-  else if ((inputSplits.size() == 1 && emptyComplete == true) ||
-            (inputSplits.size() == 2 && emptyComplete == false))
-  {
-    classID = ClassList::StringToID(inputSplits.getString(0));
-    objectList = ClassList::getList((ClassID)classID);
-    if (classID != CL_NULL)
-      completeType |= ObjectCompletion;
-    //if (objectList != NULL && objectList->getSize() == 1)
+
+  /**
+   * @brief standard constructor
+   */
+  ShellCompletion::ShellCompletion()
+  { }
+
+
+  /**
+   * @brief standard deconstructor
+   */
+  ShellCompletion::~ShellCompletion ()
+  { }
+
+
+
+  /**
+   * @brief autocompletes the Shell's inputLine
+   * @param input the input to complete.
+   * @returns true, if a result was found, false otherwise
+   */
+  bool ShellCompletion::autoComplete(std::string& input)
+  {
+    const char* completionLine;           //< the inputLine we complete.
+
+    long classID;                         //< the classID retrieved from the Class.
+    const std::list<BaseObject*>* objectList;   //< the list of Objects stored in classID
+    bool emptyComplete = false;           //< if the completion input is empty string. e.g ""
+    long completeType = NullCompletion;   //< the Type we'd like to complete.
+    std::string completeString;           //< the string to complete.
+
+
+    PRINTF(5)("AutoComplete on input\n");
+    this->clearCompletionList();
+
+    // Check if we are in a input. eg. the supplied string "class " and now we complete either function or object
+    if (input[input.size()-1] == ' ')
+      emptyComplete = true;
+
+    // CREATE INPUTS
+    SubString inputSplits(input, SubString::WhiteSpacesWithComma);
+
+    // What String will be completed
+    if (emptyComplete == true)
+      completeString = "";
+    else
+      completeString = inputSplits.getString(inputSplits.size()-1);
+
+    // CLASS COMPLETION
+    if (inputSplits.size() == 0)
+    {
+      completeType |= ClassCompletion;
+      completeType |= AliasCompletion;
+    }
+    else if (inputSplits.size() == 1 && emptyComplete == false)
+    {
+      completeType |= ClassCompletion;
+      completeType |= AliasCompletion;
+    }
+
+    // OBJECT/FUNCTION COMPLETIONS
+    else if ((inputSplits.size() == 1 && emptyComplete == true) ||
+             (inputSplits.size() == 2 && emptyComplete == false))
+    {
+      classID = ClassList::StringToID(inputSplits.getString(0));
+      objectList = ClassList::getList((ClassID)classID);
+      if (classID != CL_NULL)
+        completeType |= ObjectCompletion;
+      //if (objectList != NULL && objectList->getSize() == 1)
       completeType |= FunctionCompletion;
-  }
-  else if ((inputSplits.size() == 2 && emptyComplete == true) ||
-            (inputSplits.size() == 3 && emptyComplete == false))
-  {
-    classID = ClassList::StringToID(inputSplits.getString(0));
-    if (classID == CL_NULL)
-      return false;
+    }
+    else if ((inputSplits.size() == 2 && emptyComplete == true) ||
+             (inputSplits.size() == 3 && emptyComplete == false))
+    {
+      classID = ClassList::StringToID(inputSplits.getString(0));
+      if (classID == CL_NULL)
+        return false;
+      else
+        completeType |= FunctionCompletion;
+    }
+
+    if (completeType & ClassCompletion)
+      this->objectComplete(completeString, CL_SHELL_COMMAND_CLASS);
+    if (completeType & ObjectCompletion)
+      this->objectComplete(completeString, classID);
+    if (completeType & FunctionCompletion)
+      this->functionComplete(completeString, inputSplits.getString(0));
+    if (completeType & AliasCompletion)
+      this->aliasComplete(completeString);
+
+
+    this->generalComplete(input, completeString);
+    return true;
+  }
+
+  /**
+   * @brief autocompletes a className
+   * @param classBegin the Beginning of a String to autoComplete
+   * @return true on success, false otherwise
+   */
+  bool ShellCompletion::classComplete(const std::string& classBegin)
+  {
+    const std::list<std::string>* clList = ClassList::getClassNames();
+    if (clList != NULL)
+    {
+      if (!this->addToCompleteList(*clList, classBegin, ClassCompletion))
+        return false;
+    }
     else
-     completeType |= FunctionCompletion;
-  }
-
-  if (completeType & ClassCompletion)
-    this->objectComplete(completeString, CL_SHELL_COMMAND_CLASS);
-  if (completeType & ObjectCompletion)
-    this->objectComplete(completeString, classID);
-  if (completeType & FunctionCompletion)
-    this->functionComplete(completeString, inputSplits.getString(0));
-  if (completeType & AliasCompletion)
-    this->aliasComplete(completeString);
-
-
-  this->generalComplete(input, completeString);
-  return true;
+      return false;
+    return true;
+  }
+
+  /**
+   * @brief autocompletes an ObjectName
+   * @param objectBegin the beginning string of a Object
+   * @param classID the ID of the Class to search for.
+   * @return true on success, false otherwise
+   */
+  bool ShellCompletion::objectComplete(const std::string& objectBegin, long classID)
+  {
+    const std::list<BaseObject*>* boList = ClassList::getList((ClassID)classID);
+    if (boList != NULL)
+    {
+      CompletionType type = ObjectCompletion;
+      if (classID == CL_SHELL_COMMAND_CLASS)
+        type = ClassCompletion;
+      if (!this->addToCompleteList(*boList, objectBegin, type))
+        return false;
+    }
+    else
+      return false;
+    return true;
+  }
+
+  /**
+   * @brief completes a Function
+   * @param functionBegin the beginning of the function String
+   * @param classID the class' ID to complete the function of
+   */
+  bool ShellCompletion::functionComplete(const std::string& functionBegin, const std::string& className)
+  {
+    std::list<std::string> fktList;
+    ShellCommandClass::getCommandListOfClass(className, &fktList);
+    //printf("%s\n", boList->firstElement()->getName());
+    if (!this->addToCompleteList(fktList, functionBegin, FunctionCompletion))
+      return false;
+    return true;
+  }
+
+  /**
+   * @brief completes an Alias
+   * @param aliasBegin the beginning of the Alias-String to complete
+   * @returns true on succes, false if something went wrong
+   */
+  bool ShellCompletion::aliasComplete(const std::string& aliasBegin)
+  {
+    std::list<std::string> aliasList;
+    ShellCommandClass::getCommandListOfAlias(&aliasList);
+    //printf("%s\n", boList->firstElement()->getName());
+    if (!this->addToCompleteList(aliasList, aliasBegin, AliasCompletion))
+      return false;
+    return true;
+  }
+
+
+  /**
+   * @brief completes the inputline on grounds of an inputList
+   * @param input the Input to complete.
+   * @param begin the String to search in the inputList, and to extend with it.
+   * @param displayAs how to display the found value to the user, printf-style, !!with only one %s!! ex.: "::%s::"
+   * @param addBack what should be added at the end of the completion
+   * @param addFront what should be added to the front of one finished completion
+   * @return true if ok, false otherwise
+   */
+  bool ShellCompletion::generalComplete(std::string& input,
+                                        const std::string& begin, const std::string& displayAs,
+                                        const std::string& addBack, const std::string& addFront)
+  {
+    if (completionList.size() == 0)
+      return false;
+
+    CompletionElement addElem = completionList.front();
+    const std::string& addString = addElem.name;
+    unsigned int addLength = 0;
+    unsigned int inputLenght = begin.size();
+
+    // Determin the longest Match
+    addLength = addString.size();
+
+    CompletionType changeType = NullCompletion;
+    std::vector<CompletionElement>::iterator charIT;
+    for (charIT = completionList.begin(); charIT != completionList.end(); charIT++)
+    {
+      if ((*charIT).type != changeType)
+      {
+        if (changeType != NullCompletion)
+          PRINT(0)("\n");
+        PRINT(0)("%s: ", ShellCompletion::typeToString((*charIT).type).c_str());
+        changeType = (*charIT).type;
+      }
+      PRINTF(0)("%s ", (*charIT).name.c_str());
+      for (unsigned int i = inputLenght; i < addLength; i++)
+        if (addString[i] != (*charIT).name[i])
+        {
+          addLength = i;
+          //       break;
+        }
+    }
+    PRINT(0)("\n");
+
+    if (addLength >= inputLenght)
+    {
+      std::string adder = addString;
+      adder.resize(addLength);
+
+      input.resize(input.size()-inputLenght);
+      input += adder;
+
+      if (completionList.size() == 1)
+      {
+        if ( addBack != "")
+          input += addBack;
+        input += ' ';
+      }
+    }
+    return true;
+  }
+
+  /**
+   * @brief searches for classes, which beginn with completionBegin
+   * @param inputList the List to parse through
+   * @param completionBegin the beginning string
+   * !! The strings MUST NOT be deleted !!
+   */
+  bool ShellCompletion::addToCompleteList(const std::list<std::string>& inputList, const std::string& completionBegin, CompletionType type)
+  {
+    unsigned int searchLength = completionBegin.size();
+
+    std::list<std::string>::const_iterator string;
+    for (string = inputList.begin(); string != inputList.end(); string++)
+    {
+      if ((*string).size() >= searchLength &&
+          !nocaseCmp(*string, completionBegin, searchLength))
+      {
+        printf ("%s\n", (*string).c_str());
+        CompletionElement newElem;
+        newElem.name = (*string);
+        newElem.type = type;
+        this->completionList.push_back(newElem);
+      }
+    }
+    return true;
+  }
+
+  /**
+   * @brief searches for classes, which beginn with completionBegin
+   * @param inputList the List to parse through
+   * @param completionBegin the beginning string
+   * !! The strings MUST NOT be deleted !!
+   */
+  bool ShellCompletion::addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, CompletionType type)
+  {
+    unsigned int searchLength = completionBegin.size();
+
+    std::list<BaseObject*>::const_iterator bo;
+    for(bo = inputList.begin(); bo != inputList.end(); bo++)
+    {
+      if ((*bo)->getName() != NULL &&
+          strlen((*bo)->getName()) >= searchLength &&
+          !nocaseCmp((*bo)->getName(), completionBegin, searchLength))
+      {
+        CompletionElement newElem;
+        newElem.name = (*bo)->getName();
+        newElem.type = type;
+        this->completionList.push_back(newElem);
+      }
+    }
+
+    return true;
+  }
+
+  /**
+   * @brief deletes the Completion List.
+   *
+   * This is done at the beginning of each completion-run
+   */
+  void ShellCompletion::clearCompletionList()
+  {
+    this->completionList.clear();
+  }
+
+  const std::string& ShellCompletion::typeToString(CompletionType type)
+  {
+    switch (type)
+    {
+      default:// SHELLC_NONE
+        return typeNames[0];
+      case  ClassCompletion:
+        return typeNames[1];
+      case ObjectCompletion:
+        return typeNames[2];
+      case FunctionCompletion:
+        return typeNames[3];
+      case AliasCompletion:
+        return typeNames[4];
+    }
+  }
+
+
+  const std::string ShellCompletion::typeNames[] =
+    {
+      "error",
+      "class",
+      "object",
+      "function",
+      "alias"
+    };
+
 }
-
-/**
- * @brief autocompletes a className
- * @param classBegin the Beginning of a String to autoComplete
- * @return true on success, false otherwise
- */
-bool ShellCompletion::classComplete(const std::string& classBegin)
-{
-  const std::list<std::string>* clList = ClassList::getClassNames();
-  if (clList != NULL)
-  {
-    if (!this->addToCompleteList(*clList, classBegin, ClassCompletion))
-      return false;
-  }
-  else
-    return false;
-  return true;
-}
-
-/**
- * @brief autocompletes an ObjectName
- * @param objectBegin the beginning string of a Object
- * @param classID the ID of the Class to search for.
- * @return true on success, false otherwise
- */
-bool ShellCompletion::objectComplete(const std::string& objectBegin, long classID)
-{
-  const std::list<BaseObject*>* boList = ClassList::getList((ClassID)classID);
-  if (boList != NULL)
-  {
-    CompletionType type = ObjectCompletion;
-    if (classID == CL_SHELL_COMMAND_CLASS)
-      type = ClassCompletion;
-    if (!this->addToCompleteList(*boList, objectBegin, type))
-      return false;
-  }
-  else
-    return false;
-  return true;
-}
-
-/**
- * @brief completes a Function
- * @param functionBegin the beginning of the function String
- * @param classID the class' ID to complete the function of
- */
-bool ShellCompletion::functionComplete(const std::string& functionBegin, const std::string& className)
-{
-  std::list<std::string> fktList;
-  ShellCommandClass::getCommandListOfClass(className, &fktList);
-  //printf("%s\n", boList->firstElement()->getName());
-  if (!this->addToCompleteList(fktList, functionBegin, FunctionCompletion))
-    return false;
-  return true;
-}
-
-/**
- * @brief completes an Alias
- * @param aliasBegin the beginning of the Alias-String to complete
- * @returns true on succes, false if something went wrong
- */
-bool ShellCompletion::aliasComplete(const std::string& aliasBegin)
-{
-  std::list<std::string> aliasList;
-  ShellCommandClass::getCommandListOfAlias(&aliasList);
-  //printf("%s\n", boList->firstElement()->getName());
-  if (!this->addToCompleteList(aliasList, aliasBegin, AliasCompletion))
-    return false;
-  return true;
-}
-
-
-/**
- * @brief completes the inputline on grounds of an inputList
- * @param input the Input to complete.
- * @param begin the String to search in the inputList, and to extend with it.
- * @param displayAs how to display the found value to the user, printf-style, !!with only one %s!! ex.: "::%s::"
- * @param addBack what should be added at the end of the completion
- * @param addFront what should be added to the front of one finished completion
- * @return true if ok, false otherwise
- */
-bool ShellCompletion::generalComplete(std::string& input,
-                                      const std::string& begin, const std::string& displayAs,
-                                      const std::string& addBack, const std::string& addFront)
-{
-  if (completionList.size() == 0)
-    return false;
-
-  CompletionElement addElem = completionList.front();
-  const std::string& addString = addElem.name;
-  unsigned int addLength = 0;
-  unsigned int inputLenght = begin.size();
-
-  // Determin the longest Match
-  addLength = addString.size();
-
-  CompletionType changeType = NullCompletion;
-  std::vector<CompletionElement>::iterator charIT;
-  for (charIT = completionList.begin(); charIT != completionList.end(); charIT++)
-  {
-    if ((*charIT).type != changeType)
-    {
-      if (changeType != NullCompletion)
-        PRINT(0)("\n");
-      PRINT(0)("%s: ", ShellCompletion::typeToString((*charIT).type).c_str());
-      changeType = (*charIT).type;
-    }
-    PRINTF(0)("%s ", (*charIT).name.c_str());
-    for (unsigned int i = inputLenght; i < addLength; i++)
-      if (addString[i] != (*charIT).name[i])
-      {
-       addLength = i;
-//       break;
-      }
-  }
-  PRINT(0)("\n");
-
-  if (addLength >= inputLenght)
-  {
-    std::string adder = addString;
-    adder.resize(addLength);
-
-    input.resize(input.size()-inputLenght);
-    input += adder;
-
-    if (completionList.size() == 1)
-    {
-      if ( addBack != "")
-       input += addBack;
-      input += ' ';
-    }
-  }
-  return true;
-}
-
-/**
- * @brief searches for classes, which beginn with completionBegin
- * @param inputList the List to parse through
- * @param completionBegin the beginning string
- * !! The strings MUST NOT be deleted !!
- */
-bool ShellCompletion::addToCompleteList(const std::list<std::string>& inputList, const std::string& completionBegin, CompletionType type)
-{
-  unsigned int searchLength = completionBegin.size();
-
-  std::list<std::string>::const_iterator string;
-  for (string = inputList.begin(); string != inputList.end(); string++)
-  {
-    if ((*string).size() >= searchLength &&
-          !nocaseCmp(*string, completionBegin, searchLength))
-    {
-      printf ("%s\n", (*string).c_str());
-      CompletionElement newElem;
-      newElem.name = (*string);
-      newElem.type = type;
-      this->completionList.push_back(newElem);
-    }
-  }
-  return true;
-}
-
-/**
- * @brief searches for classes, which beginn with completionBegin
- * @param inputList the List to parse through
- * @param completionBegin the beginning string
- * !! The strings MUST NOT be deleted !!
- */
-bool ShellCompletion::addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, CompletionType type)
-{
-  unsigned int searchLength = completionBegin.size();
-
-  std::list<BaseObject*>::const_iterator bo;
-  for(bo = inputList.begin(); bo != inputList.end(); bo++)
-  {
-    if ((*bo)->getName() != NULL &&
-        strlen((*bo)->getName()) >= searchLength &&
-          !nocaseCmp((*bo)->getName(), completionBegin, searchLength))
-    {
-      CompletionElement newElem;
-      newElem.name = (*bo)->getName();
-      newElem.type = type;
-      this->completionList.push_back(newElem);
-    }
-  }
-
-  return true;
-}
-
-/**
- * @brief deletes the Completion List.
- *
- * This is done at the beginning of each completion-run
- */
-void ShellCompletion::clearCompletionList()
-{
-  this->completionList.clear();
-}
-
-const std::string& ShellCompletion::typeToString(CompletionType type)
-{
-  switch (type)
-  {
-    default:// SHELLC_NONE
-      return typeNames[0];
-    case  ClassCompletion:
-      return typeNames[1];
-    case ObjectCompletion:
-      return typeNames[2];
-    case FunctionCompletion:
-      return typeNames[3];
-    case AliasCompletion:
-      return typeNames[4];
-  }
-}
-
-
-const std::string ShellCompletion::typeNames[] =
-{
-  "error",
-  "class",
-  "object",
-  "function",
-  "alias"
-};
Index: trunk/src/lib/shell/shell_completion.h
===================================================================
--- trunk/src/lib/shell/shell_completion.h	(revision 7373)
+++ trunk/src/lib/shell/shell_completion.h	(revision 7374)
@@ -16,63 +16,61 @@
 // FORWARD DECLARATION
 class BaseObject;
-class ShellInput;
-#ifndef NULL
-#define NULL 0            //!< a pointer to NULL
-#endif
+
+namespace OrxShell
+{
+  //! A class for Completing the an InputString.
+  class ShellCompletion
+  {
+    //! an enumerator for different types the Shell can complete.
+    typedef enum {
+      NullCompletion         = 0,
+      ClassCompletion        = 1,
+      ObjectCompletion       = 2,
+      FunctionCompletion     = 4,
+      AliasCompletion        = 8,
+    } CompletionType;
+
+    //! A struct for ShellElements (these are used as containers to identify an Input for what it is)
+    struct CompletionElement
+    {
+      std::string     name;     //!< the Name of the Element to be completed.
+      CompletionType  type;     //!< the type of the Element
+    };
+
+  public:
+    ShellCompletion();
+    virtual ~ShellCompletion();
 
 
-//! A class for Completing the an InputString.
-class ShellCompletion
-{
+    // Functions to produce the Complete Lists.
+    bool autoComplete(std::string& input);
+    bool classComplete(const std::string& classBegin);
+    //  long classMatch(const char* input, unsigned int* length);
+    bool objectComplete(const std::string& objectBegin, long classID);
+    //  bool objectMatch(const char* objectBegin, long classID, unsigned int* length);
+    bool functionComplete(const std::string& functionBegin, const std::string& className);
+    //  bool functionMatch(const char* functionBegin, long classID, unsigned int* length);
+    bool aliasComplete(const std::string& aliasBegin);
 
-  //! an enumerator for different types the Shell can complete.
-  typedef enum {
-    NullCompletion         = 0,
-    ClassCompletion        = 1,
-    ObjectCompletion       = 2,
-    FunctionCompletion     = 4,
-    AliasCompletion        = 8,
-  } CompletionType;
+    bool generalComplete(std::string& input,
+                         const std::string& begin, const std::string& displayAs = "%s",
+                         const std::string& addBack = "", const std::string& addFront = "");
 
-  //! A struct for ShellElements (these are used as containers to identify an Input for what it is)
-  struct CompletionElement
-  {
-    std::string     name;     //!< the Name of the Element to be completed.
-    CompletionType type;     //!< the type of the Element
+
+    bool addToCompleteList(const std::list<std::string>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type);
+    bool addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type);
+    void clearCompletionList();
+
+
+    // Helpers.
+    static const std::string& ShellCompletion::typeToString(ShellCompletion::CompletionType type);
+
+  private:
+    std::vector<CompletionElement>  completionList;          //!< A list of completions, that are io.
+
+    static const std::string        typeNames[];             //!< A list of Completion-Type-Names.
   };
 
-public:
-  ShellCompletion();
-  virtual ~ShellCompletion();
-
-
-  // Functions to produce the Complete Lists.
-  bool autoComplete(std::string& input);
-  bool classComplete(const std::string& classBegin);
-  //  long classMatch(const char* input, unsigned int* length);
-  bool objectComplete(const std::string& objectBegin, long classID);
-  //  bool objectMatch(const char* objectBegin, long classID, unsigned int* length);
-  bool functionComplete(const std::string& functionBegin, const std::string& className);
-  //  bool functionMatch(const char* functionBegin, long classID, unsigned int* length);
-  bool aliasComplete(const std::string& aliasBegin);
-
-  bool generalComplete(std::string& input,
-                       const std::string& begin, const std::string& displayAs = "%s",
-                       const std::string& addBack = "", const std::string& addFront = "");
-
-
-  bool addToCompleteList(const std::list<std::string>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type);
-  bool addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type);
-  void clearCompletionList();
-
-
-  // Helpers.
-  static const std::string& ShellCompletion::typeToString(ShellCompletion::CompletionType type);
-
-private:
-  std::vector<CompletionElement>  completionList;          //!< A list of completions, that are io.
-
-  static const std::string        typeNames[];             //!< A list of Completion-Type-Names.
-};
+}
 
 #endif /* _SHELL_COMPLETION_H */
Index: trunk/src/lib/shell/shell_completion_plugin.cc
===================================================================
--- trunk/src/lib/shell/shell_completion_plugin.cc	(revision 7374)
+++ trunk/src/lib/shell/shell_completion_plugin.cc	(revision 7374)
@@ -0,0 +1,40 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL
+
+#include "shell_completion_plugin.h"
+#include "shell_command_class.h"
+
+#include "shell_command.h"
+
+#include "substring.h"
+#include "class_list.h"
+#include "debug.h"
+
+namespace OrxShell
+{
+
+
+
+  void ShellCompletorStringArray::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin)
+  {
+    unsigned int inputLen = completionBegin.size();
+    for (unsigned int i = 0; i < this->_size; ++i)
+      if (!nocaseCmp(this->_stringArray[i], completionBegin, inputLen))
+        completionList.push_back(this->_stringArray[i]);
+  }
+};
+
Index: trunk/src/lib/shell/shell_completion_plugin.h
===================================================================
--- trunk/src/lib/shell/shell_completion_plugin.h	(revision 7374)
+++ trunk/src/lib/shell/shell_completion_plugin.h	(revision 7374)
@@ -0,0 +1,58 @@
+/*!
+ * @file shell_completion_plugin.h
+ * @brief The Shell Completion Plugin
+ */
+
+#ifndef _SHELL_COMPLETION_PLUGIN_H
+#define _SHELL_COMPLETION_PLUGIN_H
+
+#include <list>
+#include <vector>
+#include <string>
+
+namespace OrxShell
+{
+  class ShellCompletor
+  {
+  public:
+    virtual void addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) = 0;
+    virtual ~ShellCompletor() { };
+
+  protected:
+    ShellCompletor();
+  };
+
+  class ShellCompletorStringArray : public ShellCompletor
+  {
+  public:
+    ShellCompletorStringArray(const std::string* stringArray, unsigned int size)
+      : _stringArray(stringArray), _size(size) {};
+    virtual void addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin);
+
+  private:
+    const std::string*   _stringArray;
+    unsigned int         _size;
+  };
+
+
+  //! A Templated Completor
+  template<typename CLASS> class ShellCompletorTList : public ShellCompletor
+  {
+  public:
+    ShellCompletorTList(const std::list<CLASS*>& completionList);
+    virtual void addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin)
+    {};
+  };
+
+
+  //! A class for Completing the an InputString.
+  class ShellCompletionPlugin
+  {
+  public:
+    ShellCompletionPlugin();
+
+
+  };
+
+}
+#endif /* _SHELL_COMPLETION_PLUGIN_H */
Index: trunk/src/lib/shell/shell_input.cc
===================================================================
--- trunk/src/lib/shell/shell_input.cc	(revision 7373)
+++ trunk/src/lib/shell/shell_input.cc	(revision 7374)
@@ -14,5 +14,5 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL
 
 #include "shell_input.h"
@@ -31,319 +31,324 @@
 
 
-using namespace std;
-
-SHELL_COMMAND(help, ShellInput, help)
-    ->describe("retrieve some help about the input mode")
-    ->setAlias("help");
-
-/**
- * constructor
- * this also generates a ShellCompletion automatically.
-*/
-ShellInput::ShellInput ()
-  : Text ("")
+
+
+
+namespace OrxShell
 {
-  this->pressedKey = SDLK_FIRST;
-  this->setClassID(CL_SHELL_INPUT, "ShellInput");
-
-  this->inputLine = "";
-  this->historyIT = this->history.begin();
-  this->setHistoryLength(50);
-  this->historyScrolling = false;
-  this->delayed = 0;
-  this->setRepeatDelay(.3, .05);
-
-  // subscribe all keyboard commands to ES_SEHLL
-  EventHandler* evh = EventHandler::getInstance();
-  for (int i = 1; i < SDLK_LAST; i++)
-  {
-    if (!evh->isSubscribed(ES_SHELL, i))
-      evh->subscribe(this, ES_SHELL, i);
-  }
-  // unsubscribe unused TODO improve.
-  evh->unsubscribe(ES_SHELL, SDLK_BACKQUOTE);
-  evh->unsubscribe(ES_SHELL, SDLK_F12);
-  evh->unsubscribe(ES_SHELL, SDLK_PAGEUP);
-  evh->unsubscribe(ES_SHELL, SDLK_PAGEDOWN);
+  SHELL_COMMAND(help, ShellInput, help)
+  ->describe("retrieve some help about the input mode")
+  ->setAlias("help");
+
+
+  /**
+   * @brief constructor
+   * this also generates a ShellCompletion automatically.
+  */
+  ShellInput::ShellInput ()
+      : Text ("")
+  {
+    this->pressedKey = SDLK_FIRST;
+    this->setClassID(CL_SHELL_INPUT, "ShellInput");
+
+    this->inputLine = "";
+    this->historyIT = this->history.begin();
+    this->setHistoryLength(50);
+    this->historyScrolling = false;
+    this->delayed = 0;
+    this->setRepeatDelay(.3, .05);
+
+    // subscribe all keyboard commands to ES_SEHLL
+    EventHandler* evh = EventHandler::getInstance();
+    for (int i = 1; i < SDLK_LAST; i++)
+    {
+      if (!evh->isSubscribed(ES_SHELL, i))
+        evh->subscribe(this, ES_SHELL, i);
+    }
+    // unsubscribe unused TODO improve.
+    evh->unsubscribe(ES_SHELL, SDLK_BACKQUOTE);
+    evh->unsubscribe(ES_SHELL, SDLK_F12);
+    evh->unsubscribe(ES_SHELL, SDLK_PAGEUP);
+    evh->unsubscribe(ES_SHELL, SDLK_PAGEDOWN);
+
+  }
+
+  /**
+   * @brief standard deconstructor
+   */
+  ShellInput::~ShellInput ()
+{}
+
+  /**
+   * @brief sets the Repeate-delay and rate
+   * @param repeatDelay the Delay it takes, to repeate a key
+   * @param repeatRate the rate to repeate a pressed key
+   */
+  void ShellInput::setRepeatDelay(float repeatDelay, float repeatRate)
+  {
+    this->repeatDelay = repeatDelay;
+    this->repeatRate = repeatRate;
+  }
+
+  /**
+   * @brief deletes the InputLine
+   */
+  void ShellInput::flush()
+  {
+    this->inputLine.clear();
+    this->setText(this->inputLine);
+  }
+
+  /**
+   * @brief sets the entire text of the InputLine to text
+   * @param text the new Text to set as InputLine
+   */
+  void ShellInput::setInputText(const std::string& text)
+  {
+    this->inputLine = text;
+    this->setText(this->inputLine);
+  }
+
+
+  /**
+   * @brief adds one character to the inputLine
+   * @param character the character to add to the inputLine
+   */
+  void ShellInput::addCharacter(char character)
+  {
+    if (this->historyScrolling)
+    {
+      this->history.pop_back();
+      this->historyScrolling = false;
+    }
+
+    this->inputLine += character;
+    this->setText(this->inputLine);
+  }
+
+  /**
+   * @brief adds multiple Characters to thr inputLine
+   * @param characters a \\0 terminated char-array to add to the InputLine
+   */
+  void ShellInput::addCharacters(const std::string& characters)
+  {
+    if (this->historyScrolling)
+    {
+      this->history.pop_back();
+      this->historyScrolling = false;
+    }
+
+    this->inputLine += characters;
+    this->setText(this->inputLine);
+  }
+
+  /**
+   * @brief removes characterCount characters from the InputLine
+   * @param characterCount the count of Characters to remove from the input Line
+   */
+  void ShellInput::removeCharacters(unsigned int characterCount)
+  {
+    if (this->historyScrolling)
+    {
+      this->history.pop_back();
+      this->historyScrolling = false;
+    }
+    if (this->inputLine.size() < characterCount)
+      characterCount = this->inputLine.size();
+
+    this->inputLine.erase(this->inputLine.size() - characterCount, this->inputLine.size());
+    this->setText(this->inputLine);
+  }
+
+  /**
+   * @brief executes the command stored in the inputLine
+   * @return true if the command was commited successfully, false otherwise
+   */
+  bool ShellInput::executeCommand()
+  {
+    ShellBuffer::addBufferLineStatic("Execute Command: %s\n", this->inputLine.c_str());
+
+    if (this->inputLine.empty())
+      return false;
+
+    ShellCommand::execute(this->inputLine);
+
+    // removing the eventually added Entry (from scrolling) to the List
+    if (this->historyScrolling)
+    {
+      this->history.pop_back();
+      this->historyScrolling = false;
+    }
+
+    // adding the new Command to the History
+    this->history.push_back(this->inputLine);
+    if (this->history.size() > this->historyLength)
+    {
+      this->history.pop_front();
+    }
+
+    this->flush();
+
+    return true;
+  }
+
+
+  /**
+   * @brief moves one entry up in the history.
+   */
+  void ShellInput::historyMoveUp()
+  {
+    if (!this->historyScrolling)
+    {
+      this->history.push_back(this->inputLine);
+      this->historyScrolling = true;
+      this->historyIT = --this->history.end();
+    }
+
+    if(this->historyIT != this->history.begin())
+    {
+      std::string prevElem = *(--this->historyIT);
+      /*if (prevElem == NULL) /// TODO STD
+        return;
+      else */
+      {
+        this->flush();
+        this->setInputText(prevElem);
+      }
+    }
+  }
+
+  /**
+   * @brief moves one entry down in the history
+   */
+  void ShellInput::historyMoveDown()
+  {
+    if (!this->historyScrolling)
+      return;
+    if (!this->history.empty() && this->historyIT != --this->history.end())
+    {
+      std::string nextElem = *(++this->historyIT);
+      /*    if (nextElem == NULL) /// TODO FIX STD
+        return;
+      else */
+      {
+        this->flush();
+        this->setInputText(nextElem);
+      }
+    }
+  }
+
+
+  /**
+   * @brief prints out some nice help about the Shell
+   */
+  void ShellInput::help(const std::string& className, const std::string& functionName)
+  {
+    printf("%s::%s\n", className.c_str(), functionName.c_str());
+
+    if (className.empty())
+    {
+      PRINT(0)("Help for the most important Shell-commands\n");
+      PRINT(0)("F1 - HELP; F2 - DEBUG; '`' - open/close shell\n");
+      PRINT(0)("input order:\n");
+      PRINT(0)("ClassName [objectName] function [parameter1, [parameter2 ...]]  or\n");
+      PRINT(0)("Alias [parameter]\n");
+      PRINT(0)("- Also try 'help className'");
+    }
+    else if (!className.empty() && functionName.empty())
+    {
+      ShellCommandClass::help(className);
+      //PRINTF(1)("%s::%s\n", className, functionName);
+    }
+  }
+
+  /**
+   * @brief ticks the ShellInput
+   * @param dt the time passed since the last update
+   */
+  void ShellInput::tick(float dt)
+  {
+    if (this->delayed > 0.0)
+      this->delayed -= dt;
+    else if (this->pressedKey != SDLK_FIRST )
+    {
+      this->delayed = this->repeatRate;
+      switch (this->pressedKey )
+      {
+        case SDLK_BACKSPACE:
+          this->removeCharacters(1);
+          break;
+        case SDLK_UP:
+          this->historyMoveUp();
+          break;
+        case SDLK_DOWN:
+          this->historyMoveDown();
+          break;
+        default:
+          {
+            if (likely(pressedKey < 127))
+              this->addCharacter(this->pressedKey);
+          }
+      }
+    }
+  }
+
+  /**
+   * @brief listens for some event
+   * @param event the Event happened
+   */
+  void ShellInput::process(const Event &event)
+  {
+    if (event.bPressed)
+    {
+      PRINTF(5)("Shell received command %s\n", SDLKToKeyname(event.type));
+      if (event.type == SDLK_F1)
+        this->help();
+      else if (event.type == SDLK_F2)
+      {
+        ;//this->debug();
+      }
+      else if (event.type == SDLK_UP)
+      {
+        this->historyMoveUp();
+        this->pressedKey = event.type;
+      }
+      else if (event.type == SDLK_DOWN)
+      {
+        this->historyMoveDown();
+        this->pressedKey = event.type;
+      }
+      else if (event.type == SDLK_TAB)
+      {
+        this->completion.autoComplete(this->inputLine);
+        this->setText(this->inputLine);
+      }
+      else if (event.type == SDLK_BACKSPACE)
+      {
+        this->delayed = this->repeatDelay;
+        this->pressedKey = SDLK_BACKSPACE;
+        this->removeCharacters(1);
+      }
+      else if (event.type == SDLK_RETURN)
+      {
+        this->executeCommand();
+        this->pressedKey = event.type;
+      }
+      // any other keyboard key
+      else if (likely(event.type < 127))
+      {
+        this->addCharacter(event.x);
+        this->pressedKey = event.x;
+      }
+      this->delayed = this->repeatDelay;
+    }
+    else // if(!event.bPressed)
+    {
+      if (this->pressedKey == event.x || this->pressedKey == event.type)
+      {
+        this->pressedKey = 0;
+        this->delayed = 0.0;
+      }
+    }
+  }
 
 }
-
-/**
- * @brief standard deconstructor
- */
-ShellInput::~ShellInput ()
-{
-}
-
-/**
- * @brief sets the Repeate-delay and rate
- * @param repeatDelay the Delay it takes, to repeate a key
- * @param repeatRate the rate to repeate a pressed key
- */
-void ShellInput::setRepeatDelay(float repeatDelay, float repeatRate)
-{
-  this->repeatDelay = repeatDelay;
-  this->repeatRate = repeatRate;
-}
-
-/**
- * @brief deletes the InputLine
- */
-void ShellInput::flush()
-{
-  this->inputLine.clear();
-  this->setText(this->inputLine);
-}
-
-/**
- * @brief sets the entire text of the InputLine to text
- * @param text the new Text to set as InputLine
- */
-void ShellInput::setInputText(const std::string& text)
-{
-  this->inputLine = text;
-  this->setText(this->inputLine);
-}
-
-
-/**
- * @brief adds one character to the inputLine
- * @param character the character to add to the inputLine
- */
-void ShellInput::addCharacter(char character)
-{
-  if (this->historyScrolling)
-  {
-    this->history.pop_back();
-    this->historyScrolling = false;
-  }
-
-  this->inputLine += character;
-  this->setText(this->inputLine);
-}
-
-/**
- * @brief adds multiple Characters to thr inputLine
- * @param characters a \\0 terminated char-array to add to the InputLine
- */
-void ShellInput::addCharacters(const std::string& characters)
-{
-  if (this->historyScrolling)
-  {
-    this->history.pop_back();
-    this->historyScrolling = false;
-  }
-
-  this->inputLine += characters;
-  this->setText(this->inputLine);
-}
-
-/**
- * @brief removes characterCount characters from the InputLine
- * @param characterCount the count of Characters to remove from the input Line
- */
-void ShellInput::removeCharacters(unsigned int characterCount)
-{
-  if (this->historyScrolling)
-  {
-    this->history.pop_back();
-    this->historyScrolling = false;
-  }
-  if (this->inputLine.size() < characterCount)
-    characterCount = this->inputLine.size();
-
-  this->inputLine.erase(this->inputLine.size() - characterCount, this->inputLine.size());
-  this->setText(this->inputLine);
-}
-
-/**
- * @brief executes the command stored in the inputLine
- * @return true if the command was commited successfully, false otherwise
- */
-bool ShellInput::executeCommand()
-{
-  ShellBuffer::addBufferLineStatic("Execute Command: %s\n", this->inputLine.c_str());
-
-  if (this->inputLine.empty())
-    return false;
-
-  ShellCommand::execute(this->inputLine);
-
-  // removing the eventually added Entry (from scrolling) to the List
-  if (this->historyScrolling)
-  {
-    this->history.pop_back();
-    this->historyScrolling = false;
-  }
-
-  // adding the new Command to the History
-  this->history.push_back(this->inputLine);
-  if (this->history.size() > this->historyLength)
-  {
-    this->history.pop_front();
-  }
-
-  this->flush();
-
-  return true;
-}
-
-
-/**
- * @brief moves one entry up in the history.
- */
-void ShellInput::historyMoveUp()
-{
-  if (!this->historyScrolling)
-  {
-    this->history.push_back(this->inputLine);
-    this->historyScrolling = true;
-    this->historyIT = --this->history.end();
-  }
-
-  if(this->historyIT != this->history.begin())
-  {
-    std::string prevElem = *(--this->historyIT);
-    /*if (prevElem == NULL) /// TODO STD
-      return;
-    else */
-    {
-      this->flush();
-      this->setInputText(prevElem);
-    }
-  }
-}
-
-/**
- * @brief moves one entry down in the history
- */
-void ShellInput::historyMoveDown()
-{
-  if (!this->historyScrolling)
-    return;
-  if (!this->history.empty() && this->historyIT != --this->history.end())
-  {
-    std::string nextElem = *(++this->historyIT);
-    /*    if (nextElem == NULL) /// TODO FIX STD
-      return;
-    else */
-    {
-      this->flush();
-      this->setInputText(nextElem);
-    }
-  }
-}
-
-
-/**
- * @brief prints out some nice help about the Shell
- */
-void ShellInput::help(const std::string& className, const std::string& functionName)
-{
-  printf("%s::%s\n", className.c_str(), functionName.c_str());
-
-  if (className.empty())
-  {
-    PRINT(0)("Help for the most important Shell-commands\n");
-    PRINT(0)("F1 - HELP; F2 - DEBUG; '`' - open/close shell\n");
-    PRINT(0)("input order:\n");
-    PRINT(0)("ClassName [objectName] function [parameter1, [parameter2 ...]]  or\n");
-    PRINT(0)("Alias [parameter]\n");
-    PRINT(0)("- Also try 'help className'");
-  }
-  else if (!className.empty() && functionName.empty())
-  {
-    ShellCommandClass::help(className);
-    //PRINTF(1)("%s::%s\n", className, functionName);
-  }
-}
-
-/**
- * @brief ticks the ShellInput
- * @param dt the time passed since the last update
- */
-void ShellInput::tick(float dt)
-{
-  if (this->delayed > 0.0)
-    this->delayed -= dt;
-  else if (this->pressedKey != SDLK_FIRST )
-  {
-    this->delayed = this->repeatRate;
-    switch (this->pressedKey )
-    {
-      case SDLK_BACKSPACE:
-        this->removeCharacters(1);
-        break;
-      case SDLK_UP:
-        this->historyMoveUp();
-        break;
-      case SDLK_DOWN:
-        this->historyMoveDown();
-        break;
-      default:
-      {
-        if (likely(pressedKey < 127))
-          this->addCharacter(this->pressedKey);
-      }
-    }
-  }
-}
-
-/**
- * @brief listens for some event
- * @param event the Event happened
- */
-void ShellInput::process(const Event &event)
-{
-  if (event.bPressed)
-  {
-    PRINTF(5)("Shell received command %s\n", SDLKToKeyname(event.type));
-    if (event.type == SDLK_F1)
-      this->help();
-    else if (event.type == SDLK_F2)
-    {
-      ;//this->debug();
-    }
-    else if (event.type == SDLK_UP)
-    {
-      this->historyMoveUp();
-      this->pressedKey = event.type;
-    }
-    else if (event.type == SDLK_DOWN)
-    {
-      this->historyMoveDown();
-      this->pressedKey = event.type;
-    }
-    else if (event.type == SDLK_TAB)
-    {
-      this->completion.autoComplete(this->inputLine);
-      this->setText(this->inputLine);
-    }
-    else if (event.type == SDLK_BACKSPACE)
-    {
-      this->delayed = this->repeatDelay;
-      this->pressedKey = SDLK_BACKSPACE;
-      this->removeCharacters(1);
-    }
-    else if (event.type == SDLK_RETURN)
-    {
-      this->executeCommand();
-      this->pressedKey = event.type;
-    }
-    // any other keyboard key
-    else if (likely(event.type < 127))
-    {
-      this->addCharacter(event.x);
-      this->pressedKey = event.x;
-    }
-    this->delayed = this->repeatDelay;
-  }
-  else // if(!event.bPressed)
-  {
-    if (this->pressedKey == event.x || this->pressedKey == event.type)
-    {
-      this->pressedKey = 0;
-      this->delayed = 0.0;
-    }
-  }
-}
Index: trunk/src/lib/shell/shell_input.h
===================================================================
--- trunk/src/lib/shell/shell_input.h	(revision 7373)
+++ trunk/src/lib/shell/shell_input.h	(revision 7374)
@@ -16,57 +16,62 @@
 #include <list>
 
-// FORWARD DECLARATION
-class ShellCompletion;
+namespace OrxShell
+{
+  // FORWARD DECLARATION
+  class ShellCompletion;
 
-//! An InputLine for the Shell
-/**
- * The ShellInput has the ability to catch and display user input.
- * The ShellInput is auto-completed after the user presses [TAB]
- * The ShellInput is executed (and sent back to the Application) on Pressing [ENTER]
- * [UP] and [DOWN] move through the history of allready given commands.
- */
-class ShellInput : public Text,  public EventListener {
+  //! An InputLine for the Shell
+  /**
+   * The ShellInput has the ability to catch and display user input.
+   * The ShellInput is auto-completed after the user presses [TAB]
+   * The ShellInput is executed (and sent back to the Application) on Pressing [ENTER]
+   * [UP] and [DOWN] move through the history of allready given commands.
+   */
+  class ShellInput : public Text,  public EventListener
+  {
 
- public:
-  ShellInput();
-  virtual ~ShellInput();
+  public:
+    ShellInput();
+    virtual ~ShellInput();
 
-  /** @returns the inputLine */
-  const std::string& getInput() const { return this->inputLine; };
+    /** @returns the inputLine */
+    const std::string& getInput() const { return this->inputLine; };
 
-  // InputLine
-  void flush();
-  void setInputText(const std::string& text);
-  void addCharacter(char character);
-  void addCharacters(const std::string& characters);
-  void removeCharacters(unsigned int characterCount = 1);
-  void setRepeatDelay(float repeatDelay, float repeatRate);
-  bool executeCommand();
+    // InputLine
+    void flush();
+    void setInputText(const std::string& text);
+    void addCharacter(char character);
+    void addCharacters(const std::string& characters);
+    void removeCharacters(unsigned int characterCount = 1);
+    void setRepeatDelay(float repeatDelay, float repeatRate);
+    bool executeCommand();
 
-  /** sets the count of the History's entries */
-  void setHistoryLength(unsigned int historyLength) { this->historyLength = historyLength; };
-  void historyMoveUp();
-  void historyMoveDown();
+    /** sets the count of the History's entries */
+    void setHistoryLength(unsigned int historyLength) { this->historyLength = historyLength; };
+    void historyMoveUp();
+    void historyMoveDown();
 
-  void help(const std::string& className = "", const std::string& function = "");
+    void help(const std::string& className = "", const std::string& function = "");
 
-  virtual void tick(float dt);
-  virtual void process(const Event &event);
+    virtual void tick(float dt);
+    virtual void process(const Event &event);
 
- private:
+  private:
     // HANDLING TEXT INPUT
-   ShellCompletion                   completion;       //!< The Completion Interface.
+    ShellCompletion                   completion;       //!< The Completion Interface.
 
-   std::string                       inputLine;        //!< the Char-Array of the Buffer
-   float                             repeatRate;       //!< The Repeat-Delay.
-   float                             repeatDelay;      //!< The delay of the first Character of a given Character.
-   float                             delayed;          //!< how much of the delay is remaining.
-   Uint16                            pressedKey;       //!< the pressed key that will be repeated.
+    std::string                       inputLine;        //!< the Char-Array of the Buffer
+    float                             repeatRate;       //!< The Repeat-Delay.
+    float                             repeatDelay;      //!< The delay of the first Character of a given Character.
+    float                             delayed;          //!< how much of the delay is remaining.
+    Uint16                            pressedKey;       //!< the pressed key that will be repeated.
 
-   std::list<std::string>            history;          //!< The history of given commands.
-   std::list<std::string>::iterator  historyIT;        //!< The locator that tells us, where we are in the history.
-   unsigned int                      historyLength;    //!< The maximum length of the InputHistory.
-   bool                              historyScrolling; //!< true if we are scrolling through the history.
-};
+    std::list<std::string>            history;          //!< The history of given commands.
+    std::list<std::string>::iterator  historyIT;        //!< The locator that tells us, where we are in the history.
+    unsigned int                      historyLength;    //!< The maximum length of the InputHistory.
+    bool                              historyScrolling; //!< true if we are scrolling through the history.
+  };
+
+}
 
 #endif /* _SHELL_INPUT_H */
Index: trunk/src/lib/util/loading/game_loader.cc
===================================================================
--- trunk/src/lib/util/loading/game_loader.cc	(revision 7373)
+++ trunk/src/lib/util/loading/game_loader.cc	(revision 7374)
@@ -29,201 +29,201 @@
 
 
-using namespace std;
-
-
-SHELL_COMMAND(quit, GameLoader, stop)
-    ->describe("quits the game")
-    ->setAlias("orxoquit");
-
-
-GameLoader* GameLoader::singletonRef = NULL;
-
-
-/**
- *  simple constructor
- */
-GameLoader::GameLoader ()
+namespace OrxShell
 {
-  this->setClassID(CL_GAME_LOADER, "GameLoader");
-  this->setName("GameLoader");
-  this->bRun = true;
-}
-
-
-/**
- *  simple deconstructor
- */
-GameLoader::~GameLoader ()
-{
-  if( this->currentCampaign)
-    delete this->currentCampaign;
-  this->currentCampaign = NULL;
-}
-
-
-/**
- *  initializes the GameLoader
- */
-ErrorMessage GameLoader::init()
-{
-  if(this->currentCampaign != NULL)
-    this->currentCampaign->init();
-
-  this->eventHandler = EventHandler::getInstance();
-  this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_PAUSE);
-  this->eventHandler->subscribe(this, ES_ALL, EV_MAIN_QUIT);          //< External Quit Event
-  this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_QUIT);
-  this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_NEXT_WORLD);
-  this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_PREVIOUS_WORLD);
-}
-
-
-/**
- *  reads a campaign definition file into a campaign class
- * @param fileName to be loaded
- * @returns the loaded campaign
- *
- * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
- */
-ErrorMessage GameLoader::loadCampaign(const std::string& fileName)
-{
-  ErrorMessage errorCode;
-  std::string campaignName = ResourceManager::getFullName(fileName);
-  if (!campaignName.empty())
+
+  SHELL_COMMAND(quit, GameLoader, stop)
+  ->describe("quits the game")
+  ->setAlias("orxoquit");
+
+
+  GameLoader* GameLoader::singletonRef = NULL;
+
+
+  /**
+   *  simple constructor
+   */
+  GameLoader::GameLoader ()
+  {
+    this->setClassID(CL_GAME_LOADER, "GameLoader");
+    this->setName("GameLoader");
+    this->bRun = true;
+  }
+
+
+  /**
+   *  simple deconstructor
+   */
+  GameLoader::~GameLoader ()
+  {
+    if( this->currentCampaign)
+      delete this->currentCampaign;
+    this->currentCampaign = NULL;
+  }
+
+
+  /**
+   *  initializes the GameLoader
+   */
+  ErrorMessage GameLoader::init()
+  {
+    if(this->currentCampaign != NULL)
+      this->currentCampaign->init();
+
+    this->eventHandler = EventHandler::getInstance();
+    this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_PAUSE);
+    this->eventHandler->subscribe(this, ES_ALL, EV_MAIN_QUIT);          //< External Quit Event
+    this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_QUIT);
+    this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_NEXT_WORLD);
+    this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_PREVIOUS_WORLD);
+  }
+
+
+  /**
+   *  reads a campaign definition file into a campaign class
+   * @param fileName to be loaded
+   * @returns the loaded campaign
+   *
+   * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
+   */
+  ErrorMessage GameLoader::loadCampaign(const std::string& fileName)
+  {
+    ErrorMessage errorCode;
+    std::string campaignName = ResourceManager::getFullName(fileName);
+    if (!campaignName.empty())
     {
       this->currentCampaign = this->fileToCampaign(campaignName);
     }
-}
-
-
-/**
- *  reads a campaign definition file into a campaign class
- * @param fileName to be loaded
- * @returns the loaded campaign
- *
- * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
- */
-ErrorMessage GameLoader::loadNetworkCampaign(const std::string& fileName)
-{
-  ErrorMessage errorCode;
-  std::string campaignName = ResourceManager::getFullName(fileName);
-  if (!campaignName.empty())
-  {
-    this->currentCampaign = this->fileToCampaign(campaignName);
-  }
-}
-
-
-/**
- *  loads a debug campaign for test purposes only.
- * @param campaignID the identifier of the campaign.
- * @returns error message if not able to do so.
- */
-ErrorMessage GameLoader::loadDebugCampaign(Uint32 campaignID)
-{
-  switch(campaignID)
-    {
-      /*
-         Debug Level 0: Debug level used to test the base frame work.
-         As you can see, all storyentity data is allocated before game
-         start. the storyentity will load themselfs shortly before start
-         through the StoryEntity::init() funtion.
-      */
-    case DEBUG_CAMPAIGN_0:
-      {
-/*        Campaign* debugCampaign = new Campaign();
-
-        World* world0 = new World(DEBUG_WORLD_0);
-        world0->setNextStoryID(WORLD_ID_1);
-        debugCampaign->addEntity(world0, WORLD_ID_0);
-
-        World* world1 = new World(DEBUG_WORLD_1);
-        world1->setNextStoryID(WORLD_ID_2);
-        debugCampaign->addEntity(world1, WORLD_ID_1);
-
-        World* world2 = new World(DEBUG_WORLD_2);
-        world2->setNextStoryID(WORLD_ID_GAMEEND);
-        debugCampaign->addEntity(world2, WORLD_ID_2);
-
-        this->currentCampaign = debugCampaign;
-        break;*/
-      }
-    }
-}
-
-
-/**
- *  starts the current entity
- * @returns error code if this action has caused a error
- */
-ErrorMessage GameLoader::start()
-{
-  if(this->currentCampaign != NULL)
-  {
-    this->currentCampaign->start();
-  }
-}
-
-
-/**
- *  stops the current entity
- * @returns error code if this action has caused a error
- *
- *  ATTENTION: this function shouldn't call other functions, or if so, they must return
- *  after finishing. If you ignore or forget to do so, the current entity is not able to
- *  terminate and it will run in the background or the ressources can't be freed or even
- *  worse: are freed and the program will end in a segmentation fault!
- *  hehehe, have ya seen it... :)
- */
-void GameLoader::stop()
-{
-  if(this->currentCampaign != NULL)
-    this->currentCampaign->stop();
-}
-
-
-/**
- *  pause the current entity
- * @returns error code if this action has caused a error
- *
- * this pauses the current entity or passes this call forth to the running entity.
- */
-ErrorMessage GameLoader::pause()
-{
-  this->isPaused = true;
-  if(this->currentCampaign != NULL)
-    this->currentCampaign->pause();
-}
-
-
-/**
- *  resumes a pause
- * @returns error code if this action has caused a error
- *
- *  this resumess the current entity or passes this call forth to the running entity.
- */
-ErrorMessage GameLoader::resume()
-{
-  this->isPaused = false;
-  if(this->currentCampaign != NULL)
-    this->currentCampaign->resume();
-}
-
-
-/**
- *  reads a campaign definition file into a campaign class
- * @param fileName to be loaded
- * @returns the loaded campaign
- *
- * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
- */
-Campaign* GameLoader::fileToCampaign(const std::string& fileName)
-{
-  /* do not entirely load the campaign. just the current world
-     before start of each world, it has to be initialized so it
-     can load everything it needs into memory then.
-  */
-
-  if( fileName.empty())
+  }
+
+
+  /**
+   *  reads a campaign definition file into a campaign class
+   * @param fileName to be loaded
+   * @returns the loaded campaign
+   *
+   * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
+   */
+  ErrorMessage GameLoader::loadNetworkCampaign(const std::string& fileName)
+  {
+    ErrorMessage errorCode;
+    std::string campaignName = ResourceManager::getFullName(fileName);
+    if (!campaignName.empty())
+    {
+      this->currentCampaign = this->fileToCampaign(campaignName);
+    }
+  }
+
+
+  /**
+   *  loads a debug campaign for test purposes only.
+   * @param campaignID the identifier of the campaign.
+   * @returns error message if not able to do so.
+   */
+  ErrorMessage GameLoader::loadDebugCampaign(Uint32 campaignID)
+  {
+    switch(campaignID)
+    {
+        /*
+           Debug Level 0: Debug level used to test the base frame work.
+           As you can see, all storyentity data is allocated before game
+           start. the storyentity will load themselfs shortly before start
+           through the StoryEntity::init() funtion.
+        */
+      case DEBUG_CAMPAIGN_0:
+        {
+          /*        Campaign* debugCampaign = new Campaign();
+
+                  World* world0 = new World(DEBUG_WORLD_0);
+                  world0->setNextStoryID(WORLD_ID_1);
+                  debugCampaign->addEntity(world0, WORLD_ID_0);
+
+                  World* world1 = new World(DEBUG_WORLD_1);
+                  world1->setNextStoryID(WORLD_ID_2);
+                  debugCampaign->addEntity(world1, WORLD_ID_1);
+
+                  World* world2 = new World(DEBUG_WORLD_2);
+                  world2->setNextStoryID(WORLD_ID_GAMEEND);
+                  debugCampaign->addEntity(world2, WORLD_ID_2);
+
+                  this->currentCampaign = debugCampaign;
+                  break;*/
+        }
+    }
+  }
+
+
+  /**
+   *  starts the current entity
+   * @returns error code if this action has caused a error
+   */
+  ErrorMessage GameLoader::start()
+  {
+    if(this->currentCampaign != NULL)
+    {
+      this->currentCampaign->start();
+    }
+  }
+
+
+  /**
+   *  stops the current entity
+   * @returns error code if this action has caused a error
+   *
+   *  ATTENTION: this function shouldn't call other functions, or if so, they must return
+   *  after finishing. If you ignore or forget to do so, the current entity is not able to
+   *  terminate and it will run in the background or the ressources can't be freed or even
+   *  worse: are freed and the program will end in a segmentation fault!
+   *  hehehe, have ya seen it... :)
+   */
+  void GameLoader::stop()
+  {
+    if(this->currentCampaign != NULL)
+      this->currentCampaign->stop();
+  }
+
+
+  /**
+   *  pause the current entity
+   * @returns error code if this action has caused a error
+   *
+   * this pauses the current entity or passes this call forth to the running entity.
+   */
+  ErrorMessage GameLoader::pause()
+  {
+    this->isPaused = true;
+    if(this->currentCampaign != NULL)
+      this->currentCampaign->pause();
+  }
+
+
+  /**
+   *  resumes a pause
+   * @returns error code if this action has caused a error
+   *
+   *  this resumess the current entity or passes this call forth to the running entity.
+   */
+  ErrorMessage GameLoader::resume()
+  {
+    this->isPaused = false;
+    if(this->currentCampaign != NULL)
+      this->currentCampaign->resume();
+  }
+
+
+  /**
+   *  reads a campaign definition file into a campaign class
+   * @param fileName to be loaded
+   * @returns the loaded campaign
+   *
+   * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
+   */
+  Campaign* GameLoader::fileToCampaign(const std::string& fileName)
+  {
+    /* do not entirely load the campaign. just the current world
+       before start of each world, it has to be initialized so it
+       can load everything it needs into memory then.
+    */
+
+    if( fileName.empty())
     {
       PRINTF(2)("No filename specified for loading");
@@ -231,7 +231,7 @@
     }
 
-  TiXmlDocument XMLDoc(fileName);
-  // load the campaign document
-  if( !XMLDoc.LoadFile(fileName))
+    TiXmlDocument XMLDoc(fileName);
+    // load the campaign document
+    if( !XMLDoc.LoadFile(fileName))
     {
       // report an error
@@ -240,9 +240,9 @@
     }
 
-  // check basic validity
-  TiXmlElement* root = XMLDoc.RootElement();
-  assert( root != NULL);
-
-  if( strcmp( root->Value(), "Campaign"))
+    // check basic validity
+    TiXmlElement* root = XMLDoc.RootElement();
+    assert( root != NULL);
+
+    if( strcmp( root->Value(), "Campaign"))
     {
       // report an error
@@ -251,50 +251,50 @@
     }
 
-  // construct campaign
-  return new Campaign( root);
+    // construct campaign
+    return new Campaign( root);
+  }
+
+
+
+  /**
+   *  handle keyboard commands
+   * @param event the event to handle
+   */
+  void GameLoader::process(const Event& event)
+  {
+    if( event.type == KeyMapper::PEV_NEXT_WORLD)
+    {
+      if( likely(event.bPressed))
+      {
+        this->switchToNextLevel();
+      }
+    }
+    else if( event.type == KeyMapper::PEV_PAUSE)
+    {
+      if( likely(event.bPressed))
+      {
+        if(this->isPaused)
+          this->resume();
+        else
+          this->pause();
+      }
+    }
+    else if( event.type == KeyMapper::PEV_QUIT)
+    {
+      if( event.bPressed) this->stop();
+    }
+    else if (event.type == EV_MAIN_QUIT)
+      this->stop();
+  }
+
+
+  /**
+   *  this changes to the next level
+   */
+  void GameLoader::switchToNextLevel()
+  {
+    if(this->currentCampaign != NULL)
+      this->currentCampaign->switchToNextLevel();
+  }
+
 }
-
-
-
-/**
- *  handle keyboard commands
- * @param event the event to handle
- */
-void GameLoader::process(const Event& event)
-{
-  if( event.type == KeyMapper::PEV_NEXT_WORLD)
-  {
-    if( likely(event.bPressed))
-    {
-      this->switchToNextLevel();
-    }
-  }
-  else if( event.type == KeyMapper::PEV_PAUSE)
-  {
-    if( likely(event.bPressed))
-    {
-      if(this->isPaused)
-        this->resume();
-      else
-        this->pause();
-    }
-  }
-  else if( event.type == KeyMapper::PEV_QUIT)
-  {
-    if( event.bPressed) this->stop();
-  }
-  else if (event.type == EV_MAIN_QUIT)
-    this->stop();
-}
-
-
-/**
- *  this changes to the next level
- */
-void GameLoader::switchToNextLevel()
-{
-  if(this->currentCampaign != NULL)
-    this->currentCampaign->switchToNextLevel();
-}
-
-
Index: trunk/src/orxonox.cc
===================================================================
--- trunk/src/orxonox.cc	(revision 7373)
+++ trunk/src/orxonox.cc	(revision 7374)
@@ -116,5 +116,5 @@
   Factory::deleteFactories();
   FastFactory::deleteAll();
-  ShellCommandClass::unregisterAllCommands();
+  OrxShell::ShellCommandClass::unregisterAllCommands();
 
   LoadClassDescription::deleteAllDescriptions();
@@ -129,5 +129,5 @@
   delete ResourceManager::getInstance(); // deletes the Resource Manager
   // output-buffer
-  delete ShellBuffer::getInstance();
+  delete OrxShell::ShellBuffer::getInstance();
 
   SDL_QuitSubSystem(SDL_INIT_TIMER);
@@ -353,5 +353,5 @@
 int Orxonox::initMisc()
 {
-  ShellBuffer::getInstance();
+  OrxShell::ShellBuffer::getInstance();
   return 0;
 }
@@ -417,9 +417,9 @@
 {
   CmdLinePrefsReader prefs;
-  
+
   IniFilePrefsReader ini(ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE));
-  
+
   prefs.parse(argc, argv);
-  
+
   if ( Preferences::getInstance()->getString("misc", "showLicenseAndExit", "") == "1" )
   {
@@ -427,5 +427,5 @@
     return 0;
   }
-  
+
   if( Preferences::getInstance()->getString("game", "showGui", "") == "1" )
     showGui = true;
@@ -433,5 +433,5 @@
            Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_client" )
     return startNetworkOrxonox(argc, argv);
-  
+
   return startOrxonox(argc, argv, "", -1);
   return 0;
@@ -449,10 +449,10 @@
 
   std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" );
-  
+
   if ( gameType == "multiplayer_client" )
   {
     int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
     std::string host = Preferences::getInstance()->getString( "game", "host", "" );
-    
+
     if ( host == "" )
     {
@@ -460,7 +460,7 @@
       return 1;
     }
-    
+
     printf("Starting Orxonox as client: connecting to %s, on port %i\n", host.c_str(), port);
-    
+
     startOrxonox(argc, argv, host.c_str(), port);
   }
@@ -468,7 +468,7 @@
   {
     int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
-    
+
     printf("Starting Orxonox as server: listening on port %i\n", port);
-    
+
     startOrxonox(argc, argv, "", port);
   }
Index: trunk/src/story_entities/game_world.cc
===================================================================
--- trunk/src/story_entities/game_world.cc	(revision 7373)
+++ trunk/src/story_entities/game_world.cc	(revision 7374)
@@ -120,5 +120,5 @@
 {
   /* init the world interface */
-  this->shell = new Shell();
+  this->shell = new OrxShell::Shell();
 
   State::setCurrentStoryEntity(dynamic_cast<StoryEntity*>(this));
Index: trunk/src/story_entities/game_world.h
===================================================================
--- trunk/src/story_entities/game_world.h	(revision 7373)
+++ trunk/src/story_entities/game_world.h	(revision 7374)
@@ -12,5 +12,5 @@
 #include "playable.h"
 
-class Shell;
+class OrxShell::Shell;
 class WorldEntity;
 
@@ -94,6 +94,7 @@
 
 
+  private:
     /* external modules interfaces */
-    Shell*              shell;
+    OrxShell::Shell*    shell;
 };
 
