![]() |
VR-Forces 4.0.4 Class Documentation
|
DtCruiseMissileLaunchController models launch of a cruise missile. More...

Public Member Functions | |
| DtCruiseMissileLaunchController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *compDesc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtCruiseMissileLaunchController () |
| Destructor. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual bool | init () |
| Initialize the component. | |
| virtual void | setComponentDescriptor (DtComponentDescriptor *compDesc) |
| Overridden to get the specialized DtCruiseMissileLaunchControllerDescriptor. | |
| virtual bool | createPSR () |
| Creates myProcessState data member, and adds it to our process state repository manager. | |
| virtual void | tick () |
| Tick Function. | |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual void | registerRadioMessageCallbacks () |
| Registers for FireCruiseMissile task messages. | |
| virtual bool | missileResourceAvailable () const |
| Returns true if there is at least one missile resource remaining of the type specified in the parameter entry. | |
| virtual void | consumeMissileResource () |
| Decrements the missile resource by one. | |
| virtual DtVrfObject * | createMissileObject () |
| Creates a new vrf object for the missile using the type and offset parameters specified in the descriptor. | |
| virtual DtIfPlan | createMissilePlan (const DtString &missileName) |
| Creates a new plan for the missile using the task saved in this controller. | |
| virtual void | createAndSendFireInteraction (DtVrfObject *missile, const DtEventId &eventId) |
| Creates the fire interaction for launching of the specified missile. | |
| virtual void | addRangeItems () |
| Adds all items that have a range to the object state repository. | |
Protected Attributes | |
| DtCruiseMissileLaunchControllerDescriptor * | myDescriptor |
| Pointer to my descriptor. | |
| DtCruiseMissileLaunchControllerPSR * | myProcessState |
| Container for state data associated with this component. | |
Private Member Functions | |
| DtCruiseMissileLaunchController () | |
| Not implemented. | |
| DtCruiseMissileLaunchController (const DtCruiseMissileLaunchController &orig) | |
| Not implemented. | |
| DtCruiseMissileLaunchController & | operator= (const DtCruiseMissileLaunchController &orig) |
| Not implemented. | |
DtCruiseMissileLaunchController models launch of a cruise missile.
End User Description: A DtCruiseMissileLaunchController registers for cruise missile launch tasks, and upon receiving one it: Creates a new cruise missile of the type specified in its parameters Decrements the resource associated with the cruise missile. Generates a plan for the cruise missile, and passes it to the missile. Passes warhead detonation information to the missile's warhead actuator. Reports task complete.
Missiles are not tracked by the launcher once they are launched.
Uses Descriptor Type: DtCruiseMissileLaunchControllerDescriptor
DtCruiseMissileLaunchController model description
Not implemented.
| DtCruiseMissileLaunchController::DtCruiseMissileLaunchController | ( | const DtCruiseMissileLaunchController & | orig | ) | [private] |
Not implemented.
| DtCruiseMissileLaunchController::DtCruiseMissileLaunchController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | compDesc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual DtCruiseMissileLaunchController::~DtCruiseMissileLaunchController | ( | ) | [virtual] |
Destructor.
| DtCruiseMissileLaunchController& DtCruiseMissileLaunchController::operator= | ( | const DtCruiseMissileLaunchController & | orig | ) | [private] |
Not implemented.
| virtual DtString DtCruiseMissileLaunchController::type | ( | ) | const [virtual] |
Returns a string identifies the class type of component.
Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.
Implements DtTaskControllerComponent.
| virtual bool DtCruiseMissileLaunchController::init | ( | ) | [virtual] |
Initialize the component.
Calls createPSR() and registerRadioMessageCallbacks()
Reimplemented from DtControllerComponent.
| virtual void DtCruiseMissileLaunchController::setComponentDescriptor | ( | DtComponentDescriptor * | compDesc | ) | [virtual] |
Overridden to get the specialized DtCruiseMissileLaunchControllerDescriptor.
Reimplemented from DtSimComponent.
| virtual bool DtCruiseMissileLaunchController::createPSR | ( | ) | [virtual] |
Creates myProcessState data member, and adds it to our process state repository manager.
Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.
| virtual void DtCruiseMissileLaunchController::tick | ( | ) | [virtual] |
Tick Function.
When the component has a launch cruise missile task and at least the minimum-time-between-launches has passed, create and task the new missile.
Reimplemented from DtSimComponent.
| static DtSimComponent* DtCruiseMissileLaunchController::creator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [static] |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual void DtCruiseMissileLaunchController::registerRadioMessageCallbacks | ( | ) | [protected, virtual] |
Registers for FireCruiseMissile task messages.
| virtual bool DtCruiseMissileLaunchController::missileResourceAvailable | ( | ) | const [protected, virtual] |
Returns true if there is at least one missile resource remaining of the type specified in the parameter entry.
| virtual void DtCruiseMissileLaunchController::consumeMissileResource | ( | ) | [protected, virtual] |
Decrements the missile resource by one.
| virtual DtVrfObject* DtCruiseMissileLaunchController::createMissileObject | ( | ) | [protected, virtual] |
Creates a new vrf object for the missile using the type and offset parameters specified in the descriptor.
Returns a pointer to the newly created object.
| virtual DtIfPlan DtCruiseMissileLaunchController::createMissilePlan | ( | const DtString & | missileName | ) | [protected, virtual] |
Creates a new plan for the missile using the task saved in this controller.
| virtual void DtCruiseMissileLaunchController::createAndSendFireInteraction | ( | DtVrfObject * | missile, |
| const DtEventId & | eventId | ||
| ) | [protected, virtual] |
Creates the fire interaction for launching of the specified missile.
Target information is taken from currentTaskMessage().
| virtual void DtCruiseMissileLaunchController::addRangeItems | ( | ) | [protected, virtual] |
Adds all items that have a range to the object state repository.
DtCruiseMissileLaunchControllerDescriptor* DtCruiseMissileLaunchController::myDescriptor [protected] |
Pointer to my descriptor.
Container for state data associated with this component.
This state is saved and restored as part of a scenario (or checkpoint).