Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/command/CommandExecutor.cc

    r9550 r10624  
    3434#include "CommandExecutor.h"
    3535
    36 #include "ConsoleCommand.h"
     36#include "ConsoleCommandIncludes.h"
    3737#include "TclBind.h"
    3838#include "Shell.h"
     
    155155
    156156        // assign the fallback-command to get hints about the possible commands and groups
    157         evaluation.hintCommand_ = ConsoleCommand::getCommand(__CC_CommandExecutor_name, __CC_autocomplete_name);
     157        evaluation.hintCommand_ = ConsoleCommandManager::getInstance().getCommand(__CC_CommandExecutor_name, __CC_autocomplete_name);
    158158
    159159        // check if there's at least one argument
     
    161161        {
    162162            // try to get a command from the first token
    163             evaluation.execCommand_ = ConsoleCommand::getCommandLC(evaluation.getToken(0));
     163            evaluation.execCommand_ = ConsoleCommandManager::getInstance().getCommandLC(evaluation.getToken(0));
    164164            if (evaluation.execCommand_)
    165165                evaluation.execArgumentsOffset_ = 1;
     
    167167            {
    168168                // try to get a command from the first two tokens
    169                 evaluation.execCommand_ = ConsoleCommand::getCommandLC(evaluation.getToken(0), evaluation.getToken(1));
     169                evaluation.execCommand_ = ConsoleCommandManager::getInstance().getCommandLC(evaluation.getToken(0), evaluation.getToken(1));
    170170                if (evaluation.execCommand_)
    171171                    evaluation.execArgumentsOffset_ = 2;
     
    288288
    289289            // check if the alias already exists - print an error and return if it does
    290             if ((tokens.size() == 1 && ConsoleCommand::getCommand(tokens[0])) || (tokens.size() == 2 && ConsoleCommand::getCommand(tokens[0], tokens[1])))
     290            if ((tokens.size() == 1 && ConsoleCommandManager::getInstance().getCommand(tokens[0])) || (tokens.size() == 2 && ConsoleCommandManager::getInstance().getCommand(tokens[0], tokens[1])))
    291291            {
    292292                orxout(user_error) << "A command with name \"" << alias << "\" already exists." << endl;
     
    296296            // create a new console command with the given alias as its name
    297297            if (tokens.size() == 1)
    298                 createConsoleCommand(tokens[0], executor);
     298                ConsoleCommandManager::getInstance().registerCommand(new ConsoleCommand(tokens[0], executor));
    299299            else if (tokens.size() == 2)
    300                 createConsoleCommand(tokens[0], tokens[1], executor);
     300                ConsoleCommandManager::getInstance().registerCommand(new ConsoleCommand(tokens[0], tokens[1], executor));
    301301            else
    302302                orxout(user_error) << "\"" << alias << "\" is not a valid alias name (must have one or two words)." << endl;
Note: See TracChangeset for help on using the changeset viewer.