SpawnUnit Class Reference

#include <spawnunit.h>

Inheritance diagram for SpawnUnit:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SpawnUnit (GameMap *gamemap, const MapCoordinate3D &position, int vehicleTypeID, int owner)
 SpawnUnit (GameMap *gamemap, const ContainerBase *carrier, int vehicleTypeID)
ASCString getDescription () const
VehiclegetUnit ()

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 spawnunit.h.


Constructor & Destructor Documentation

SpawnUnit::SpawnUnit ( GameMap gamemap,
const MapCoordinate3D position,
int  vehicleTypeID,
int  owner 
)

Definition at line 31 of file spawnunit.cpp.

SpawnUnit::SpawnUnit ( GameMap gamemap,
const ContainerBase carrier,
int  vehicleTypeID 
)

Definition at line 39 of file spawnunit.cpp.

References ContainerBase::getOwner().


Member Function Documentation

ASCString SpawnUnit::getDescription (  )  const [virtual]

Implements GameAction.

Definition at line 57 of file spawnunit.cpp.

References GameAction::getMap(), VehicleType::getName(), GameMap::getvehicletype_byid(), and MapCoordinate::toString().

Vehicle * SpawnUnit::getUnit (  ) 

Definition at line 154 of file spawnunit.cpp.

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

Referenced by ConstructUnitCommand::go(), and undoAction().

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

Implements GameAction.

Definition at line 106 of file spawnunit.cpp.

References ActionRegistry::SpawnUnit.

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

Implements GameAction.

Definition at line 111 of file spawnunit.cpp.

References ViewRegistration::AddView, evaluateviewcalculation(), GameAction::execute(), MapCoordinate3D::getBitmappedHeight(), GameMap::getContainer(), GameMap::getField(), GameAction::getMap(), GameMap::getvehicletype_byid(), Vehicle::height, GameMap::idManager, Vehicle::networkid, UnitFieldRegistration::RegisterInCarrier, UnitFieldRegistration::RegisterOnField, Vehicle::setMovement(), ActionResult::successful(), ASCString::toString(), ActionRegistry::UnitFieldRegistration, GameMap::IDManager::unitnetworkid, ContainerBaseType::view, ActionRegistry::ViewRegistration, MapCoordinate::x, Vehicle::xpos, MapCoordinate::y, and Vehicle::ypos.

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

Implements GameAction.

Definition at line 160 of file spawnunit.cpp.

References GameMap::getField(), GameAction::getMap(), getUnit(), GameMap::getvehicletype_byid(), ContainerBaseType::id, GameMap::idManager, ASCString::toString(), Vehicle::typ, and GameMap::IDManager::unitnetworkid.

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

Definition at line 186 of file spawnunit.cpp.

References GameAction::getMap().

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

Implements GameAction.

Definition at line 72 of file spawnunit.cpp.

References MapCoordinate3D::read(), and tnstream::readInt().

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

Implements GameAction.

Definition at line 92 of file spawnunit.cpp.

References MapCoordinate3D::write(), and tnstream::writeInt().


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