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

#include <containeraction.h>

Inheritance diagram for ContainerAction:
Inheritance graph
[legend]

Protected Member Functions

void setID (int id)
 should usually not be called, the ID should only be set through the constructor More...
 
ContainerBasegetContainer (bool dontThrow=false)
 
const ContainerBasegetContainer (bool dontThrow=false) const
 
void readData (tnstream &stream)
 
void writeData (tnstream &stream) const
 
 ContainerAction (ContainerBase *container)
 
 ContainerAction (GameMap *map)
 
- 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 30 of file containeraction.h.

Constructor & Destructor Documentation

ContainerAction::ContainerAction ( ContainerBase container)
protected

Definition at line 27 of file containeraction.cpp.

References ContainerBase::getIdentification().

ContainerAction::ContainerAction ( GameMap map)
protected

Definition at line 33 of file containeraction.cpp.

Member Function Documentation

ContainerBase * ContainerAction::getContainer ( bool  dontThrow = false)
protected
const ContainerBase * ContainerAction::getContainer ( bool  dontThrow = false) const
protected
void ContainerAction::readData ( tnstream stream)
protectedvirtual
void ContainerAction::setID ( int  id)
protected

should usually not be called, the ID should only be set through the constructor

Definition at line 75 of file containeraction.cpp.

Referenced by ConsumeAmmo::readData().

void ContainerAction::writeData ( tnstream stream) const
protectedvirtual

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