Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 28, 2010, 1:51:04 AM (14 years ago)
Author:
landauf
Message:

replaced the temporary names of all ConsoleCommand related classes and functions by their real names

File:
1 edited

Legend:

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

    r7235 r7236  
    6060        namespace detail
    6161        {
    62             bool groupIsVisible(const std::map<std::string, _ConsoleCommand*>& group, bool bOnlyShowHidden)
    63             {
    64                 for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = group.begin(); it_command != group.end(); ++it_command)
     62            bool groupIsVisible(const std::map<std::string, ConsoleCommand*>& group, bool bOnlyShowHidden)
     63            {
     64                for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = group.begin(); it_command != group.end(); ++it_command)
    6565                    if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
    6666                        return true;
     
    7474                std::string fragmentLC = getLowercase(fragment);
    7575
    76                 const std::map<std::string, std::map<std::string, _ConsoleCommand*> >& commands = _ConsoleCommand::getCommands();
    77                 for (std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
     76                const std::map<std::string, std::map<std::string, ConsoleCommand*> >& commands = ConsoleCommand::getCommands();
     77                for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
    7878                    if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "" && (fragmentLC == "" || getLowercase(it_group->first).find_first_of(fragmentLC) == 0))
    7979                        groupList.push_back(ArgumentCompletionListElement(it_group->first, getLowercase(it_group->first)));
    8080
    81                 std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.find("");
     81                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = commands.find("");
    8282                if (it_group != commands.end())
    8383                {
     
    8585                        groupList.push_back(ArgumentCompletionListElement("", "", "\n"));
    8686
    87                     for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
     87                    for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
    8888                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden && (fragmentLC == "" || getLowercase(it_command->first).find_first_of(fragmentLC) == 0))
    8989                            groupList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
     
    102102                std::string groupLC = getLowercase(group);
    103103
    104                 std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommands().begin();
    105                 for ( ; it_group != _ConsoleCommand::getCommands().end(); ++it_group)
     104                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand::getCommands().begin();
     105                for ( ; it_group != ConsoleCommand::getCommands().end(); ++it_group)
    106106                    if (getLowercase(it_group->first) == groupLC)
    107107                        break;
    108108
    109                 if (it_group != _ConsoleCommand::getCommands().end())
    110                 {
    111                     for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
     109                if (it_group != ConsoleCommand::getCommands().end())
     110                {
     111                    for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
    112112                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
    113113                            commandList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
     
    152152                return detail::_groupsandcommands(fragment, true);
    153153
    154             if (_ConsoleCommand::getCommandLC(getLowercase(tokens[0])))
     154            if (ConsoleCommand::getCommandLC(getLowercase(tokens[0])))
    155155                return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment);
    156156
    157157            if (tokens.size() == 1)
    158158            {
    159                 std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommands().find(tokens[0]);
    160                 if (it_group != _ConsoleCommand::getCommands().end())
     159                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand::getCommands().find(tokens[0]);
     160                if (it_group != ConsoleCommand::getCommands().end())
    161161                    return detail::_subcommands(fragment, tokens[0], true);
    162162                else
     
    164164            }
    165165
    166             if (_ConsoleCommand::getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1])))
     166            if (ConsoleCommand::getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1])))
    167167                return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment);
    168168
Note: See TracChangeset for help on using the changeset viewer.