ARSTD::Command Class Reference

Inheritance diagram for ARSTD::Command:

Inheritance graph
[legend]
List of all members.

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

virtual PtrType ARSTD::Command::copy (  )  const [pure virtual]

Returns a copy of the command.

Returns:
The copied command.

Implemented in CSWSetEngineIntensityCommand, CSWSetEngineDirectionCommand, CSWSendEventCommand, CSWFireCommand, CSWRechargeWeaponBatteryCommand, CSWWaitCommand, ARSTD::RepeatCommand, ARSTD::PushCommand, ARSTD::PopCommand, ARSTD::CleanupHistoryCommand, and ARSTD::MacroCommand.

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

Returns the name of the command.

Returns:
The name of the command.

Implemented in CSWExecuteCommand, CSWWaitCommand, ARSTD::RepeatCommand, ARSTD::PushCommand, ARSTD::PopCommand, ARSTD::CleanupHistoryCommand, and ARSTD::MacroCommand.

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.

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.


Generated at 2 Jan 2007 for project CodeSubWars. www.codesubwars.org