Index: trunk/src/lib/shell/shell_command.cc
===================================================================
--- trunk/src/lib/shell/shell_command.cc	(revision 7393)
+++ trunk/src/lib/shell/shell_command.cc	(revision 7394)
@@ -27,7 +27,9 @@
 namespace OrxShell
 {
-
-  /**
-   * constructs and registers a new Command
+  SHELL_COMMAND_STATIC(debug, ShellCommand, ShellCommand::debug);
+
+
+  /**
+   * @brief 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
@@ -50,5 +52,5 @@
 
   /**
-   * deconstructs a ShellCommand
+   * @brief deconstructs a ShellCommand
    */
   ShellCommand::~ShellCommand()
@@ -106,5 +108,5 @@
 
   /**
-   * checks if a command has already been registered.
+   * @brief 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.
@@ -116,10 +118,4 @@
   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)
@@ -142,5 +138,5 @@
 
   /**
-   * executes commands
+   * @brief executes commands
    * @param executionString the string containing the following input
    * ClassName [ObjectName] functionName [parameter1[,parameter2[,...]]]
@@ -149,7 +145,4 @@
   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.
@@ -186,17 +179,14 @@
 
       // 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;
-          }
+      std::vector<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;
         }
       }
@@ -312,12 +302,6 @@
   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++)
+    std::vector<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());
Index: trunk/src/lib/shell/shell_command_class.cc
===================================================================
--- trunk/src/lib/shell/shell_command_class.cc	(revision 7393)
+++ trunk/src/lib/shell/shell_command_class.cc	(revision 7394)
@@ -26,5 +26,5 @@
 namespace OrxShell
 {
-  std::list<ShellCommandClass*>* ShellCommandClass::commandClassList = NULL;
+  std::vector<ShellCommandClass*> ShellCommandClass::commandClassList;
 
   /**
@@ -40,5 +40,5 @@
     this->classID = CL_NULL;
 
-    ShellCommandClass::commandClassList->push_back(this);
+    ShellCommandClass::commandClassList.push_back(this);
   }
 
@@ -79,14 +79,8 @@
   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 commands and Classes
+    std::vector<ShellCommandClass*>::iterator classIT;
+    for (classIT = ShellCommandClass::commandClassList.begin(); classIT != ShellCommandClass::commandClassList.end(); classIT++)
+      delete (*classIT);
   }
 
@@ -100,6 +94,6 @@
   bool ShellCommandClass::getCommandListOfClass(const std::string& className, std::list<std::string>& stringList)
   {
-    std::list<ShellCommandClass*>::iterator elem;
-    for(elem = ShellCommandClass::commandClassList->begin(); elem != ShellCommandClass::commandClassList->end(); elem++)
+    std::vector<ShellCommandClass*>::iterator elem;
+    for(elem = ShellCommandClass::commandClassList.begin(); elem != ShellCommandClass::commandClassList.end(); elem++)
     {
       if (className == (*elem)->getName())
@@ -121,9 +115,6 @@
   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++)
+    std::vector<ShellCommandClass*>::const_iterator classIT;
+    for (classIT = ShellCommandClass::commandClassList.begin(); classIT != ShellCommandClass::commandClassList.end(); classIT++)
     {
       if (className == (*classIT)->className)
@@ -145,28 +136,9 @@
   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++)
-    {
+    std::vector<ShellCommandClass*>::iterator classIT;
+    for (classIT = ShellCommandClass::commandClassList.begin(); classIT != ShellCommandClass::commandClassList.end(); classIT++)
       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));
-    }
   }
 
@@ -177,32 +149,25 @@
   void ShellCommandClass::help(const std::string& className)
   {
-    if (likely(ShellCommandClass::commandClassList != NULL))
+    std::vector<ShellCommandClass*>::iterator classIT;
+    for (classIT = ShellCommandClass::commandClassList.begin(); classIT != ShellCommandClass::commandClassList.end(); classIT++)
     {
-      std::list<ShellCommandClass*>::iterator classIT;
-      for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++)
+      if (className == (*classIT)->className)
       {
-        if (className == (*classIT)->className)
+        PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className.c_str(), (*classIT)->commandList.size());
+        std::vector<ShellCommand*>::const_iterator cmdIT;
+        for (cmdIT = (*classIT)->commandList.begin(); cmdIT != (*classIT)->commandList.end(); cmdIT++)
         {
-          PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className.c_str(), (*classIT)->commandList.size());
-          std::vector<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;
+          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");
-    }
+    PRINTF(3)("Class %s not found in Command's classes\n", className.c_str());
   }
 
Index: trunk/src/lib/shell/shell_command_class.h
===================================================================
--- trunk/src/lib/shell/shell_command_class.h	(revision 7393)
+++ trunk/src/lib/shell/shell_command_class.h	(revision 7394)
@@ -24,5 +24,5 @@
   public:
     /** @returns the CommandClassList */
-    static const std::list<ShellCommandClass*>* getCommandClassList() { return ShellCommandClass::commandClassList; };
+    static const std::vector<ShellCommandClass*>& getCommandClassList() { return ShellCommandClass::commandClassList; };
 
     static bool getCommandListOfClass(const std::string& className, std::list<std::string>& stringList);
@@ -38,5 +38,4 @@
 
     static const ShellCommandClass* isRegistered(const std::string& className);
-    static void initCommandClassList();
 
     void registerCommand(ShellCommand* command);
@@ -47,5 +46,6 @@
     long                                   classID;                   //!< The classID of this Class
     std::vector<ShellCommand*>             commandList;               //!< A list of Commands from this Class
-    static std::list<ShellCommandClass*>*  commandClassList;          //!< A list of Classes
+
+    static std::vector<ShellCommandClass*> commandClassList;          //!< A list of Classes
   };
 
