Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2008, 8:30:33 PM (16 years ago)
Author:
landauf
Message:

I start to like it

File:
1 edited

Legend:

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

    r1416 r1430  
    4343
    4444#define SetConsoleCommandGeneric(fakevariable, classname, command, bCreateShortcut) \
    45     ConsoleCommand& fakevariable = ClassManager<classname>::getIdentifier()->addConsoleCommand((ConsoleCommand*)command, bCreateShortcut)
     45    ConsoleCommand& fakevariable = ClassManager<classname>::getIdentifier()->addConsoleCommand(command, bCreateShortcut)
    4646
    4747
     
    5353
    5454#define SetConsoleCommandShortcutGeneric(fakevariable, command) \
    55     ConsoleCommand& fakevariable = CommandExecutor::addConsoleCommandShortcut((ConsoleCommand*)command)
     55    ConsoleCommand& fakevariable = CommandExecutor::addConsoleCommandShortcut(command)
    5656
    5757
     
    100100                { return this->accessLevel_; }
    101101
    102             ConsoleCommand& setArgumentCompletionList(unsigned int param, std::list<std::pair<std::string, std::string> > (*function) (void));
    103 
    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);
     102            ConsoleCommand& setArgumentCompletionList(unsigned int param, ArgumentCompleter* completer);
     103            void createArgumentCompletionList(unsigned int param, const std::string& param1 = "", const std::string& param2 = "", const std::string& param3 = "", const std::string& param4 = "", const std::string& param5 = "");
     104            const std::list<std::pair<std::string, std::string> >& getArgumentCompletionList() const
     105                { return this->argumentList_; }
     106            std::list<std::pair<std::string, std::string> >::const_iterator getArgumentCompletionListBegin() const
     107                { return this->argumentList_.begin(); }
     108            std::list<std::pair<std::string, std::string> >::const_iterator getArgumentCompletionListEnd() const
     109                { return this->argumentList_.end(); }
    107110
    108111        private:
    109112            AccessLevel::Level accessLevel_;
    110             std::list<std::pair<std::string, std::string> > (*autocompletionFunction_[5]) (void);
     113            ArgumentCompleter* argumentCompleter_[5];
    111114            std::list<std::pair<std::string, std::string> > argumentList_;
    112115    };
Note: See TracChangeset for help on using the changeset viewer.