Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7722 in orxonox.OLD for trunk/src/lib/shell/shell_command.cc


Ignore:
Timestamp:
May 19, 2006, 4:21:01 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Removed the old Executor, and inserted the new one into the ShellCommand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_command.cc

    r7456 r7722  
    3636   * @param paramCount the count of parameters this command takes
    3737   */
    38   ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, const Executor& executor)
     38  ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, Executor* executor)
    3939  {
    4040    this->setClassID(CL_SHELL_COMMAND, "ShellCommand");
     
    4343
    4444    // copy the executor:
    45     this->executor = executor.clone();
     45    this->executor = executor;
    4646    this->executor->setName(commandName);
    4747
     
    7575   * @brief registers a new ShellCommand
    7676   */
    77   ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, const Executor& executor)
     77  ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, Executor* executor)
    7878  {
    7979    if (ShellCommand::exists(commandName, className))
    80       return NULL;
     80    {
     81      delete executor;
     82      return NULL;
     83    }
    8184    else
    8285      return new ShellCommand(commandName, className, executor);
Note: See TracChangeset for help on using the changeset viewer.