Index: trunk/src/lib/shell/shell_command.cc
===================================================================
--- trunk/src/lib/shell/shell_command.cc	(revision 9406)
+++ trunk/src/lib/shell/shell_command.cc	(revision 9869)
@@ -20,6 +20,6 @@
 
 #include "compiler.h"
+#include "helper_functions.h"
 #include "debug.h"
-#include "class_list.h"
 
 #include "key_names.h"
@@ -27,4 +27,5 @@
 namespace OrxShell
 {
+  ObjectListDefinition(ShellCommand);
   SHELL_COMMAND(debug, ShellCommandClass, help);
 
@@ -36,7 +37,7 @@
    * @param paramCount the count of parameters this command takes
    */
-  ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, Executor* executor)
-  {
-    this->setClassID(CL_SHELL_COMMAND, "ShellCommand");
+  ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor)
+  {
+    this->registerObject(this, ShellCommand::_objectList);
     PRINTF(4)("create shellcommand '%s' for class '%s'\n", commandName.c_str(), className.c_str());
     this->setName(commandName);
@@ -44,5 +45,4 @@
     // copy the executor:
     this->executor = executor;
-    this->executor->setName(commandName);
 
     for (unsigned int i = 0; i < this->executor->getParamCount(); i++)
@@ -75,5 +75,5 @@
    * @brief registers a new ShellCommand
    */
-  ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, Executor* executor)
+  ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor)
   {
     if (ShellCommand::exists(commandName, className))
@@ -94,10 +94,9 @@
   void ShellCommand::unregisterCommand(const std::string& commandName, const std::string& className)
   {
-
     ShellCommandClass* cmdClass = ShellCommandClass::acquireCommandClass(className);
     if (cmdClass != NULL)
     {
       CmdList::iterator cmd;
-      for (cmd = cmdClass->commandList.begin(); cmd != cmdClass->commandList.end(); cmd++)
+      for (cmd = cmdClass->_commandList.begin(); cmd != cmdClass->_commandList.end(); cmd++)
         if (commandName == (*cmd)->getName())
         {
@@ -119,8 +118,8 @@
 
     CmdList::const_iterator elem;
-    for (unsigned int i = 0; i < cmdClass->commandList.size(); i++)
-    {
-      if (commandName == cmdClass->commandList[i]->getName())
-        return (cmdClass->commandList[i]);
+    for (unsigned int i = 0; i < cmdClass->_commandList.size(); i++)
+    {
+      if (commandName == cmdClass->_commandList[i]->getName())
+        return (cmdClass->_commandList[i]);
     }
     return NULL;
@@ -242,21 +241,23 @@
       return false;
 
-    const std::list<BaseObject*>* objectList = ClassList::getList(cmd->shellClass->getName());
+    const ObjectListBase* const objectList = ObjectListBase::getObjectList(cmd->shellClass->getName());
     if (objectList != NULL)
     {
-      std::list<BaseObject*>::const_iterator bo;
+      ObjectListBase::base_list list;
+      objectList->getBaseObjectList(&list);
+      ObjectListBase::base_iterator it;
 
       // No Description given (only for speedup)
       if (objectDescriptor.empty())
       {
-        for (bo = objectList->begin(); bo != objectList->end(); bo++)
-          boList->push_back(*bo);
+        for (it = list.begin(); it != list.end(); it++)
+          boList->push_back(*it);
       }
       // some description
       else
       {
-        for (bo = objectList->begin(); bo != objectList->end(); bo++)
-          if (!nocaseCmp(objectDescriptor, (*bo)->getName(), objectDescriptor.size()))
-            boList->push_back(*bo);
+        for (it = list.begin(); it != list.end(); it++)
+          if (!nocaseCmp(objectDescriptor, (*it)->getName(), objectDescriptor.size()))
+            boList->push_back(*it);
       }
     }
@@ -299,9 +300,16 @@
     if (sc != NULL)
     {
-      for(std::vector<BaseObject*>::const_iterator bo = boList.begin(); bo != boList.end(); ++bo)
-      {
-        PRINT(0)("Command '%s' on '%s::%s'\n", sc->getCName(), (*bo)->getClassCName(), (*bo)->getCName());
-        (*sc->executor)((*bo), inputSplits.subSet(paramBegin));
-      }
+
+      if(sc->executor->getType() == Executor<const SubString>::FunctionStatic )
+      {
+	PRINT(0)("Static Command '%s' of Class '%s' with parameters\n", sc->getCName(), sc->shellClass->getCName());
+	(*sc->executor)(NULL, inputSplits.subSet(paramBegin));
+      }
+      else
+        for(std::vector<BaseObject*>::const_iterator bo = boList.begin(); bo != boList.end(); ++bo)
+        {
+          PRINT(0)("Command '%s' on '%s::%s'\n", sc->getCName(), (*bo)->getClassCName(), (*bo)->getCName());
+          (*sc->executor)((*bo), inputSplits.subSet(paramBegin));
+        }
       return true;
     }
@@ -376,7 +384,7 @@
     else
     {
-//       if(this->completors[parameter] == NULL)
-//       delete this->completors[parameter];
-//       this->completors[parameter] = completorPlugin.clone();
+      //       if(this->completors[parameter] == NULL)
+      //       delete this->completors[parameter];
+      //       this->completors[parameter] = completorPlugin.clone();
     }
     return this;
