TransferControlCommand Class Reference

#include <transfercontrolcommand.h>

Inheritance diagram for TransferControlCommand:

Inheritance graph
[legend]
List of all members.

Public Types

typedef vector< const Player * > Receivers

Public Member Functions

 TransferControlCommand (ContainerBase *item)
Receivers getReceivers ()
void setReceiver (const Player *receiver)
ActionResult go (const Context &context)
ASCString getCommandString () const

Static Public Member Functions

static bool avail (const ContainerBase *item)

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


Member Typedef Documentation

typedef vector<const Player*> TransferControlCommand::Receivers

Definition at line 36 of file transfercontrolcommand.h.


Constructor & Destructor Documentation

TransferControlCommand::TransferControlCommand ( ContainerBase item  ) 

Definition at line 79 of file transfercontrolcommand.cpp.


Member Function Documentation

bool TransferControlCommand::avail ( const ContainerBase item  )  [static]

Definition at line 37 of file transfercontrolcommand.cpp.

References cgp_disableUnitTransfer, ContainerBase::getCarrier(), GameMap::getgameparameter(), ContainerBase::getMap(), ContainerBase::getOwner(), and getReceivers().

Referenced by CargoGuiFunctions::TransferUnitControl::available(), giveunitaway(), go(), and transferControl().

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

Reimplemented from ContainerCommand.

Definition at line 127 of file transfercontrolcommand.cpp.

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

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

Reimplemented from ContainerCommand.

Definition at line 136 of file transfercontrolcommand.cpp.

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

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

Implements GameAction.

Definition at line 160 of file transfercontrolcommand.cpp.

References ActionRegistry::TransferControlCommand.

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

Implements GameAction.

Definition at line 165 of file transfercontrolcommand.cpp.

References ContainerCommand::getContainer(), GameAction::getMap(), Player::getName(), ContainerBase::getName(), and GameMap::getPlayer().

TransferControlCommand::Receivers TransferControlCommand::getReceivers (  ) 

Definition at line 73 of file transfercontrolcommand.cpp.

References ContainerCommand::getContainer(), and GameAction::getMap().

Referenced by avail(), and go().

void TransferControlCommand::setReceiver ( const Player receiver  ) 

Definition at line 143 of file transfercontrolcommand.cpp.

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

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

Implements Command.

Definition at line 89 of file transfercontrolcommand.cpp.

References avail(), computeview(), ActionRegistry::ConvertContainer, Context::display, Command::Failed, Command::Finished, ContainerCommand::getContainer(), GameAction::getMap(), getReceivers(), Command::getState(), MapDisplayInterface::repaintDisplay(), Command::setState(), Command::SetUp, and ActionResult::successful().

ASCString TransferControlCommand::getCommandString (  )  const [virtual]

Implements Command.

Definition at line 152 of file transfercontrolcommand.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:54 2012 for Advanced Strategic Command by  doxygen 1.5.1