Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 26, 2010, 12:09:12 AM (14 years ago)
Author:
landauf
Message:

adapted all console commands to the new interface

Location:
code/branches/consolecommands3/src/libraries/core/command
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/command/ConsoleCommandCompilation.cc

    r7202 r7219  
    3737#include "util/StringUtils.h"
    3838#include "ConsoleCommand.h"
     39#include "CommandExecutor.h"
    3940
    4041namespace orxonox
    4142{
    42     SetConsoleCommandShortcutExtern(source).argumentCompleter(0, autocompletion::files());
    43     SetConsoleCommandShortcutExtern(echo);
    44     SetConsoleCommandShortcutExtern(puts);
     43    _SetConsoleCommand("source", source).argumentCompleter(0, autocompletion::files());
     44    _SetConsoleCommand("echo", echo);
     45    _SetConsoleCommand("puts", puts);
    4546
    46     SetConsoleCommandShortcutExtern(read).argumentCompleter(0, autocompletion::files());
    47     SetConsoleCommandShortcutExtern(append).argumentCompleter(0, autocompletion::files());
    48     SetConsoleCommandShortcutExtern(write).argumentCompleter(0, autocompletion::files());
     47    _SetConsoleCommand("read", read).argumentCompleter(0, autocompletion::files());
     48    _SetConsoleCommand("append", append).argumentCompleter(0, autocompletion::files());
     49    _SetConsoleCommand("write", write).argumentCompleter(0, autocompletion::files());
    4950
    50     SetConsoleCommandShortcutExtern(calculate);
     51    _SetConsoleCommand("calculate", calculate);
    5152
    5253    void source(const std::string& filename)
  • code/branches/consolecommands3/src/libraries/core/command/IRC.cc

    r7203 r7219  
    4242    static const unsigned int IRC_TCL_THREADID  = 1421421421;
    4343
    44     SetConsoleCommand(IRC, say,  true).accessLevel(AccessLevel::User);
    45     SetConsoleCommand(IRC, msg,  false).accessLevel(AccessLevel::User);
    46     SetConsoleCommand(IRC, nick, false).accessLevel(AccessLevel::User);
     44    _SetConsoleCommand("IRC", "say",  &IRC::say);
     45    _SetConsoleCommand("IRC", "msg",  &IRC::msg);
     46    _SetConsoleCommand("IRC", "nick", &IRC::nick);
    4747
    4848    IRC::IRC()
  • code/branches/consolecommands3/src/libraries/core/command/Shell.cc

    r7203 r7219  
    4040namespace orxonox
    4141{
    42     SetConsoleCommandShortcut(OutputHandler, log);
    43     SetConsoleCommandShortcut(OutputHandler, error);
    44     SetConsoleCommandShortcut(OutputHandler, warning);
    45     SetConsoleCommandShortcut(OutputHandler, info);
    46     SetConsoleCommandShortcut(OutputHandler, debug);
     42    _SetConsoleCommand("log",     OutputHandler::log    );
     43    _SetConsoleCommand("error",   OutputHandler::error  );
     44    _SetConsoleCommand("warning", OutputHandler::warning);
     45    _SetConsoleCommand("info",    OutputHandler::info   );
     46    _SetConsoleCommand("debug",   OutputHandler::debug  );
    4747
    4848    Shell::Shell(const std::string& consoleName, bool bScrollable)
  • code/branches/consolecommands3/src/libraries/core/command/TclBind.cc

    r7203 r7219  
    4444namespace orxonox
    4545{
    46     SetConsoleCommandShortcut(TclBind, tcl);
    47     SetConsoleCommandShortcut(TclBind, bgerror);
     46    _SetConsoleCommand("tcl", &TclBind::tcl);
     47    _SetConsoleCommand("bgerror", &TclBind::bgerror);
    4848
    4949    TclBind* TclBind::singletonPtr_s = 0;
  • code/branches/consolecommands3/src/libraries/core/command/TclThreadManager.cc

    r7203 r7219  
    5050    const float TCLTHREADMANAGER_MAX_CPU_USAGE = 0.50f;
    5151
    52     SetConsoleCommandShortcutAlias(TclThreadManager, execute, "tclexecute").argumentCompleter(0, autocompletion::tclthreads());
    53     SetConsoleCommandShortcutAlias(TclThreadManager, query,   "tclquery"  ).argumentCompleter(0, autocompletion::tclthreads());
    54     SetConsoleCommand(TclThreadManager, create,  false);
    55     SetConsoleCommand(TclThreadManager, destroy, false).argumentCompleter(0, autocompletion::tclthreads());
    56     SetConsoleCommand(TclThreadManager, execute, false).argumentCompleter(0, autocompletion::tclthreads());
    57     SetConsoleCommand(TclThreadManager, query,   false).argumentCompleter(0, autocompletion::tclthreads());
    58     SetConsoleCommand(TclThreadManager, source,  false).argumentCompleter(0, autocompletion::tclthreads());
     52    _SetConsoleCommand("tclexecute", &TclThreadManager::execute).argumentCompleter(0, autocompletion::tclthreads());
     53    _SetConsoleCommand("tclquery",   &TclThreadManager::query  ).argumentCompleter(0, autocompletion::tclthreads());
     54    _SetConsoleCommand("TclThreadManager", "create",  &TclThreadManager::create);
     55    _SetConsoleCommand("TclThreadManager", "destroy", &TclThreadManager::destroy).argumentCompleter(0, autocompletion::tclthreads());
     56    _SetConsoleCommand("TclThreadManager", "execute", &TclThreadManager::execute).argumentCompleter(0, autocompletion::tclthreads());
     57    _SetConsoleCommand("TclThreadManager", "query",   &TclThreadManager::query  ).argumentCompleter(0, autocompletion::tclthreads());
     58    _SetConsoleCommand("TclThreadManager", "source",  &TclThreadManager::source ).argumentCompleter(0, autocompletion::tclthreads());
    5959
    6060    /**
Note: See TracChangeset for help on using the changeset viewer.