VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions
DtIndirectFireWeaponController Class Reference

DtIndirectFireWeaponController is a controller that models firing an indirect fire weapon (e.g. More...

Inheritance diagram for DtIndirectFireWeaponController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtIndirectFireWeaponController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtIndirectFireWeaponController ()
 destructor
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual bool createTargetPointPort ()
 Creates a new DtVectorPort named "target-point-port".
virtual DtVectorOutputPorttargetPointPort () const
 Accessor for the target point port.
virtual bool createMaxRangePort ()
 Creates a new DtAnalogPort named "max-range-port".
virtual DtAnalogOutputPortmaxRangePort () const
 Accessor for the max range port.
virtual DtVrfIndirectFirePSRindirectFireProcessState ()
virtual const
DtVrfIndirectFirePSR
indirectFireProcessState () const

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 bool createPorts ()
 Overridden to call createTargetPointPort and createMaxRangePort.
virtual void lookupAndCacheProcessSR ()
 This function looks up a process state repository in the process state repository manager by name, and caches a pointer to it in

myWeaponProcessState.


 DtIndirectFireWeaponController ()
 default constructor; not implemented
 DtIndirectFireWeaponController (const DtIndirectFireWeaponController &orig)
 copy constructor; not implemented
const
DtIndirectFireWeaponController
operator= (const DtIndirectFireWeaponController &orig)
 assignment operator; not implemented

Protected Attributes

Ports and Port Groups
DtVectorOutputPortmyTargetPointPort
 Output Port Name: target-point-port
Output Port Description: Local position to fire at.
DtAnalogOutputPortmyMaxRangePort
 Output Port Name: max-range-port
Output Port Description: Maximum range in meters.

Detailed Description

DtIndirectFireWeaponController is a controller that models firing an indirect fire weapon (e.g.

a cannon).

Developer Description: Extends the DtBaseWeaponController with the additional ports needed to specify target location and maximum range.

Uses Descriptor Type: DtBaseWeaponControllerDescriptor


Constructor & Destructor Documentation

DtIndirectFireWeaponController::DtIndirectFireWeaponController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 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

default constructor; not implemented

copy constructor; not implemented


Member Function Documentation

virtual DtString DtIndirectFireWeaponController::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:
DtIndirectFireWeaponControllerType

Reimplemented from DtBaseWeaponController.

Creates a new DtVectorPort named "target-point-port".

Accessor for the target point port.

Creates a new DtAnalogPort named "max-range-port".

Accessor for the max range port.

static DtSimComponent* DtIndirectFireWeaponController::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.

Reimplemented from DtBaseWeaponController.

virtual bool DtIndirectFireWeaponController::createPorts ( ) [protected, virtual]

Overridden to call createTargetPointPort and createMaxRangePort.

Reimplemented from DtBaseWeaponController.

virtual void DtIndirectFireWeaponController::lookupAndCacheProcessSR ( ) [protected, virtual]

This function looks up a process state repository in the process state repository manager by name, and caches a pointer to it in

myWeaponProcessState.

The name (if it exists) is given in the component descriptor (DtComponentDescriptor::processStateRepositoryName). If the name does not exist, it uses the appropriate default name defined in procSRTypes.h. Another component is responsible for creating and destroying the process state repository. Overridden from DtBaseWeaponController to print a warning if it can't be cast to the derived type of process state repository, DtVrfIndirectFirePSR.

Reimplemented from DtBaseWeaponController.

const DtIndirectFireWeaponController& DtIndirectFireWeaponController::operator= ( const DtIndirectFireWeaponController orig) [protected]

assignment operator; not implemented


Member Data Documentation

Output Port Name: target-point-port
Output Port Description: Local position to fire at.


Output Port Range:
Output Port Default Value:
Output Group Parent:

Output Port Name: max-range-port
Output Port Description: Maximum range in meters.


Output Port Range:
Output Port Default Value:
Output Group Parent:


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)