Advanced Software Engineering
Advanced_Software_Engineering.Commander Class Reference

The commander class takes care of commands. It also takes control of the drawer. More...

Public Member Functions

void DrawAllCommands (Graphics updateGraphicsElement)
 This command updates the graphics element (usually) when the page repaints. More...
 
 Commander (Graphics graphics)
 Create a new Commander instance. More...
 
 Commander ()
 Creates a new Commander instance without a context. Should only be used for testing purpouses. More...
 
 Commander (Graphics graphics, string rawCommands)
 Creates a new Commander instance with a graphics context and commands to process right off the bat. More...
 
void AddCommand (IVerb command)
 Adds a IVerb to the command list to be executed. More...
 
void ProcessCommands (string rawCommands, bool pardonCommands=false)
 processes commands. Removes all commands if it fails parsing the raw commands. More...
 
void ProcessCommandsAndExecute (string rawCommands, bool pardonCommands=false)
 Processes the commands and executes them at the same time. It's the same as More...
 
void RemoveAllCommands ()
 Removes all commands from the Commander and resets the drawer. More...
 
string ExplainCommands ()
 Explains all of the commands in order More...
 
bool GetLastStatus ()
 Gets the status of the code that was processed More...
 

Detailed Description

The commander class takes care of commands. It also takes control of the drawer.

Constructor & Destructor Documentation

◆ Commander() [1/3]

Advanced_Software_Engineering.Commander.Commander ( Graphics  graphics)

Create a new Commander instance.

Parameters
graphicsinitial graphics object

◆ Commander() [2/3]

Advanced_Software_Engineering.Commander.Commander ( )

Creates a new Commander instance without a context. Should only be used for testing purpouses.

◆ Commander() [3/3]

Advanced_Software_Engineering.Commander.Commander ( Graphics  graphics,
string  rawCommands 
)

Creates a new Commander instance with a graphics context and commands to process right off the bat.

Parameters
graphicsGraphics contetx
rawCommandsCommands to process

Member Function Documentation

◆ AddCommand()

void Advanced_Software_Engineering.Commander.AddCommand ( IVerb  command)

Adds a IVerb to the command list to be executed.

Parameters
commandIVerb to be added.
See also
IVerb

◆ DrawAllCommands()

void Advanced_Software_Engineering.Commander.DrawAllCommands ( Graphics  updateGraphicsElement)

This command updates the graphics element (usually) when the page repaints.

Parameters
updateGraphicsElementThe graphics element to be updated

◆ ExplainCommands()

string Advanced_Software_Engineering.Commander.ExplainCommands ( )

Explains all of the commands in order

Returns
Explanation of all the commands

◆ GetLastStatus()

bool Advanced_Software_Engineering.Commander.GetLastStatus ( )

Gets the status of the code that was processed

Returns
False if there was no error. True if there was an error

◆ ProcessCommands()

void Advanced_Software_Engineering.Commander.ProcessCommands ( string  rawCommands,
bool  pardonCommands = false 
)

processes commands. Removes all commands if it fails parsing the raw commands.

Parameters
rawCommandsProcesses commands seperated by
or \r
pardonCommandsIf the command is wrong, don't remove all of the commands

◆ ProcessCommandsAndExecute()

void Advanced_Software_Engineering.Commander.ProcessCommandsAndExecute ( string  rawCommands,
bool  pardonCommands = false 
)

Processes the commands and executes them at the same time. It's the same as

Parameters
rawCommandsProcesses commands seperated by
or \r
pardonCommandsIf the command is wrong, don't remove all of the commands

◆ RemoveAllCommands()

void Advanced_Software_Engineering.Commander.RemoveAllCommands ( )

Removes all commands from the Commander and resets the drawer.


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