FS2_Open
Open source remastering of the Freespace 2 engine
|
Class to aggregate a debug command with its name (as shown in the console) and short help. More...
#include <console.h>
Public Member Functions | |
debug_command () | |
debug_command (const char *name, const char *help, void(*func)()) | |
Adds a debug command to the debug_commands map, if it isn't in there already. More... | |
Public Attributes | |
const char * | name |
The name of the command, as shown in the debug console. More... | |
const char * | help |
The short help string, as shown by 'help <command>'. More... | |
void(* | func )() |
Pointer to the function that to run when this command is evoked. More... | |
Class to aggregate a debug command with its name (as shown in the console) and short help.
Note: Long help, as evoked by '<command> help', should be handled by the function itself. It is recommended that arguments that have sub-arguments be in their own function, so as to aide in organization and to keep the size of the command function down.
debug_command::debug_command | ( | ) |
Definition at line 37 of file consolecmds.cpp.
debug_command::debug_command | ( | const char * | name, |
const char * | help, | ||
void(*)() | func | ||
) |
Adds a debug command to the debug_commands map, if it isn't in there already.
The DCF macro more or less guarantees that a command won't be duplicated on compile time. But no harm in some extra caution.
Definition at line 41 of file consolecmds.cpp.
void(* debug_command::func) () |
const char* debug_command::help |
const char* debug_command::name |