#include <removeproductionlinecommand.h>
Inheritance diagram for RemoveProductionLineCommand:

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> | |
| GameAction * | GameActionCreator (GameMap *map) |
Definition at line 32 of file removeproductionlinecommand.h.
| RemoveProductionLineCommand::RemoveProductionLineCommand | ( | ContainerBase * | item | ) |
Definition at line 54 of file removeproductionlinecommand.cpp.
| 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().
| GameAction* GameActionCreator | ( | GameMap * | map | ) | [friend] |
1.5.1