ReactionFireSwitchCommand Class Reference

#include <reactionfireswitchcommand.h>

Inheritance diagram for ReactionFireSwitchCommand:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ReactionFireSwitchCommand (Vehicle *carrier)
ActionResult go (const Context &context)
ASCString getCommandString () const
void setNewState (bool enabled)

Static Public Member Functions

static bool avail (const Vehicle *unit, bool newState)

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 reactionfireswitchcommand.h.


Constructor & Destructor Documentation

ReactionFireSwitchCommand::ReactionFireSwitchCommand ( Vehicle carrier  ) 

Definition at line 58 of file reactionfireswitchcommand.cpp.


Member Function Documentation

bool ReactionFireSwitchCommand::avail ( const Vehicle unit,
bool  newState 
) [static]

Definition at line 35 of file reactionfireswitchcommand.cpp.

References ContainerBase::baseType, UnitWeapon::count, GameMap::getField(), ContainerBase::getMap(), Vehicle::getPosition(), Vehicle::ReactionFire::getStatus(), ContainerBaseType::hasFunction(), ContainerBaseType::NoReactionfire, Vehicle::ReactionFire::off, SingleWeapon::offensive(), Vehicle::reactionfire, SingleWeapon::reactionFireShots, Vehicle::typ, Vehicle::weapexist(), UnitWeapon::weapon, and VehicleType::weapons.

Referenced by GuiFunctions::DisableReactionfire::available(), GuiFunctions::EnableReactionfire::available(), go(), and unitReactionFireEnable().

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

Reimplemented from UnitCommand.

Definition at line 124 of file reactionfireswitchcommand.cpp.

References ReactionFireSwitchCommandVersion, UnitCommand::readData(), and tnstream::readInt().

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

Reimplemented from UnitCommand.

Definition at line 133 of file reactionfireswitchcommand.cpp.

References ReactionFireSwitchCommandVersion, UnitCommand::writeData(), and tnstream::writeInt().

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

Implements GameAction.

Definition at line 149 of file reactionfireswitchcommand.cpp.

References ActionRegistry::ReactionFireSwitchCommand.

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

Implements GameAction.

Definition at line 154 of file reactionfireswitchcommand.cpp.

References GameAction::getMap(), Vehicle::getName(), GameMap::getUnit(), UnitCommand::getUnit(), and UnitCommand::getUnitID().

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

Implements Command.

Definition at line 72 of file reactionfireswitchcommand.cpp.

References avail(), ActionRegistry::ChangeUnitMovement, ActionRegistry::ChangeUnitProperty, Context::display, Command::getState(), Vehicle::ReactionFire::getStatus(), UnitCommand::getUnit(), ContainerBaseType::hasFunction(), Vehicle::ReactionFire::init1a, Vehicle::ReactionFire::init2, ContainerBaseType::MoveWithReactionFire, Vehicle::ReactionFire::off, Vehicle::reactionfire, ChangeUnitProperty::ReactionFire, MapDisplayInterface::repaintDisplay(), Command::SetUp, ActionResult::successful(), and Vehicle::typ.

ASCString ReactionFireSwitchCommand::getCommandString (  )  const [virtual]

Implements Command.

Definition at line 141 of file reactionfireswitchcommand.cpp.

References ASCString::format(), and UnitCommand::getUnitID().

void ReactionFireSwitchCommand::setNewState ( bool  enabled  ) 

Definition at line 63 of file reactionfireswitchcommand.cpp.

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


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:47:19 2012 for Advanced Strategic Command by  doxygen 1.5.1