SetResourceProcessingRateCommand Class Reference

#include <setresourceprocessingratecommand.h>

Inheritance diagram for SetResourceProcessingRateCommand:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SetResourceProcessingRateCommand (ContainerBase *item, int rate)
Resources getNewPlus ()
ActionResult go (const Context &context)
ASCString getCommandString () const

Static Public Member Functions

static bool avail (const ContainerBase *factory)

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


Constructor & Destructor Documentation

SetResourceProcessingRateCommand::SetResourceProcessingRateCommand ( ContainerBase item,
int  rate 
)

Definition at line 49 of file setresourceprocessingratecommand.cpp.

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


Member Function Documentation

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

Definition at line 37 of file setresourceprocessingratecommand.cpp.

References ContainerBase::baseType, ContainerBaseType::hasFunction(), ContainerBaseType::MatterConverter, and ContainerBaseType::MiningStation.

Referenced by go(), and setResourceProcessingRate().

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

Reimplemented from ContainerCommand.

Definition at line 96 of file setresourceprocessingratecommand.cpp.

References Resources::read(), ContainerCommand::readData(), tnstream::readInt(), and SetResourceProcessingRateCommandVersion.

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

Reimplemented from ContainerCommand.

Definition at line 106 of file setresourceprocessingratecommand.cpp.

References SetResourceProcessingRateCommandVersion, Resources::write(), ContainerCommand::writeData(), and tnstream::writeInt().

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

Implements GameAction.

Definition at line 123 of file setresourceprocessingratecommand.cpp.

References ActionRegistry::SetResourceProcessingRateCommand.

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

Implements GameAction.

Definition at line 128 of file setresourceprocessingratecommand.cpp.

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

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

Reimplemented from Command.

Definition at line 87 of file setresourceprocessingratecommand.cpp.

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

Resources SetResourceProcessingRateCommand::getNewPlus (  ) 

Definition at line 56 of file setresourceprocessingratecommand.cpp.

References Resources::count, ContainerCommand::getContainer(), ContainerBase::maxplus, and Resources::resource().

Referenced by go().

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

Implements Command.

Definition at line 67 of file setresourceprocessingratecommand.cpp.

References avail(), Command::Finished, ContainerCommand::getContainer(), getNewPlus(), Command::getState(), ContainerBase::plus, Command::setState(), and Command::SetUp.

ASCString SetResourceProcessingRateCommand::getCommandString (  )  const [virtual]

Implements Command.

Definition at line 115 of file setresourceprocessingratecommand.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:28 2012 for Advanced Strategic Command by  doxygen 1.5.1