Advanced Strategic Command
Protected Member Functions | List of all members
UnitAction Class Reference

#include <unitaction.h>

Inheritance diagram for UnitAction:
Inheritance graph
[legend]

Protected Member Functions

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 runAction (const Context &context)=0
 
virtual ActionResult undoAction (const Context &context)=0
 
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...
 
virtual GameActionID getID () const =0
 
GameMapgetMap ()
 
const GameMapgetMap () const
 

Additional Inherited Members

- 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 ASCString getDescription () const =0
 
virtual ~GameAction ()
 
- Static Public Member Functions inherited from GameAction
static GameActionreadFromStream (tnstream &stream, GameMap *map)
 

Detailed Description

Definition at line 29 of file unitaction.h.

Constructor & Destructor Documentation

UnitAction::UnitAction ( GameMap gamemap,
int  vehicleID 
)
protected

Definition at line 40 of file unitaction.cpp.

UnitAction::UnitAction ( Vehicle unit)
protected

Definition at line 27 of file unitaction.cpp.

References Vehicle::networkid.

UnitAction::UnitAction ( GameMap gamemap)
protected

Definition at line 34 of file unitaction.cpp.

Member Function Documentation

Vehicle * UnitAction::getUnit ( bool  dontThrow = false)
protected
const Vehicle * UnitAction::getUnit ( bool  dontThrow = false) const
protected

Definition at line 56 of file unitaction.cpp.

References GameAction::getMap(), GameMap::getUnit(), and ASCString::toString().

void UnitAction::readData ( tnstream stream)
protectedvirtual
void UnitAction::writeData ( tnstream stream) const
protectedvirtual

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