CodeSubWars 0.4.7b
ARSTD::Command Class Referenceabstract

#include <Command.h>

Inheritance diagram for ARSTD::Command:

Public Member Functions

virtual PtrType copy () const =0
 
virtual std::string getName () const =0
 
virtual bool wasExecuted () const
 
virtual double getProgress () const
 

Detailed Description

The base class of all Commands that can be executed by the CommandProcessor.

Warning
An instance of a command must not used more than ones. To execute the same command again copy it first.

Member Function Documentation

◆ copy()

◆ getName()

virtual std::string ARSTD::Command::getName ( ) const
pure virtual

◆ getProgress()

virtual double ARSTD::Command::getProgress ( ) const
virtual

Returns the progress of command execution.

Returns
The progress of the execution in range [0, 1].

Reimplemented in ARSTD::MacroCommand.

◆ wasExecuted()

virtual bool ARSTD::Command::wasExecuted ( ) const
virtual

Returns whether the command was already executed.

Returns
Returns true if the command was successfully executed otherwise false. If the progress has not reached 1 (or 100%) false is returned.

Reimplemented in ARSTD::MacroCommand.


Generated at Sun Aug 7 2022 for project CodeSubWars. www.codesubwars.org