DestructUnitCommand Class Reference

#include <destructunitcommand.h>

Inheritance diagram for DestructUnitCommand:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 DestructUnitCommand (ContainerBase *carrier)
ActionResult go (const Context &context)
ASCString getCommandString () const

Static Public Member Functions

static bool avail (const ContainerBase *unit)

Protected Member Functions

void readData (tnstream &stream)
void writeData (tnstream &stream) const
GameActionID getID () const
ASCString getDescription () const

Friends

template<class Child>
GameActionGameActionCreator (GameMap *map)

Detailed Description

Definition at line 32 of file destructunitcommand.h.


Constructor & Destructor Documentation

DestructUnitCommand::DestructUnitCommand ( ContainerBase carrier  ) 

Definition at line 53 of file destructunitcommand.cpp.

References avail(), Command::setState(), and Command::SetUp.


Member Function Documentation

bool DestructUnitCommand::avail ( const ContainerBase unit  )  [static]

Definition at line 40 of file destructunitcommand.cpp.

References ContainerBase::baseType, ContainerCommand::getContainer(), GameMap::getField(), ContainerBase::getMap(), ContainerBase::getPosition(), ContainerBaseType::hasFunction(), and ContainerBaseType::ManualSelfDestruct.

Referenced by GuiFunctions::SelfDestructIcon::available(), DestructUnitCommand(), trunreplay::execnextreplaymove(), go(), and selfDestruct().

void DestructUnitCommand::readData ( tnstream stream  )  [protected, virtual]

Reimplemented from ContainerCommand.

Definition at line 102 of file destructunitcommand.cpp.

References DestructUnitCommandVersion, ContainerCommand::readData(), and tnstream::readInt().

void DestructUnitCommand::writeData ( tnstream stream  )  const [protected, virtual]

Reimplemented from ContainerCommand.

Definition at line 110 of file destructunitcommand.cpp.

References DestructUnitCommandVersion, ContainerCommand::writeData(), and tnstream::writeInt().

GameActionID DestructUnitCommand::getID (  )  const [protected, virtual]

Implements GameAction.

Definition at line 124 of file destructunitcommand.cpp.

References ActionRegistry::DestructUnitCommand.

ASCString DestructUnitCommand::getDescription (  )  const [protected, virtual]

Implements GameAction.

Definition at line 129 of file destructunitcommand.cpp.

References ContainerCommand::getContainer(), ContainerCommand::getContainerID(), ContainerBase::getName(), and ASCString::toString().

ActionResult DestructUnitCommand::go ( const Context context  )  [virtual]

Implements Command.

Definition at line 64 of file destructunitcommand.cpp.

References avail(), ContainerBase::baseType, SoundList::buildingCollapses, ActionRegistry::DestructContainer, Context::display, evaluateviewcalculation(), ContainerCommand::getContainer(), SoundList::getInstance(), GameAction::getMap(), ContainerBase::getPosition(), Command::getState(), VehicleType::killSoundLabel, SoundList::playSound(), MapDisplayInterface::repaintDisplay(), Command::SetUp, ActionResult::successful(), Vehicle::typ, SoundList::unitExplodes, and ContainerBaseType::view.

ASCString DestructUnitCommand::getCommandString (  )  const [virtual]

Implements Command.

Definition at line 117 of file destructunitcommand.cpp.

References ASCString::format(), and ContainerCommand::getContainerID().


Friends And Related Function Documentation

template<class Child>
GameAction* GameActionCreator ( GameMap map  )  [friend]

Definition at line 114 of file action.h.


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:46:39 2012 for Advanced Strategic Command by  doxygen 1.5.1