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]
List of all members.

Public Member Functions

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

ASCString getCommandString () const

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)

Friends

template<class Child>
GameActionGameActionCreator (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

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

Implements GameAction.

Definition at line 122 of file changediplomaticstate.cpp.

References ActionRegistry::ChangeDiplomaticState.

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

Implements GameAction.

Definition at line 127 of file changediplomaticstate.cpp.

References diplomaticStateNames, and ASCString::toString().

ActionResult ChangeDiplomaticState::runAction ( const Context context  )  [protected, virtual]

Implements GameAction.

Definition at line 60 of file changediplomaticstate.cpp.

References Player::diplomacy, GameAction::getMap(), GameMap::getPlayer(), DiplomaticStateVector::getState(), DiplomaticStateVector::queuedStateChanges, and DiplomaticStateVector::setState().

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

Implements GameAction.

Definition at line 39 of file changediplomaticstate.cpp.

References tnstream::readInt().

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

Implements GameAction.

Definition at line 50 of file changediplomaticstate.cpp.

References tnstream::writeInt().

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

Implements GameAction.

Definition at line 90 of file changediplomaticstate.cpp.

References Player::diplomacy, diplomaticStateNum, GameAction::getMap(), GameMap::getPlayer(), DiplomaticStateVector::queuedStateChanges, and DiplomaticStateVector::setState().

ASCString ChangeDiplomaticState::getCommandString (  )  const

Definition at line 115 of file changediplomaticstate.cpp.

References ASCString::format().


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:46:29 2012 for Advanced Strategic Command by  doxygen 1.5.1