RemoveProductionLineCommand Class Reference

#include <removeproductionlinecommand.h>

Inheritance diagram for RemoveProductionLineCommand:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 RemoveProductionLineCommand (ContainerBase *item)
vector< const VehicleType * > productionLinesBuyable ()
void setRemoval (const VehicleType *vehicleType)
ActionResult go (const Context &context)
ASCString getCommandString () const

Static Public Member Functions

static bool avail (const ContainerBase *factory)
static Resources resourcesNeeded (const ContainerBaseType *factory, const VehicleType *veh)

Protected Member Functions

void readData (tnstream &stream)
void writeData (tnstream &stream) const
GameActionID getID () const
ASCString getDescription () const
ActionResult undoAction (const Context &context)

Friends

template<class Child>
GameActionGameActionCreator (GameMap *map)

Detailed Description

Definition at line 32 of file removeproductionlinecommand.h.


Constructor & Destructor Documentation

RemoveProductionLineCommand::RemoveProductionLineCommand ( ContainerBase item  ) 

Definition at line 54 of file removeproductionlinecommand.cpp.


Member Function Documentation

bool RemoveProductionLineCommand::avail ( const ContainerBase factory  )  [static]

Definition at line 37 of file removeproductionlinecommand.cpp.

References ContainerBase::baseType, ContainerBaseType::hasFunction(), ContainerBaseType::InternalVehicleProduction, and ContainerBaseType::NoProductionCustomization.

Referenced by go(), and removeProductionLine().

Resources RemoveProductionLineCommand::resourcesNeeded ( const ContainerBaseType factory,
const VehicleType veh 
) [static]

Definition at line 47 of file removeproductionlinecommand.cpp.

References ContainerBaseType::productionCost, ContainerBaseType::productionEfficiency, and productionLineRemovalCostFactor.

Referenced by go().

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

Reimplemented from ContainerCommand.

Definition at line 123 of file removeproductionlinecommand.cpp.

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

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

Reimplemented from ContainerCommand.

Definition at line 132 of file removeproductionlinecommand.cpp.

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

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

Implements GameAction.

Definition at line 148 of file removeproductionlinecommand.cpp.

References ActionRegistry::RemoveProductionLineCommand.

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

Implements GameAction.

Definition at line 153 of file removeproductionlinecommand.cpp.

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

ActionResult RemoveProductionLineCommand::undoAction ( const Context context  )  [protected, virtual]

Reimplemented from Command.

Definition at line 109 of file removeproductionlinecommand.cpp.

References ContainerBase::addProductionLine(), ContainerCommand::getContainer(), Command::undoAction(), and vehicleTypeRepository.

vector<const VehicleType*> RemoveProductionLineCommand::productionLinesBuyable (  ) 

void RemoveProductionLineCommand::setRemoval ( const VehicleType vehicleType  ) 

Definition at line 62 of file removeproductionlinecommand.cpp.

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

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

Implements Command.

Definition at line 71 of file removeproductionlinecommand.cpp.

References avail(), ActionRegistry::ConsumeResource, ContainerBase::deleteProductionLine(), Command::Failed, Command::Finished, ContainerCommand::getContainer(), ContainerBase::getProduction(), ContainerBase::getResource(), Command::getState(), resourcesNeeded(), Command::setState(), Command::SetUp, and ActionResult::successful().

ASCString RemoveProductionLineCommand::getCommandString (  )  const [virtual]

Implements Command.

Definition at line 140 of file removeproductionlinecommand.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:47:21 2012 for Advanced Strategic Command by  doxygen 1.5.1