|
OpenTTD Source 20260218-master-g2123fca5ea
|
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. | |
| static IConsoleCmd * | CmdGet (const std::string &name) |
| Find the command pointed to by its string. | |
| static void | AliasRegister (const std::string &name, std::string_view cmd) |
| Register a an alias for an already existing command in the console. | |
| static IConsoleAlias * | AliasGet (const std::string &name) |
| Find the alias pointed to by its string. | |
Definition at line 73 of file console_internal.h.
| typedef std::map<std::string, IConsoleAlias> IConsole::AliasList |
Definition at line 76 of file console_internal.h.
| typedef std::map<std::string, IConsoleCmd> IConsole::CommandList |
Definition at line 75 of file console_internal.h.
|
static |
Definition at line 32 of file console.cpp.
|
static |
Find the alias pointed to by its string.
| name | alias to be found |
Definition at line 171 of file console.cpp.
References RemoveUnderscores().
Referenced by ConAlias(), ConHelp(), and 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 160 of file console.cpp.
References CC_ERROR, IConsolePrint(), and RemoveUnderscores().
Referenced by ConAlias().
|
static |
Find the command pointed to by its string.
| name | command to be found |
Definition at line 148 of file console.cpp.
References RemoveUnderscores().
Referenced by ConHelp(), ConInfoCmd(), and 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 |
| hook | Callback to check whether the command is allowed to run in the current context. |
Definition at line 138 of file console.cpp.
References RemoveUnderscores().
|
static |
Definition at line 26 of file console.cpp.