ARSTD::MacroCommand Class Reference

Inheritance diagram for ARSTD::MacroCommand:

Inheritance graph
List of all members.

Public Member Functions

virtual Command::PtrType copy () const
virtual std::string getName () const
virtual bool wasExecuted () const
virtual double getProgress () const
void attach (Command::PtrType pCommand)
void detach (Command::PtrType pCommand)

Static Public Member Functions

static PtrType create (const std::string &strName)

Detailed Description

This class provides functionality for defining macro commands. Macro commands are a list of other commands. These commands can also be MacroCommands. The order of the list is the same as the execution order.

Member Function Documentation

MacroCommand::PtrType ARSTD::MacroCommand::create ( const std::string &  strName  )  [static]

Creates a new MacroCommand.

strName The name of the MacroCommand.

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

Returns a copy of the command.

The copied command.

Implements ARSTD::Command.

std::string ARSTD::MacroCommand::getName (  )  const [virtual]

Returns the name of the command.

The name of the command.

Implements ARSTD::Command.

bool ARSTD::MacroCommand::wasExecuted (  )  const [virtual]

Returns whether the command was already executed.

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

Reimplemented from ARSTD::Command.

double ARSTD::MacroCommand::getProgress (  )  const [virtual]

Returns the progress of command execution.

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

Reimplemented from ARSTD::Command.

void ARSTD::MacroCommand::attach ( Command::PtrType  pCommand  ) 

Attaches a command or MacroCommand.

pCommand The command that should be attached.

void ARSTD::MacroCommand::detach ( Command::PtrType  pCommand  ) 

Detaches a command or MacroCommand.

pCommand The command that should be detached.

Generated at 2 Jan 2007 for project CodeSubWars.