OpenTTD Source
12.0-beta2
|
Public Types | |
typedef std::map< std::string, IConsoleCmd > | CommandList |
typedef std::map< std::string, IConsoleAlias > | AliasList |
Static Public Member Functions | |
static CommandList & | Commands () |
static AliasList & | Aliases () |
static void | CmdRegister (const std::string &name, IConsoleCmdProc *proc, IConsoleHook *hook=nullptr) |
Register a new command to be used in the console. More... | |
static IConsoleCmd * | CmdGet (const std::string &name) |
Find the command pointed to by its string. More... | |
static void | AliasRegister (const std::string &name, const std::string &cmd) |
Register a an alias for an already existing command in the console. More... | |
static IConsoleAlias * | AliasGet (const std::string &name) |
Find the alias pointed to by its string. More... | |
Definition at line 63 of file console_internal.h.
|
static |
Find the alias pointed to by its string.
name | alias to be found |
Definition at line 201 of file console.cpp.
References CompanyProperties::name, and RemoveUnderscores().
Referenced by IConsoleCmdExec().
|
static |
Register a an alias for an already existing command in the console.
name | name of the alias that will be used |
cmd | name of the command that 'name' will be alias of |
Definition at line 190 of file console.cpp.
References CC_ERROR, IConsolePrint(), CompanyProperties::name, and RemoveUnderscores().
|
static |
Find the command pointed to by its string.
name | command to be found |
Definition at line 178 of file console.cpp.
References CompanyProperties::name, and RemoveUnderscores().
Referenced by IConsoleCmdExec().
|
static |
Register a new command to be used in the console.
name | name of the command that will be used |
proc | function that will be called upon execution of command |
Definition at line 168 of file console.cpp.