Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/lib/shell/shell_command.h


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

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

    r8145 r9869  
    99#include "base_object.h"
    1010
    11 #include "executor/executor.h"
     11/// THIS IS USED TO LOAD CONSTANT AND STATIC FUNCTIONS EASILY.
     12#include "executor/executor_substring.h"
     13#include "executor/functor_member.h"
     14#include "executor/functor_const_member.h"
     15#include "executor/functor_static.h"
     16
    1217#include "shell_completion_plugin.h"
    1318
     
    3540   */
    3641#define SHELL_COMMAND(command, class, function) \
    37            OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class>(&class::function))
     42           OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class, BaseObject>(&class::function))
    3843
    3944  /**
     
    5156   */
    5257#define SHELL_COMMAND_STATIC(command, class, function) \
    53            OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class>(function))
     58           OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class, BaseObject>(function))
    5459
    5560
     
    5863  class ShellCommand : public BaseObject
    5964  {
     65    ObjectListDeclaration(ShellCommand);
     66
    6067    friend class ShellCommandClass;
    6168  public:
     
    6976    ShellCommand* completionPlugin(unsigned int parameter, const CompletorPlugin& completorPlugin);
    7077
    71     static ShellCommand* registerCommand(const std::string& commandName, const std::string& className, Executor* executor);
     78    static ShellCommand* registerCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor);
    7279    static void unregisterCommand(const std::string& commandName, const std::string& className);
    7380    static const ShellCommand* const getCommand(const std::string& commandName, const std::string& className);
     
    8592
    8693  protected:
    87     ShellCommand(const std::string& commandName, const std::string& className, Executor* executor);
     94    ShellCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor);
    8895    virtual ~ShellCommand();
    8996
     
    97104    std::string                      description;           //!< A description for this commnand. (initially ""). Assigned with (create)->describe("blablabla");
    98105    std::vector<CompletorPlugin*>    completors;            //!< Completors for the Parameters
    99     Executor*                        executor;              //!< The Executor, that really executes the Function.
     106    Executor<const SubString>*       executor;              //!< The Executor, that really executes the Function.
    100107  };
    101108
Note: See TracChangeset for help on using the changeset viewer.