OpenTTD Source 20260218-master-g2123fca5ea
IConsoleCmd Struct Reference

CommandsCommands are commands, or functions. More...

#include <console_internal.h>

Public Member Functions

 IConsoleCmd (const std::string &name, IConsoleCmdProc *proc, IConsoleHook *hook)

Data Fields

std::string name
 name of command
IConsoleCmdProcproc
 process executed when command is typed
IConsoleHookhook
 any special trigger action that needs executing

Detailed Description

CommandsCommands are commands, or functions.

They get executed once and any effect they produce are carried out. The arguments to the commands are given to them, each input word separated by a double-quote (") is an argument If you want to handle multiple words as one, enclose them in double-quotes eg. 'say "hello everybody"'

Definition at line 46 of file console_internal.h.

Constructor & Destructor Documentation

◆ IConsoleCmd()

IConsoleCmd::IConsoleCmd ( const std::string & name,
IConsoleCmdProc * proc,
IConsoleHook * hook )
inline

Definition at line 47 of file console_internal.h.

Field Documentation

◆ hook

IConsoleHook* IConsoleCmd::hook

any special trigger action that needs executing

Definition at line 51 of file console_internal.h.

Referenced by ConInfoCmd(), ConListCommands(), and IConsoleCmdExec().

◆ name

std::string IConsoleCmd::name

name of command

Definition at line 49 of file console_internal.h.

Referenced by ConInfoCmd(), and ConListCommands().

◆ proc

IConsoleCmdProc* IConsoleCmd::proc

process executed when command is typed

Definition at line 50 of file console_internal.h.

Referenced by ConHelp(), and IConsoleCmdExec().


The documentation for this struct was generated from the following file: