VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtCruiseMissileLaunchController Class Reference

DtCruiseMissileLaunchController models launch of a cruise missile. More...

Inheritance diagram for DtCruiseMissileLaunchController:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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 DtVrfObjectcreateMissileObject ()
 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

DtCruiseMissileLaunchControllerDescriptormyDescriptor
 Pointer to my descriptor.
DtCruiseMissileLaunchControllerPSRmyProcessState
 Container for state data associated with this component.

Private Member Functions

 DtCruiseMissileLaunchController ()
 Not implemented.
 DtCruiseMissileLaunchController (const DtCruiseMissileLaunchController &orig)
 Not implemented.
DtCruiseMissileLaunchControlleroperator= (const DtCruiseMissileLaunchController &orig)
 Not implemented.

Detailed Description

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


Constructor & Destructor Documentation

Not implemented.

Not implemented.

DtCruiseMissileLaunchController::DtCruiseMissileLaunchController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor compDesc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Destructor.


Member Function Documentation

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.

Returns:
DtCruiseMissileLaunchControllerType

Implements DtTaskControllerComponent.

Initialize the component.

Calls createPSR() and registerRadioMessageCallbacks()

Reimplemented from DtControllerComponent.

Overridden to get the specialized DtCruiseMissileLaunchControllerDescriptor.

Reimplemented from DtSimComponent.

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*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

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.

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.


Member Data Documentation

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).


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)