VR-Forces 4.2 Class Documentation
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtVrfBalGunPSR Class Reference

Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic guns. More...

Inheritance diagram for DtVrfBalGunPSR:
Inheritance graph
[legend]

Public Member Functions

 DtVrfBalGunPSR (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 DtVrfBalGunPSR (const DtVrfBalGunPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
const DtVrfBalGunPSRoperator= (const DtVrfBalGunPSR &orig)
virtual ~DtVrfBalGunPSR ()
virtual
DtVrfProcessStateRepository
clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const
virtual DtString type () const
 Returns the string type of the repository, as defined in procSRTypes.h.
virtual const
DtDetonationDescriptorList
pendingDetonations () const
 Get list of pending detonations.
virtual void addPendingDetonation (DtDetonationDescriptor *desc)
 Add a new pending detonation.
virtual void removePendingDetonation (const DtEventId &eventId)
 Remove a particular pending detonation.
virtual void setFiringCycleCompleteTime (DtTime completeTime)
 Update the time that the firing cycle will be complete.
virtual DtTime timeFiringCycleComplete () const
 Access firing cycle complete time.
virtual void setDisplayName (const DtString &displayName)
virtual const DtString displayName () const
virtual void setCommandedToFire ()
 Change and test functions for fire state.
virtual void setHasFired ()
 Change and test functions for fire state.
virtual bool isCommandedToFire ()
 Change and test functions for fire state.
virtual bool hasFired ()
 Change and test functions for fire state.
- Public Member Functions inherited from DtVrfWeaponPSR
 DtVrfWeaponPSR (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 DtVrfWeaponPSR (const DtVrfWeaponPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
const DtVrfWeaponPSRoperator= (const DtVrfWeaponPSR &orig)
virtual ~DtVrfWeaponPSR ()
virtual void setCurrentTarget (const DtEntityIdentifier &target, bool targetOverride=false)
 These two are provided for backward compatibility.
virtual const DtEntityIdentifier & currentTarget () const
virtual void setUserTargetOverride (bool userTargetOverride)
 Sets the user target override for the next target detection period.
virtual bool userTargetOverride () const
virtual void setCurrentTargetName (const DtString &target, bool targetOverride=false)
 The name of the target this weapon is currently attacking.
virtual const DtStringcurrentTargetName () const
virtual const DtVrfMunitionLoadermunitionLoader () const
 The munitionLoader manages loading and unloading timers.
virtual DtVrfMunitionLoadermunitionLoader ()
virtual void setCurrentMunitionName (const DtString &currentMunitionName)
 Sets the name of the current munition.
virtual const DtStringcurrentMunitionName () const
 Returns the name of the current munition.
virtual bool targetAcquired () const
 Do I have the target in my sights, ready to be fired upon?
virtual void setTargetAcquired (bool targetAcquired)
- Public Member Functions inherited from DtVrfProcessStateRepository
 DtVrfProcessStateRepository (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 DtVrfProcessStateRepository (const DtVrfProcessStateRepository &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
const DtVrfProcessStateRepositoryoperator= (const DtVrfProcessStateRepository &orig)
virtual ~DtVrfProcessStateRepository ()
virtual bool init ()
 Used for virtual construction. This base method simply returns true.
virtual bool loadedFromMTL () const
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 default constructor
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 real constructor Setting the readonly flag prevents object from writing itself to the stream.
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 copy constructor
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 assignment operator
bool operator== (const DtReaderWriter &) const
 Equivalence operator.
bool operator!= (const DtReaderWriter &rhs)
virtual ~DtReaderWriter ()
 destructor
virtual void putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Top level call to write itself to file.
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath=DtFilename::nullFilename(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Top level to read itself from an input stream.
virtual void writeSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry.
virtual DtSymbolString name () const
 Accessor for name of this readable/writable object.
virtual void addAlias (const DtSymbolString &alias)
 Add an alias as an alternative name for this object.
virtual bool hasAlias (const DtSymbolString &alias)
virtual const aliasContaineraliases () const
virtual void setReadonly (bool flag)
 Set read-only flag.
virtual bool isReadonly () const
virtual bool variableIsBound () const
virtual void unbindVariable ()
 Sets the myVariableIsBound flag to false.
virtual void setName (const DtString &)
 Set the name of the object.
virtual const char * readerWriterType () const
 Used to supply a string type that this reader writer type is.
virtual DtString prettyPrint () const
 Routine to return a human readable form of the reader/writer variable.
virtual void bindVariables (DtVariableBindingsList variableBindings)
 Runs a variable binding pass on this reader writer and any of its children.
virtual std::list
< DtVariableNameType
unboundVariables () const
bool invalid () const
virtual bool hasChild (const DtReaderWriter *p) const
 Returns true if this variable has a child p in it's chain.
virtual void setValueSpecified (bool specified, bool recurse=false)
 The specified flags are used for optional values.
virtual bool valueSpecified () const
 The specified flags are used for optional values.
virtual bool isVariableReference () const
 Specifies whether or not this reader writer is really a variable that is specified elsewhere.
virtual void setIsVariableReference (bool value)
virtual void clearAllVariableReferenceFlags ()
 Clears out all variable reference flags from all readerwriter items in registry recursively.
virtual DtSymbolString variableName () const
 The variable name, if this object is a variable reference.
virtual void setVariableName (const DtSymbolString variableName)
 The variable name, if this object is a variable reference.
const DtReaderWriterRegistryregistry () const
 Collection of child DtReaderWriter nodes owned by this object.
DtReaderWriterRegistryregistry ()
 Collection of child DtReaderWriter nodes owned by this object.

Static Public Member Functions

static
DtVrfProcessStateRepository
creator (const DtString &name, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
 Create an instance of a DtVrfWeaponPSR.

Protected Types

enum  FireState { CommandedToFire, HasFired }
 State describing the gun. More...

Protected Member Functions

 DtVrfBalGunPSR ()
- Protected Member Functions inherited from DtVrfWeaponPSR
 DtVrfWeaponPSR ()
- Protected Member Functions inherited from DtVrfProcessStateRepository
 DtVrfProcessStateRepository ()
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 Copies values from the specified DtReaderWriter.
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 Checks to see if this RW object is a variable reference that can be bound using the provided bindings.
virtual void putData (FILE *fp, int indentLevel=0)
 Deriving class overrides these to get/put class specific data.
virtual DtlObjPtr getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 Deriving class overrides these to get/put class specific data.

Protected Attributes

DtDetonationDescriptorList myPendingDetonations
 List of DtDetonationDescriptors, used to save/restore information about pending scheduled detonations.
DtRwInt myFireState
 State describing the gun; for communication between the controller and actuator.
DtRwReal myFireCycleCompleteTime
 The time at which the gun firing cycle is complete.
DtRwString myDisplayName
- Protected Attributes inherited from DtVrfWeaponPSR
DtRwBoolean myTargetAcquired
DtRwString myCurrentTargetName
DtRwBoolean myUserTargetOverride
DtRwString myCurrentMunitionName
DtVrfMunitionLoader myMunitionLoader
DtEntityIdentifier myCurrentTargetId
 to have something concrete to return in currentTarget; not written to OOB
- Protected Attributes inherited from DtVrfProcessStateRepository
DtVrfObjectmyVrfObject
bool myLoadedFromMTL
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
DtReaderWriterRegistry myRegistry
bool myValueSpecified
bool myReadOnlyFlag
bool myIsVariableReference
DtSymbolString myVariableName
bool myVariableIsBound
aliasContainer myAliases
 Container for the aliases which represent alternative names for the object.
bool myInvalid
 Set to true if there is a problem reading this item.

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString > 
aliasContainer
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
- Static Protected Attributes inherited from DtVrfProcessStateRepository
static
DtVrfProcessStateRepositoryFactory
theFactory

Detailed Description

Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic guns.

Maintains information about any pending detonations (detonation interaction data, simulation time to fire).

Member Enumeration Documentation

enum DtVrfBalGunPSR::FireState
protected

State describing the gun.

We could add more physical gun states here such as "jammed."

Enumerator:
CommandedToFire 
HasFired 

Constructor & Destructor Documentation

DtVrfBalGunPSR::DtVrfBalGunPSR ( )
protected
DtVrfBalGunPSR::DtVrfBalGunPSR ( DtVrfObject vrfObject,
const DtString rwName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
)
DtVrfBalGunPSR::DtVrfBalGunPSR ( const DtVrfBalGunPSR orig,
const DtString rwName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
)
virtual DtVrfBalGunPSR::~DtVrfBalGunPSR ( )
virtual

Member Function Documentation

const DtVrfBalGunPSR& DtVrfBalGunPSR::operator= ( const DtVrfBalGunPSR orig)
virtual DtVrfProcessStateRepository* DtVrfBalGunPSR::clone ( const DtString rwName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
) const
virtual

Reimplemented from DtVrfWeaponPSR.

Reimplemented in DtVrfTurretedBalGunPSR.

virtual DtString DtVrfBalGunPSR::type ( ) const
virtual

Returns the string type of the repository, as defined in procSRTypes.h.

Reimplemented from DtVrfWeaponPSR.

Reimplemented in DtVrfTurretedBalGunPSR.

virtual const DtDetonationDescriptorList& DtVrfBalGunPSR::pendingDetonations ( ) const
virtual

Get list of pending detonations.

virtual void DtVrfBalGunPSR::addPendingDetonation ( DtDetonationDescriptor desc)
virtual

Add a new pending detonation.

virtual void DtVrfBalGunPSR::removePendingDetonation ( const DtEventId &  eventId)
virtual

Remove a particular pending detonation.

virtual void DtVrfBalGunPSR::setFiringCycleCompleteTime ( DtTime  completeTime)
virtual

Update the time that the firing cycle will be complete.

virtual DtTime DtVrfBalGunPSR::timeFiringCycleComplete ( ) const
virtual

Access firing cycle complete time.

virtual void DtVrfBalGunPSR::setCommandedToFire ( )
virtual

Change and test functions for fire state.

virtual void DtVrfBalGunPSR::setHasFired ( )
virtual

Change and test functions for fire state.

virtual bool DtVrfBalGunPSR::isCommandedToFire ( )
virtual

Change and test functions for fire state.

virtual bool DtVrfBalGunPSR::hasFired ( )
virtual

Change and test functions for fire state.

virtual void DtVrfBalGunPSR::setDisplayName ( const DtString displayName)
virtual
virtual const DtString DtVrfBalGunPSR::displayName ( ) const
virtual
static DtVrfProcessStateRepository* DtVrfBalGunPSR::creator ( const DtString name,
DtVrfObject vrfObject,
DtReaderWriterRegistry parentRegistry 
)
static

Create an instance of a DtVrfWeaponPSR.

Reimplemented from DtVrfWeaponPSR.

Reimplemented in DtVrfTurretedBalGunPSR.

Member Data Documentation

DtDetonationDescriptorList DtVrfBalGunPSR::myPendingDetonations
protected

List of DtDetonationDescriptors, used to save/restore information about pending scheduled detonations.

DtRwInt DtVrfBalGunPSR::myFireState
protected

State describing the gun; for communication between the controller and actuator.

The controller sets this to "commanded," and the actuator sets it either to "has fired" or "unable." When the gun "has fired" and the cycle complete time has expired (below), then the controller can fire again.

DtRwReal DtVrfBalGunPSR::myFireCycleCompleteTime
protected

The time at which the gun firing cycle is complete.

Set by the gun actuator component to inform the gun controller component that it can issue another fire command for another target.

DtRwString DtVrfBalGunPSR::myDisplayName
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)