Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
DebugCmdInterface Interface Referenceabstract

Debug command group interface. More...

#include <rts/debug.h>

Inherited by DebugCmdInterfaceDebug, ProfileCmdInterface, and TestCmdInterface.

Public Types

enum  CommandMode { Normal , Structured , MAX }
 possible command modes More...
 

Public Member Functions

 DebugCmdInterface (void)
 
virtual bool Execute (class Debug &dbg, const char *cmd, CommandMode cmdmode, unsigned argn, const char *const *argv)=0
 Execute the given command.
 
virtual void Delete (void)=0
 Destroys the current command interface.
 

Protected Member Functions

virtual ~DebugCmdInterface ()
 

Detailed Description

Debug command group interface.

A debug command group interface implementation defines a new command group and the commands implemented for this group.

A Debug command group interface instance must register itself using Debug::AddCommands. Ownership is then transfered to the Debug module unless the object is manually removed by calling Debug::RemoveCommands.

For convenience the macro DEBUG_CREATE_COMMAND_GROUP can be used as well.

Definition at line 51 of file debug_cmd.h.

Member Enumeration Documentation

◆ CommandMode

possible command modes

Enumerator
Normal 

normal command mode

Structured 

structured command mode

MAX 

Definition at line 66 of file debug_cmd.h.

Constructor & Destructor Documentation

◆ ~DebugCmdInterface()

virtual DebugCmdInterface::~DebugCmdInterface ( )
inlineprotectedvirtual

Definition at line 59 of file debug_cmd.h.

◆ DebugCmdInterface()

DebugCmdInterface::DebugCmdInterface ( void )
inlineexplicit

Definition at line 63 of file debug_cmd.h.

Member Function Documentation

◆ Delete()

virtual void DebugCmdInterface::Delete ( void )
pure virtual

Destroys the current command interface.

Use this function instead of just delete'ing the instance.

Implemented in DebugCmdInterfaceDebug, ProfileCmdInterface, and TestCmdInterface.

◆ Execute()

virtual bool DebugCmdInterface::Execute ( class Debug & dbg,
const char * cmd,
CommandMode cmdmode,
unsigned argn,
const char *const * argv )
pure virtual

Execute the given command.

This function is called whenever a command has been issued for the command group the interface implements.

Parameters
dbgdebug instance
cmdcommand issued
cmdmodecommand mode
argnnumber of additional arguments passed in
argvargument list
Returns
true if command was known, false if not

Implemented in DebugCmdInterfaceDebug, ProfileCmdInterface, and TestCmdInterface.


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