Advanced Strategic Command
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
DiscoverResources Class Reference

#include <discoverresources.h>

Inheritance diagram for DiscoverResources:
Inheritance graph


class  ResourceViewState

Public Types

typedef vector< ResourceViewStateViewState

Public Member Functions

 DiscoverResources (Vehicle *unit)
ASCString getDescription () 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

virtual GameActionID getID () const
virtual ActionResult runAction (const Context &context)
virtual ActionResult undoAction (const Context &context)
virtual void readData (tnstream &stream)
virtual void writeData (tnstream &stream) const
- Protected Member Functions inherited from UnitAction
VehiclegetUnit (bool dontThrow=false)
const VehiclegetUnit (bool dontThrow=false) const
void readData (tnstream &stream)
void writeData (tnstream &stream) const
 UnitAction (GameMap *gamemap, int vehicleID)
 UnitAction (Vehicle *unit)
 UnitAction (GameMap *gamemap)
- 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


template<class Child >
GameActionGameActionCreator (GameMap *map)

Additional Inherited Members

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

Detailed Description

Definition at line 31 of file discoverresources.h.

Member Typedef Documentation

Definition at line 47 of file discoverresources.h.

Constructor & Destructor Documentation

DiscoverResources::DiscoverResources ( Vehicle unit)

Member Function Documentation

ASCString DiscoverResources::getDescription ( ) const

Implements GameAction.

Definition at line 40 of file discoverresources.cpp.

GameActionID DiscoverResources::getID ( ) const

Implements GameAction.

Definition at line 110 of file discoverresources.cpp.

References ActionRegistry::DiscoverResources.

void DiscoverResources::readData ( tnstream stream)

Implements GameAction.

Definition at line 91 of file discoverresources.cpp.

References readClassContainer(), and tnstream::readInt().

ActionResult DiscoverResources::runAction ( const Context context)
ActionResult DiscoverResources::undoAction ( const Context context)

Implements GameAction.

Definition at line 160 of file discoverresources.cpp.

References GameMap::getField(), and GameAction::getMap().

void DiscoverResources::writeData ( tnstream stream) const

Implements GameAction.

Definition at line 102 of file discoverresources.cpp.

References writeClassContainer(), and tnstream::writeInt().

Friends And Related Function Documentation

template<class Child >
GameAction* GameActionCreator ( GameMap map)

Definition at line 114 of file action.h.

The documentation for this class was generated from the following files: