RenameContainerCommand Class Reference

#include <renamecontainercommand.h>

Inheritance diagram for RenameContainerCommand:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 RenameContainerCommand (ContainerBase *container)
void setName (const ASCString &publicName, const ASCString &privateName)
ActionResult go (const Context &context)
ASCString getCommandString () const

Static Public Member Functions

static bool avail (const ContainerBase *container)

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


Constructor & Destructor Documentation

RenameContainerCommand::RenameContainerCommand ( ContainerBase container  ) 

Definition at line 46 of file renamecontainercommand.cpp.


Member Function Documentation

bool RenameContainerCommand::avail ( const ContainerBase container  )  [static]

Definition at line 37 of file renamecontainercommand.cpp.

Referenced by go(), and UnitInfoPanel::unitNaming().

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

Reimplemented from ContainerCommand.

Definition at line 97 of file renamecontainercommand.cpp.

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

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

Reimplemented from ContainerCommand.

Definition at line 109 of file renamecontainercommand.cpp.

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

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

Implements GameAction.

Definition at line 128 of file renamecontainercommand.cpp.

References ActionRegistry::RenameContainerCommand.

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

Implements GameAction.

Definition at line 133 of file renamecontainercommand.cpp.

References ContainerBase::baseType, ContainerCommand::getContainer(), and ContainerBaseType::getName().

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

Reimplemented from Command.

Definition at line 82 of file renamecontainercommand.cpp.

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

void RenameContainerCommand::setName ( const ASCString publicName,
const ASCString privateName 
)

Definition at line 54 of file renamecontainercommand.cpp.

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

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

Implements Command.

Definition at line 62 of file renamecontainercommand.cpp.

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

ASCString RenameContainerCommand::getCommandString (  )  const [virtual]

Implements Command.

Definition at line 120 of file renamecontainercommand.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