#include <servicecommand.h>
Inheritance diagram for ServiceCommand:

Public Member Functions | |
| ServiceCommand (ContainerBase *unit) | |
| TransferHandler & | getTransferHandler () |
| each call to getTransferHandler will deallocate the previous handler and create a new one Make sure to not have any pointers to the old one around when calling this another time | |
| const ServiceTargetSearcher::Targets & | getDestinations () |
| void | setDestination (ContainerBase *destination) |
| void | saveTransfers () |
| ActionResult | go (const Context &context) |
| ASCString | getCommandString () const |
| ContainerBase * | getRefueller () |
| ActionResult | checkExecutionPrecondition () const |
| ~ServiceCommand () | |
Static Public Member Functions | |
| static bool | availExternally (ContainerBase *source) |
| static bool | avail (ContainerBase *source, ContainerBase *target) |
Protected Member Functions | |
| void | readData (tnstream &stream) |
| void | writeData (tnstream &stream) const |
| GameActionID | getID () const |
| ASCString | getDescription () const |
Friends | |
| template<class Child> | |
| GameAction * | GameActionCreator (GameMap *map) |
Definition at line 32 of file servicecommand.h.
| ServiceCommand::ServiceCommand | ( | ContainerBase * | unit | ) |
Definition at line 63 of file servicecommand.cpp.
| ServiceCommand::~ServiceCommand | ( | ) |
Definition at line 254 of file servicecommand.cpp.
| bool ServiceCommand::availExternally | ( | ContainerBase * | source | ) | [static] |
Definition at line 39 of file servicecommand.cpp.
References ServiceTargetSearcher::checkAmmo, ServiceTargetSearcher::checkResources, and ServiceTargetSearcher::externallyAvailable().
Referenced by GuiFunctions::RefuelUnitCommand::available().
| bool ServiceCommand::avail | ( | ContainerBase * | source, | |
| ContainerBase * | target | |||
| ) | [static] |
Definition at line 45 of file servicecommand.cpp.
References ServiceTargetSearcher::checkAmmo, ServiceTargetSearcher::checkResources, ServiceTargetSearcher::externallyAvailable(), ContainerBase::getCarrier(), and ServiceTargetSearcher::getTargets().
Referenced by autoTrainer().
| void ServiceCommand::readData | ( | tnstream & | stream | ) | [protected, virtual] |
Reimplemented from ContainerCommand.
Definition at line 162 of file servicecommand.cpp.
References ContainerCommand::readData(), and tnstream::readInt().
| void ServiceCommand::writeData | ( | tnstream & | stream | ) | const [protected, virtual] |
Reimplemented from ContainerCommand.
Definition at line 190 of file servicecommand.cpp.
References ContainerCommand::writeData(), and tnstream::writeInt().
| GameActionID ServiceCommand::getID | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 230 of file servicecommand.cpp.
References ActionRegistry::ServiceCommand.
| ASCString ServiceCommand::getDescription | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 235 of file servicecommand.cpp.
References ContainerCommand::getContainer(), and ContainerBase::getName().
| TransferHandler & ServiceCommand::getTransferHandler | ( | ) |
each call to getTransferHandler will deallocate the previous handler and create a new one Make sure to not have any pointers to the old one around when calling this another time
Definition at line 93 of file servicecommand.cpp.
References ContainerCommand::getContainer(), and TransferHandler::getTransfers().
Referenced by AmmoTransferWindow::AmmoTransferWindow(), GuiFunctions::RefuelUnitCommand::execute(), and go().
| const ServiceTargetSearcher::Targets & ServiceCommand::getDestinations | ( | ) |
Definition at line 69 of file servicecommand.cpp.
References ServiceTargetSearcher::checkAmmo, ServiceTargetSearcher::checkResources, ContainerCommand::getContainer(), ServiceTargetSearcher::getTargets(), and ServiceTargetSearcher::startSearch().
Referenced by GuiFunctions::RefuelUnitDialogCommand::available(), and GuiFunctions::RefuelUnitCommand::available().
| void ServiceCommand::setDestination | ( | ContainerBase * | destination | ) |
Definition at line 77 of file servicecommand.cpp.
References ContainerBase::getIdentification().
Referenced by GuiFunctions::RefuelUnitDialogCommand::execute(), and GuiFunctions::RefuelUnitCommand::execute().
| void ServiceCommand::saveTransfers | ( | ) |
Definition at line 110 of file servicecommand.cpp.
References TransferHandler::getTransfers(), Command::setState(), and Command::SetUp.
Referenced by GuiFunctions::RefuelUnitCommand::execute().
| ActionResult ServiceCommand::go | ( | const Context & | context | ) | [virtual] |
Implements Command.
Definition at line 123 of file servicecommand.cpp.
References Command::Finished, Command::getState(), getTransferHandler(), TransferHandler::getTransfers(), Command::setState(), and Command::SetUp.
| ASCString ServiceCommand::getCommandString | ( | ) | const [virtual] |
Implements Command.
Definition at line 213 of file servicecommand.cpp.
References ASCString::format(), and ContainerCommand::getContainerID().
| ContainerBase* ServiceCommand::getRefueller | ( | ) | [inline] |
Definition at line 78 of file servicecommand.h.
References ContainerCommand::getContainer().
Referenced by GuiFunctions::RefuelUnitDialogCommand::execute().
| ActionResult ServiceCommand::checkExecutionPrecondition | ( | ) | const [virtual] |
Reimplemented from ContainerCommand.
Definition at line 245 of file servicecommand.cpp.
References ContainerCommand::getContainer(), and GameAction::getMap().
| GameAction* GameActionCreator | ( | GameMap * | map | ) | [friend] |
1.5.1