Advanced Strategic Command
Public Member Functions | Protected Member Functions | Friends | List of all members
ChangeDiplomaticState Class Reference

cancels the research on the current technology, losing all research points More...

#include <changediplomaticstate.h>

Inheritance diagram for ChangeDiplomaticState:
Inheritance graph
[legend]

Public Member Functions

 ChangeDiplomaticState (Player &fromplayer, Player &towardsPlayer, int queue, DiplomaticStates newState)
 
ASCString getCommandString () const
 
- Public Member Functions inherited from GameAction
ActionResult execute (const Context &context)
 
ActionResult undo (const Context &context)
 
void read (tnstream &stream)
 
void write (tnstream &stream) const
 
void write (tnstream &stream, bool persistChildren) const
 
virtual ~GameAction ()
 

Protected Member Functions

GameActionID getID () const
 
ASCString getDescription () const
 
ActionResult runAction (const Context &context)
 
void readData (tnstream &stream)
 
void writeData (tnstream &stream) const
 
ActionResult undoAction (const Context &context)
 
- Protected Member Functions inherited from GameAction
void deleteChildren ()
 
 GameAction (GameMap *map)
 
void addChild (GameAction *action)
 adds a child action. Ownership of the child action is passed to THIS More...
 
virtual ActionResult preCheck ()
 preCheck is called before an action is redone and should check the preconditions for the action. More...
 
virtual ActionResult postCheck ()
 postCheck is called after an action has been redone and should check that the state of the map is exactly the same as it was after the action has been executed the first time. More...
 
virtual bool undoOrderChildFirst () const
 determines the order in which the child actions are undone. More...
 
GameMapgetMap ()
 
const GameMapgetMap () const
 

Friends

template<class Child >
GameActionGameActionCreator (GameMap *map)
 

Additional Inherited Members

- Static Public Member Functions inherited from GameAction
static GameActionreadFromStream (tnstream &stream, GameMap *map)
 

Detailed Description

cancels the research on the current technology, losing all research points

Definition at line 30 of file changediplomaticstate.h.

Constructor & Destructor Documentation

ChangeDiplomaticState::ChangeDiplomaticState ( Player fromplayer,
Player towardsPlayer,
int  queue,
DiplomaticStates  newState 
)
Parameters
queue: 0 = no queue, -1 = remove entry from queue , +1 = add entry tro queue

Definition at line 29 of file changediplomaticstate.cpp.

References Player::getPosition().

Member Function Documentation

ASCString ChangeDiplomaticState::getCommandString ( ) const

Definition at line 115 of file changediplomaticstate.cpp.

References ASCString::format().

ASCString ChangeDiplomaticState::getDescription ( ) const
protectedvirtual

Implements GameAction.

Definition at line 127 of file changediplomaticstate.cpp.

References diplomaticStateNames, and ASCString::toString().

GameActionID ChangeDiplomaticState::getID ( ) const
protectedvirtual

Implements GameAction.

Definition at line 122 of file changediplomaticstate.cpp.

References ActionRegistry::ChangeDiplomaticState.

void ChangeDiplomaticState::readData ( tnstream stream)
protectedvirtual

Implements GameAction.

Definition at line 39 of file changediplomaticstate.cpp.

References tnstream::readInt().

ActionResult ChangeDiplomaticState::runAction ( const Context context)
protectedvirtual
ActionResult ChangeDiplomaticState::undoAction ( const Context context)
protectedvirtual
void ChangeDiplomaticState::writeData ( tnstream stream) const
protectedvirtual

Implements GameAction.

Definition at line 50 of file changediplomaticstate.cpp.

References tnstream::writeInt().

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: