RemoveObject Class Reference

#include <removeobject.h>

Inheritance diagram for RemoveObject:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 RemoveObject (GameMap *gamemap, const MapCoordinate &position, int objectID)
ASCString getDescription () const
 ~RemoveObject ()

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

Friends

template<class Child>
GameActionGameActionCreator (GameMap *map)

Detailed Description

Definition at line 30 of file removeobject.h.


Constructor & Destructor Documentation

RemoveObject::RemoveObject ( GameMap gamemap,
const MapCoordinate position,
int  objectID 
)

Definition at line 29 of file removeobject.cpp.

RemoveObject::~RemoveObject (  ) 

Definition at line 192 of file removeobject.cpp.


Member Function Documentation

ASCString RemoveObject::getDescription (  )  const [virtual]

Implements GameAction.

Definition at line 37 of file removeobject.cpp.

References MapCoordinate::toString(), and ASCString::toString().

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

Implements GameAction.

Definition at line 84 of file removeobject.cpp.

References ActionRegistry::RemoveObject.

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

Implements GameAction.

Definition at line 118 of file removeobject.cpp.

References MapField::checkForObject(), ObjectRemovalStrategy2::getCounter(), GameMap::getField(), GameAction::getMap(), GameMap::getobjecttype_byid(), MapField::removeObject(), Object::write(), and tnstream::writing.

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

Implements GameAction.

Definition at line 148 of file removeobject.cpp.

References MapField::addobject(), MapField::checkForObject(), GameMap::getField(), GameAction::getMap(), GameMap::getobjecttype_byid(), Object::read(), tnstream::reading, and tnstream::readInt().

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

Definition at line 187 of file removeobject.cpp.

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

Implements GameAction.

Definition at line 46 of file removeobject.cpp.

References MapCoordinate::read(), MemoryStreamStorage::readfromstream(), tnstream::readInt(), and removeObjectStreamVersion.

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

Implements GameAction.

Definition at line 68 of file removeobject.cpp.

References removeObjectStreamVersion, MapCoordinate::write(), tnstream::writeInt(), and MemoryStreamStorage::writetostream().


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