Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1417


Ignore:
Timestamp:
May 25, 2008, 2:56:09 AM (16 years ago)
Author:
landauf
Message:

changes in CommandExecutor and CommandEvaluation

Location:
code/branches/console/src/core
Files:
2 edited

Legend:

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

    r1402 r1417  
    5555    class _CoreExport CommandEvaluation
    5656    {
     57        friend class CommandExecutor;
     58
    5759        public:
    5860            CommandEvaluation();
     
    6668
    6769            bool isValid() const;
    68 
    69             inline Identifier* getIdentifier() const
    70                 { return this->functionclass_; }
    71             inline void setIdentifier(Identifier* identifier)
    72                 { this->functionclass_ = identifier; }
    73             inline ConsoleCommand* getFunction() const
    74                 { return this->function_; }
    75             inline void setFunction(ConsoleCommand* command)
    76                 { this->function_ = command; }
    77 
    78             inline const std::string& getOriginalCommand() const
    79                 { return this->originalCommand_; }
    80             inline const std::string& getCommand() const
    81                 { return this->command_; }
    82             inline void setCommand(const std::string& command)
    83                 { this->command_ = command; }
    84             inline const CommandState& getState() const
    85                 { return this->state_; }
    86             inline void setState(CommandState state)
    87                 { this->state_ = state; }
    88             inline SubString& getTokens()
    89                 { return this->commandTokens_; }
    90             inline void setTokens(const std::string& command)
    91                 { this->commandTokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0'); }
    92             inline const std::string& getError() const
    93                 { return this->errorMessage_; }
    94             inline void setError(const std::string& error)
    95                 { this->errorMessage_ = error; }
    96             inline bool isNewCommand() const
    97                 { return this->bNewCommand_; }
    98             inline void setNewCommand(bool bNewCommand)
    99                 { this->bNewCommand_ = bNewCommand; }
    100 
    101             inline std::list<std::pair<const std::string*, const std::string*> >& getListOfPossibleIdentifiers()
    102                 { return this->listOfPossibleIdentifiers_; }
    103             inline std::list<std::pair<const std::string*, const std::string*> >& getListOfPossibleFunctions()
    104                 { return this->listOfPossibleFunctions_; }
    105             inline std::list<std::pair<const std::string*, const std::string*> >& getListOfPossibleArguments()
    106                 { return this->listOfPossibleArguments_; }
    10770
    10871            inline void setAdditionalParameter(const std::string& param)
  • code/branches/console/src/core/CommandExecutor.cc

    r1416 r1417  
    109109        CommandExecutor::parseIfNeeded(command);
    110110
    111         if (!CommandExecutor::getEvaluation().isNewCommand())
    112             CommandExecutor::parse(CommandExecutor::getEvaluation().getCommand(), false);
    113         else
    114             CommandExecutor::getEvaluation().setNewCommand(false);
     111        if (!CommandExecutor::getEvaluation().bNewCommand_)
     112            CommandExecutor::parse(CommandExecutor::getEvaluation().command_, false);
     113        else
     114            CommandExecutor::getEvaluation().bNewCommand_ = false;
    115115
    116116        return CommandExecutor::getEvaluation().complete();
     
    132132    void CommandExecutor::parseIfNeeded(const std::string& command)
    133133    {
    134         if ((CommandExecutor::getEvaluation().getOriginalCommand() != command) || (CommandExecutor::getEvaluation().getState() == CS_Uninitialized))
     134        if ((CommandExecutor::getEvaluation().originalCommand_ != command) || (CommandExecutor::getEvaluation().state_ == CS_Uninitialized))
    135135            CommandExecutor::parse(command);
    136136    }
     
    142142            CommandExecutor::getEvaluation().initialize(command);
    143143
    144         CommandExecutor::getEvaluation().setTokens(command);
    145         CommandExecutor::getEvaluation().setCommand(command);
    146 
    147         switch (CommandExecutor::getEvaluation().getState())
     144        CommandExecutor::getEvaluation().commandTokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
     145        CommandExecutor::getEvaluation().command_ = command;
     146
     147        switch (CommandExecutor::getEvaluation().state_)
    148148        {
    149149            case CS_Uninitialized:
     
    161161                if (CommandExecutor::argumentsGiven() > 0)
    162162                {
    163                     CommandExecutor::getEvaluation().setState(CS_ShortcutOrIdentifier);
     163                    CommandExecutor::getEvaluation().state_ = CS_ShortcutOrIdentifier;
    164164                    CommandExecutor::parse(command, false);
    165165                    return;
     
    170170            {
    171171std::cout << "parse: state: CS_ShortcutOrIdentifier" << std::endl;
    172                 if (CommandExecutor::argumentsFinished() > 0 || !CommandExecutor::getEvaluation().isNewCommand())
     172                if (CommandExecutor::argumentsFinished() > 0 || !CommandExecutor::getEvaluation().bNewCommand_)
    173173                {
    174174                    // There's already a finished first argument - check if it's function or a classname
    175                     CommandExecutor::getEvaluation().setIdentifier(CommandExecutor::getPossibleIdentifier(CommandExecutor::getArgument(0)));
    176                     CommandExecutor::getEvaluation().setFunction(CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(0)));
    177 
    178                     if (CommandExecutor::getEvaluation().getFunction())
     175                    CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(CommandExecutor::getArgument(0));
     176                    CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(0));
     177
     178                    if (CommandExecutor::getEvaluation().function_)
    179179                    {
    180180                        // It's a shortcut - continue parsing
    181                         CommandExecutor::getEvaluation().setState(CS_Shortcut_Params);
     181                        CommandExecutor::getEvaluation().state_ = CS_Shortcut_Params;
    182182                        if (CommandExecutor::argumentsFinished() > 0 )
    183183                            CommandExecutor::parse(command, false);
     
    186186                        return;
    187187                    }
    188                     else if (CommandExecutor::getEvaluation().getIdentifier())
     188                    else if (CommandExecutor::getEvaluation().functionclass_)
    189189                    {
    190190                        // It's a classname - continue parsing
    191                         CommandExecutor::getEvaluation().setState(CS_Function);
     191                        CommandExecutor::getEvaluation().state_ = CS_Function;
    192192                        if (CommandExecutor::argumentsFinished() > 0 )
    193193                            CommandExecutor::parse(command, false);
     
    198198                }
    199199
    200                 unsigned int numIdentifiers = CommandExecutor::getEvaluation().getListOfPossibleIdentifiers().size();
    201                 unsigned int numCommands = CommandExecutor::getEvaluation().getListOfPossibleFunctions().size();
     200                unsigned int numIdentifiers = CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.size();
     201                unsigned int numCommands = CommandExecutor::getEvaluation().listOfPossibleFunctions_.size();
    202202
    203203                if (CommandExecutor::argumentsFinished() == 0)
     
    207207                    {
    208208                        // It must be this command
    209                         const std::string* possibleCommand = (*CommandExecutor::getEvaluation().getListOfPossibleFunctions().begin()).second;
    210                         CommandExecutor::getEvaluation().setState(CS_Shortcut_Params);
    211                         CommandExecutor::getEvaluation().setFunction(CommandExecutor::getPossibleCommand(*possibleCommand));
     209                        const std::string* possibleCommand = (*CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()).second;
     210                        CommandExecutor::getEvaluation().state_ = CS_Shortcut_Params;
     211                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(*possibleCommand);
    212212                        CommandExecutor::parse(*possibleCommand + " ", false);
    213213                        return;
     
    216216                    {
    217217                        // It must be this classname
    218                         const std::string* possibleIdentifier = (*CommandExecutor::getEvaluation().getListOfPossibleIdentifiers().begin()).second;
    219                         CommandExecutor::getEvaluation().setState(CS_Function);
    220                         CommandExecutor::getEvaluation().setIdentifier(CommandExecutor::getPossibleIdentifier(*possibleIdentifier));
     218                        const std::string* possibleIdentifier = (*CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.begin()).second;
     219                        CommandExecutor::getEvaluation().state_ = CS_Function;
     220                        CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(*possibleIdentifier);
    221221                        CommandExecutor::parse(*possibleIdentifier + " ", false);
    222222                        return;
     
    227227                {
    228228                    // It's not a shortcut nor a classname
    229                     CommandExecutor::getEvaluation().setState(CS_Error);
     229                    CommandExecutor::getEvaluation().state_ = CS_Error;
    230230                    AddLanguageEntry("commandexecutorunknownfirstargument", "is not a shortcut nor a classname");
    231                     CommandExecutor::getEvaluation().setError("Error: " + CommandExecutor::getArgument(0) + " " + GetLocalisation("commandexecutorunknownfirstargument") + ".");
     231                    CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(0) + " " + GetLocalisation("commandexecutorunknownfirstargument") + ".";
    232232                }
    233233                break;
     
    236236std::cout << "parse: state: CS_Function" << std::endl;
    237237            {
    238                 if (CommandExecutor::getEvaluation().getIdentifier() && CommandExecutor::argumentsGiven() > 0)
    239                 {
    240                     if (CommandExecutor::argumentsFinished() > 1 || !CommandExecutor::getEvaluation().isNewCommand())
     238                if (CommandExecutor::getEvaluation().functionclass_ && CommandExecutor::argumentsGiven() > 0)
     239                {
     240                    if (CommandExecutor::argumentsFinished() > 1 || !CommandExecutor::getEvaluation().bNewCommand_)
    241241                    {
    242242                        // There is already a second argument - check if it's a valid function
    243                         CommandExecutor::getEvaluation().setFunction(CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().getIdentifier()));
    244 
    245                         if (CommandExecutor::getEvaluation().getFunction())
     243                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
     244
     245                        if (CommandExecutor::getEvaluation().function_)
    246246                        {
    247247                            // It's a shortcut - continue parsing
    248                             CommandExecutor::getEvaluation().setState(CS_Function_Params);
     248                            CommandExecutor::getEvaluation().state_ = CS_Function_Params;
    249249                            if (CommandExecutor::argumentsFinished() > 1 )
    250250                                CommandExecutor::parse(command, false);
     
    257257                            // It's not a function
    258258                            AddLanguageEntry("commandexecutorunknowncommand", "is not a valid commandname");
    259                             CommandExecutor::getEvaluation().setError("Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknowncommand") + ".");
    260                             CommandExecutor::getEvaluation().setState(CS_Error);
    261                         }
    262                     }
    263 
    264                     CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().getIdentifier());
     259                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknowncommand") + ".";
     260                            CommandExecutor::getEvaluation().state_ = CS_Error;
     261                        }
     262                    }
     263
     264                    CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
    265265
    266266                    if (CommandExecutor::argumentsFinished() <= 1)
    267267                    {
    268268                        // There is no finished second argument
    269                         unsigned int numFunctions = CommandExecutor::getEvaluation().getListOfPossibleFunctions().size();
     269                        unsigned int numFunctions = CommandExecutor::getEvaluation().listOfPossibleFunctions_.size();
    270270
    271271                        if (numFunctions == 1)
    272272                        {
    273273                            // It must be this command
    274                             const std::string* possibleCommand = (*CommandExecutor::getEvaluation().getListOfPossibleFunctions().begin()).second;
    275                             CommandExecutor::getEvaluation().setState(CS_Function_Params);
    276                             CommandExecutor::getEvaluation().setFunction(CommandExecutor::getPossibleCommand(*possibleCommand, CommandExecutor::getEvaluation().getIdentifier()));
     274                            const std::string* possibleCommand = (*CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()).second;
     275                            CommandExecutor::getEvaluation().state_ = CS_Function_Params;
     276                            CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(*possibleCommand, CommandExecutor::getEvaluation().functionclass_);
    277277                            CommandExecutor::parse(CommandExecutor::getArgument(0) + " " + *possibleCommand + " ", false);
    278278                            return;
     
    282282                            // It's not a function
    283283                            AddLanguageEntry("commandexecutorunknowncommand", "is not a valid commandname");
    284                             CommandExecutor::getEvaluation().setError("Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknowncommand") + ".");
    285                             CommandExecutor::getEvaluation().setState(CS_Error);
     284                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknowncommand") + ".";
     285                            CommandExecutor::getEvaluation().state_ = CS_Error;
    286286                        }
    287287                    }
     
    292292
    293293                // Bad state
    294                 CommandExecutor::getEvaluation().setState(CS_Error);
     294                CommandExecutor::getEvaluation().state_ = CS_Error;
    295295                break;
    296296            }
     
    300300            {
    301301std::cout << "parse: state: CS_Function_Params" << std::endl;
    302                 if (CommandExecutor::getEvaluation().getFunction())
     302                if (CommandExecutor::getEvaluation().function_)
    303303                {
    304304                    unsigned int startindex = 0;
    305                     if (CommandExecutor::getEvaluation().getState() == CS_Shortcut_Params)
     305                    if (CommandExecutor::getEvaluation().state_ == CS_Shortcut_Params)
    306306                        startindex = 1;
    307                     else if (CommandExecutor::getEvaluation().getState() == CS_Function_Params)
     307                    else if (CommandExecutor::getEvaluation().state_ == CS_Function_Params)
    308308                        startindex = 2;
    309309
    310310                    if (CommandExecutor::argumentsGiven() >= startindex)
    311311                    {
    312                         if ((CommandExecutor::argumentsGiven() == CommandExecutor::argumentsFinished() || !CommandExecutor::getEvaluation().isNewCommand()) && CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().getFunction()))
    313                         {
    314                             if (CommandExecutor::getEvaluation().getState() == CS_Shortcut_Params)
    315                                 CommandExecutor::getEvaluation().setState(CS_Shortcut_Finished);
    316                             else if (CommandExecutor::getEvaluation().getState() == CS_Function_Params)
    317                                 CommandExecutor::getEvaluation().setState(CS_Function_Finished);
     312                        if ((CommandExecutor::argumentsGiven() == CommandExecutor::argumentsFinished() || !CommandExecutor::getEvaluation().bNewCommand_) && CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().function_))
     313                        {
     314                            if (CommandExecutor::getEvaluation().state_ == CS_Shortcut_Params)
     315                                CommandExecutor::getEvaluation().state_ = CS_Shortcut_Finished;
     316                            else if (CommandExecutor::getEvaluation().state_ == CS_Function_Params)
     317                                CommandExecutor::getEvaluation().state_ = CS_Function_Finished;
    318318
    319319                            return;
     
    321321                        else
    322322                        {
    323                             CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().getFunction(), CommandExecutor::getEvaluation().getTokens().size() - startindex);
    324                             unsigned int numArguments = CommandExecutor::getEvaluation().getListOfPossibleArguments().size();
     323                            CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, CommandExecutor::getEvaluation().commandTokens_.size() - startindex);
     324                            unsigned int numArguments = CommandExecutor::getEvaluation().listOfPossibleArguments_.size();
    325325
    326326                            if (numArguments == 1)
    327327                            {
    328328                                // There is exactly one possible argument
    329                                 const std::string* possibleArgument = (*CommandExecutor::getEvaluation().getListOfPossibleArguments().begin()).second;
     329                                const std::string* possibleArgument = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).second;
    330330                                if (CommandExecutor::argumentsGiven() > CommandExecutor::argumentsFinished())
    331                                     CommandExecutor::parse(CommandExecutor::getEvaluation().getTokens().subSet(0, CommandExecutor::getEvaluation().getTokens().size() - 1).join() + " " + (*possibleArgument) + " ", false);
     331                                    CommandExecutor::parse(CommandExecutor::getEvaluation().commandTokens_.subSet(0, CommandExecutor::getEvaluation().commandTokens_.size() - 1).join() + " " + (*possibleArgument) + " ", false);
    332332                                else
    333                                     CommandExecutor::parse(CommandExecutor::getEvaluation().getTokens().subSet(0, CommandExecutor::getEvaluation().getTokens().size()).join() + " " + (*possibleArgument) + " ", false);
     333                                    CommandExecutor::parse(CommandExecutor::getEvaluation().commandTokens_.subSet(0, CommandExecutor::getEvaluation().commandTokens_.size()).join() + " " + (*possibleArgument) + " ", false);
    334334
    335335                                return;
    336336                            }
    337337
    338                             if ((CommandExecutor::argumentsGiven() > CommandExecutor::argumentsFinished()) && (!CommandExecutor::getEvaluation().isNewCommand()))
     338                            if ((CommandExecutor::argumentsGiven() > CommandExecutor::argumentsFinished()) && (!CommandExecutor::getEvaluation().bNewCommand_))
    339339                            {
    340340                                // There is more than one argument, but the user wants to use this - check if there is a perfect match
    341                                 const std::string* possibleArgument = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().getFunction(), CommandExecutor::getEvaluation().getTokens().size() - startindex);
     341                                const std::string* possibleArgument = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, CommandExecutor::getEvaluation().commandTokens_.size() - startindex);
    342342                                if (possibleArgument)
    343343                                {
     
    355355
    356356                // Bad state
    357                 CommandExecutor::getEvaluation().setState(CS_Error);
     357                CommandExecutor::getEvaluation().state_ = CS_Error;
    358358                break;
    359359            }
     
    372372    unsigned int CommandExecutor::argumentsFinished()
    373373    {
    374         if (CommandExecutor::getEvaluation().getCommand().size() > 0)
    375         {
    376             if (CommandExecutor::getEvaluation().getCommand()[CommandExecutor::getEvaluation().getCommand().size() - 1] == ' ')
    377                 return CommandExecutor::getEvaluation().getTokens().size();
    378             else if (CommandExecutor::getEvaluation().getTokens().size() > 0)
    379                 return CommandExecutor::getEvaluation().getTokens().size() - 1;
     374        if (CommandExecutor::getEvaluation().command_.size() > 0)
     375        {
     376            if (CommandExecutor::getEvaluation().command_[CommandExecutor::getEvaluation().command_.size() - 1] == ' ')
     377                return CommandExecutor::getEvaluation().commandTokens_.size();
     378            else if (CommandExecutor::getEvaluation().commandTokens_.size() > 0)
     379                return CommandExecutor::getEvaluation().commandTokens_.size() - 1;
    380380        }
    381381        return 0;
     
    384384    unsigned int CommandExecutor::argumentsGiven()
    385385    {
    386         return CommandExecutor::getEvaluation().getTokens().size();
     386        return CommandExecutor::getEvaluation().commandTokens_.size();
    387387    }
    388388
    389389    bool CommandExecutor::enoughArgumentsGiven(ConsoleCommand* command)
    390390    {
    391         if (CommandExecutor::getEvaluation().getIdentifier())
     391        if (CommandExecutor::getEvaluation().functionclass_)
    392392            return (CommandExecutor::argumentsGiven() >= (2 + command->getParamCount()));
    393393        else
     
    397397    std::string CommandExecutor::getArgument(unsigned int index)
    398398    {
    399         if ((index >= 0) && index < (CommandExecutor::getEvaluation().getTokens().size()))
    400             return CommandExecutor::getEvaluation().getTokens()[index];
     399        if ((index >= 0) && index < (CommandExecutor::getEvaluation().commandTokens_.size()))
     400            return CommandExecutor::getEvaluation().commandTokens_[index];
    401401        else
    402402            return "";
     
    405405    std::string CommandExecutor::getLastArgument()
    406406    {
    407         if (CommandExecutor::getEvaluation().getTokens().size() > 0)
    408             if (CommandExecutor::getEvaluation().getCommand().size() > 0 && CommandExecutor::getEvaluation().getCommand()[CommandExecutor::getEvaluation().getCommand().size() - 1] != ' ')
    409                 return CommandExecutor::getEvaluation().getTokens()[CommandExecutor::getEvaluation().getTokens().size() - 1];
     407        if (CommandExecutor::getEvaluation().commandTokens_.size() > 0)
     408            if (CommandExecutor::getEvaluation().commandTokens_.size() > 0 && CommandExecutor::getEvaluation().command_[CommandExecutor::getEvaluation().command_.size() - 1] != ' ')
     409                return CommandExecutor::getEvaluation().commandTokens_[CommandExecutor::getEvaluation().commandTokens_.size() - 1];
    410410
    411411        return "";
     
    414414    void CommandExecutor::createListOfPossibleIdentifiers(const std::string& fragment)
    415415    {
    416         CommandExecutor::getEvaluation().getListOfPossibleIdentifiers().clear();
     416        CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.clear();
    417417        std::string lowercase = getLowercase(fragment);
    418418        for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseIdentifierMapBegin(); it != Identifier::getLowercaseIdentifierMapEnd(); ++it)
    419419            if ((*it).second->hasConsoleCommands())
    420420                if ((*it).first.find(lowercase) == 0 || fragment == "")
    421                     CommandExecutor::getEvaluation().getListOfPossibleIdentifiers().push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
    422 
    423         CommandExecutor::getEvaluation().getListOfPossibleIdentifiers().sort(CommandExecutor::compareStringsInList);
     421                    CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
     422
     423        CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.sort(CommandExecutor::compareStringsInList);
    424424    }
    425425
    426426    void CommandExecutor::createListOfPossibleFunctions(const std::string& fragment, Identifier* identifier)
    427427    {
    428         CommandExecutor::getEvaluation().getListOfPossibleFunctions().clear();
     428        CommandExecutor::getEvaluation().listOfPossibleFunctions_.clear();
    429429        std::string lowercase = getLowercase(fragment);
    430430        if (!identifier)
     
    432432            for (std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMapBegin(); it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd(); ++it)
    433433                if ((*it).first.find(lowercase) == 0 || fragment == "")
    434                     CommandExecutor::getEvaluation().getListOfPossibleFunctions().push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
     434                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
    435435        }
    436436        else
     
    438438            for (std::map<std::string, ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMapBegin(); it != identifier->getLowercaseConsoleCommandMapEnd(); ++it)
    439439                if ((*it).first.find(lowercase) == 0 || fragment == "")
    440                     CommandExecutor::getEvaluation().getListOfPossibleFunctions().push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
    441         }
    442 
    443         CommandExecutor::getEvaluation().getListOfPossibleFunctions().sort(CommandExecutor::compareStringsInList);
     440                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
     441        }
     442
     443        CommandExecutor::getEvaluation().listOfPossibleFunctions_.sort(CommandExecutor::compareStringsInList);
    444444    }
    445445
    446446    void CommandExecutor::createListOfPossibleArguments(const std::string& fragment, ConsoleCommand* command, unsigned int param)
    447447    {
    448         CommandExecutor::getEvaluation().getListOfPossibleArguments().clear();
     448        CommandExecutor::getEvaluation().listOfPossibleArguments_.clear();
    449449        std::string lowercase = getLowercase(fragment);
    450450        for (std::list<std::pair<std::string, std::string> >::const_iterator it = command->getArgumentCompletionListBegin(param); it != command->getArgumentCompletionListEnd(param); ++it)
    451451            if ((*it).first.find(lowercase) == 0 || fragment == "")
    452                 CommandExecutor::getEvaluation().getListOfPossibleArguments().push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second));
    453 
    454         CommandExecutor::getEvaluation().getListOfPossibleArguments().sort(CommandExecutor::compareStringsInList);
     452                CommandExecutor::getEvaluation().listOfPossibleArguments_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second));
     453
     454        CommandExecutor::getEvaluation().listOfPossibleArguments_.sort(CommandExecutor::compareStringsInList);
    455455    }
    456456
Note: See TracChangeset for help on using the changeset viewer.