Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2015, 8:25:11 PM (9 years ago)
Author:
landauf
Message:

moved static contents from ConsoleCommand to ConsoleCommandManager

File:
1 edited

Legend:

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

    r9667 r10346  
    9898
    9999                // get all the groups that are visible (except the shortcut group "")
    100                 const std::map<std::string, std::map<std::string, ConsoleCommand*> >& commands = ConsoleCommand::getCommands();
     100                const std::map<std::string, std::map<std::string, ConsoleCommand*> >& commands = ConsoleCommandManager::getCommands();
    101101                for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
    102102                    if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "" && (fragmentLC == "" || getLowercase(it_group->first).find(fragmentLC) == 0))
     
    137137
    138138                // find the iterator of the given group
    139                 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand::getCommands().begin();
    140                 for ( ; it_group != ConsoleCommand::getCommands().end(); ++it_group)
     139                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommands().begin();
     140                for ( ; it_group != ConsoleCommandManager::getCommands().end(); ++it_group)
    141141                    if (getLowercase(it_group->first) == groupLC)
    142142                        break;
    143143
    144144                // add all commands in the group to the list
    145                 if (it_group != ConsoleCommand::getCommands().end())
     145                if (it_group != ConsoleCommandManager::getCommands().end())
    146146                {
    147147                    for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
     
    206206                return detail::_groupsandcommands(fragment, true);
    207207
    208             if (ConsoleCommand::getCommandLC(getLowercase(tokens[0])))
     208            if (ConsoleCommandManager::getCommandLC(getLowercase(tokens[0])))
    209209                return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment);
    210210
    211211            if (tokens.size() == 1)
    212212            {
    213                 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand::getCommands().find(tokens[0]);
    214                 if (it_group != ConsoleCommand::getCommands().end())
     213                std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getCommands().find(tokens[0]);
     214                if (it_group != ConsoleCommandManager::getCommands().end())
    215215                    return detail::_subcommands(fragment, tokens[0], true);
    216216                else
     
    218218            }
    219219
    220             if (ConsoleCommand::getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1])))
     220            if (ConsoleCommandManager::getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1])))
    221221                return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment);
    222222
Note: See TracChangeset for help on using the changeset viewer.