Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
Command Class Referenceabstract

This is the Command class from which all debugger commands derive. Each debugger command has a name and a shorthand name. The run() method is overloaded by each particular command to implement its particular behavior. More...

#include <debugger.hpp>

Inheritance diagram for Command:
CreateCommand DeleteCommand HelpCommand PrintCommand QuitCommand SetCommand StateCommand StepCommand

Public Member Functions

virtual void run (std::vector< std::string > arguments, ServerGameState &state)=0
 The Command's run() method is overloaded by each particular command to implement its particular behavior. More...
 

Data Fields

std::string name
 The Command's name. When the user enters an input string, the first word is treated as the intended command name, and if the debugger finds a command with a matching name, it will attempt to run it. More...
 
std::string shorthand
 Alternative shorthand name that also refers to this command. More...
 

Detailed Description

This is the Command class from which all debugger commands derive. Each debugger command has a name and a shorthand name. The run() method is overloaded by each particular command to implement its particular behavior.

Member Function Documentation

◆ run()

virtual void Command::run ( std::vector< std::string >  arguments,
ServerGameState state 
)
pure virtual

The Command's run() method is overloaded by each particular command to implement its particular behavior.

Parameters
argumentsVector of string arguments from user
stateReference to the ServerGameState instance maintained by the debugger.

Implemented in QuitCommand, StepCommand, StateCommand, PrintCommand, HelpCommand, CreateCommand, DeleteCommand, and SetCommand.

Field Documentation

◆ name

std::string Command::name

The Command's name. When the user enters an input string, the first word is treated as the intended command name, and if the debugger finds a command with a matching name, it will attempt to run it.

◆ shorthand

std::string Command::shorthand

Alternative shorthand name that also refers to this command.


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