Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2008, 1:11:51 AM (17 years ago)
Author:
landauf
Message:
  • fixed a bug in CommandExecutor
  • InGameConsole wraps now too long output lines and does something similar for the input line
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/ConsoleCommand.h

    r1390 r1416  
    4242    SetConsoleCommandGeneric(classname##function##consolecommand__, classname, orxonox::createConsoleCommand(orxonox::createFunctor(&classname::function), #function), bCreateShortcut)
    4343
    44 #define SetConsoleCommandGeneric(fakevariable, classname, executor, bCreateShortcut) \
    45     Executor& fakevariable = ClassManager<classname>::getIdentifier()->addConsoleCommand((ConsoleCommand*)executor, bCreateShortcut)
     44#define SetConsoleCommandGeneric(fakevariable, classname, command, bCreateShortcut) \
     45    ConsoleCommand& fakevariable = ClassManager<classname>::getIdentifier()->addConsoleCommand((ConsoleCommand*)command, bCreateShortcut)
    4646
    4747
     
    5252    SetConsoleCommandShortcutGeneric(function##consolecommand__, orxonox::createConsoleCommand(orxonox::createFunctor(&function), #function))
    5353
    54 #define SetConsoleCommandShortcutGeneric(fakevariable, executor) \
    55     Executor& fakevariable = CommandExecutor::addConsoleCommandShortcut((ConsoleCommand*)executor)
     54#define SetConsoleCommandShortcutGeneric(fakevariable, command) \
     55    ConsoleCommand& fakevariable = CommandExecutor::addConsoleCommandShortcut((ConsoleCommand*)command)
    5656
    5757
     
    100100                { return this->accessLevel_; }
    101101
    102             ConsoleCommand& setArgumentCompletionList(unsigned int param, const std::list<std::pair<std::string, std::string> >& (*function) (void));
     102            ConsoleCommand& setArgumentCompletionList(unsigned int param, std::list<std::pair<std::string, std::string> > (*function) (void));
    103103
    104             const std::list<std::pair<std::string, std::string> >& getArgumentCompletionList(unsigned int param) const;
    105             std::list<std::pair<std::string, std::string> >::const_iterator getArgumentCompletionListBegin(unsigned int param) const;
    106             std::list<std::pair<std::string, std::string> >::const_iterator getArgumentCompletionListEnd(unsigned int param) const;
     104            const std::list<std::pair<std::string, std::string> >& getArgumentCompletionList(unsigned int param);
     105            std::list<std::pair<std::string, std::string> >::const_iterator getArgumentCompletionListBegin(unsigned int param);
     106            std::list<std::pair<std::string, std::string> >::const_iterator getArgumentCompletionListEnd(unsigned int param);
    107107
    108108        private:
    109109            AccessLevel::Level accessLevel_;
    110             const std::list<std::pair<std::string, std::string> >& (*autocompletionFunction_[5]) (void);
     110            std::list<std::pair<std::string, std::string> > (*autocompletionFunction_[5]) (void);
     111            std::list<std::pair<std::string, std::string> > argumentList_;
    111112    };
    112113
Note: See TracChangeset for help on using the changeset viewer.