SpawnObject Class Reference

#include <spawnobject.h>

Inheritance diagram for SpawnObject:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SpawnObject (GameMap *gamemap, const MapCoordinate &position, int objectID, int direction=-1)
ASCString getDescription () const

Protected Member Functions

virtual GameActionID getID () const
virtual ActionResult runAction (const Context &context)
virtual ActionResult undoAction (const Context &context)
virtual ActionResult verify ()
virtual void readData (tnstream &stream)
virtual void writeData (tnstream &stream) const
virtual bool undoOrderChildFirst () const
 determines the order in which the child actions are undone.

Friends

template<class Child>
GameActionGameActionCreator (GameMap *map)

Detailed Description

Definition at line 30 of file spawnobject.h.


Constructor & Destructor Documentation

SpawnObject::SpawnObject ( GameMap gamemap,
const MapCoordinate position,
int  objectID,
int  direction = -1 
)

Definition at line 28 of file spawnobject.cpp.


Member Function Documentation

ASCString SpawnObject::getDescription (  )  const [virtual]

Implements GameAction.

Definition at line 41 of file spawnobject.cpp.

References GameAction::getMap(), ObjectType::getName(), GameMap::getobjecttype_byid(), and MapCoordinate::toString().

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

Implements GameAction.

Definition at line 93 of file spawnobject.cpp.

References ActionRegistry::SpawnObject.

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

Implements GameAction.

Definition at line 128 of file spawnobject.cpp.

References MapField::addobject(), MapField::checkForObject(), Object::dir, GameMap::getField(), ActionObjectRemovalStrategy::getImmediateRemoval(), GameAction::getMap(), GameMap::getobjecttype_byid(), and ASCString::toString().

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

Implements GameAction.

Definition at line 155 of file spawnobject.cpp.

References MapField::checkForObject(), Object::dir, GameMap::getField(), GameAction::getMap(), GameMap::getobjecttype_byid(), MapField::removeObject(), and ASCString::toString().

ActionResult SpawnObject::verify (  )  [protected, virtual]

Definition at line 177 of file spawnobject.cpp.

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

Implements GameAction.

Definition at line 55 of file spawnobject.cpp.

References MapCoordinate::read(), tnstream::readInt(), and spawnObjectStreamVersion.

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

Implements GameAction.

Definition at line 80 of file spawnobject.cpp.

References spawnObjectStreamVersion, MapCoordinate::write(), and tnstream::writeInt().

virtual bool SpawnObject::undoOrderChildFirst (  )  const [inline, protected, virtual]

determines the order in which the child actions are undone.

If true, then the children are undone first and then this action will be undone. If false, then this action will be undone first and the children after that

Reimplemented from GameAction.

Definition at line 58 of file spawnobject.h.


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