VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions
DtWeaponInfoInterface Class Referenceabstract

Abstract interface class for Weapon Information. This is used by DtWeaponInterfaceList. All code that is accessing information about weapons will have access to this base class only, and only be able to read the data. Weapon controllers will have derived versions that implement key functions for their specific weapon.

Inheritance diagram for DtWeaponInfoInterface:
Inheritance graph
[legend]

Public Types

enum  TargetApplicability {
  TargetApplicability_Unspecified = 0, TargetApplicability_NotApplicable = 1, TargetApplicability_Overkill = 2, TargetApplicability_Applicable = 3,
  TargetApplicability_Ideal = 4
}
 
enum  WeaponStatus {
  WeaponStatus_Busy = 1, WeaponStatus_Disabled = 2, WeaponStatus_OutOfAmmo = 4, WeaponStatus_Suppressed = 8,
  WeaponStatus_Stowed = 16
}
 

Public Member Functions

 DtWeaponInfoInterface ()
 
virtual ~DtWeaponInfoInterface ()=0
 
virtual DtString displayName () const =0
 
virtual DtU32 status () const =0
 
virtual DtString statusString () const
 
virtual bool ready () const
 
virtual bool hasStatus (WeaponStatus testStatus) const
 
virtual std::list
< DtSimTaskMessageType
fireTaskTypes () const
 
virtual DtSimTaskcreateFireTask (const DtRwLocationReference &location) const =0
 
virtual bool withinTargetRegion (const DtVector &localPosition) const =0
 
virtual TargetApplicability targetApplicability (const DtEntityType &type) const =0
 
virtual const std::list
< DtString > & 
resourceList () const =0
 
virtual const std::list
< DtArtPartType > & 
mountPartList () const =0
 
virtual DtArtPartType systemTurretNumber () const =0
 
virtual bool controlExternalTurret () const =0
 
virtual const std::set
< DtString > & 
requiredTokens () const =0
 
virtual bool autonomousFire () const =0
 
virtual const std::list
< DtEntityType > & 
autonomousTargetTypes () const =0
 
virtual const DtRwPropertiesweaponProperties () const =0
 
virtual int priority () const =0
 

Static Public Member Functions

static std::string targetApplicabilityString (TargetApplicability app)
 

Member Enumeration Documentation

Enumerator
TargetApplicability_Unspecified 
TargetApplicability_NotApplicable 
TargetApplicability_Overkill 
TargetApplicability_Applicable 
TargetApplicability_Ideal 
Enumerator
WeaponStatus_Busy 
WeaponStatus_Disabled 
WeaponStatus_OutOfAmmo 
WeaponStatus_Suppressed 
WeaponStatus_Stowed 

Constructor & Destructor Documentation

DtWeaponInfoInterface::DtWeaponInfoInterface ( )
virtual DtWeaponInfoInterface::~DtWeaponInfoInterface ( )
pure virtual

Member Function Documentation

static std::string DtWeaponInfoInterface::targetApplicabilityString ( TargetApplicability  app)
static
virtual DtString DtWeaponInfoInterface::displayName ( ) const
pure virtual

Implemented in DtGenericWeaponInfo.

virtual DtU32 DtWeaponInfoInterface::status ( ) const
pure virtual

Weapon status bitfield. 0 indicates the weapon is in the "ready" state. For any non-0 value, the details of the status can be checked using the WeaponStatus bitfields on this return value.

Implemented in DtGenericWeaponInfo.

virtual DtString DtWeaponInfoInterface::statusString ( ) const
virtual
Returns
A string representation of the status.
virtual bool DtWeaponInfoInterface::ready ( ) const
virtual
Returns
true if the weapon is ready to be used. For any return other than true, status() provides details.
virtual bool DtWeaponInfoInterface::hasStatus ( WeaponStatus  testStatus) const
virtual
Returns
True if this weapon curent has the indicated testStatus bit set in its status flags.
virtual std::list<DtSimTaskMessageType> DtWeaponInfoInterface::fireTaskTypes ( ) const
virtual

Task types that can be used to fire this weapon.

Reimplemented in DtGenericWeaponInfo.

virtual DtSimTask* DtWeaponInfoInterface::createFireTask ( const DtRwLocationReference location) const
pure virtual
Returns
a new task to fire on the specified location.
Note
This may return null if a task cannot be generated for any reason.

Implemented in DtGenericWeaponInfo.

virtual bool DtWeaponInfoInterface::withinTargetRegion ( const DtVector localPosition) const
pure virtual
Returns
True if the provided local coordinate is within the defined target region for this weapon.

Implemented in DtGenericWeaponInfo.

virtual TargetApplicability DtWeaponInfoInterface::targetApplicability ( const DtEntityType &  type) const
pure virtual
Returns
A general applicability of this weapon for the specified target type.

Implemented in DtGenericWeaponInfo.

virtual const std::list<DtString>& DtWeaponInfoInterface::resourceList ( ) const
pure virtual

List of the available munition resources. Only resources with non zero amounts are on this list.

Implemented in DtGenericWeaponInfo.

virtual const std::list<DtArtPartType>& DtWeaponInfoInterface::mountPartList ( ) const
pure virtual

A list of articulated parts to which this weapon is attached. That is, its parent part, that parent's part, etc. Used to determine when different weapons are dependent on the same part. The list contains articulated part type numbers.

Implemented in DtGenericWeaponInfo.

virtual DtArtPartType DtWeaponInfoInterface::systemTurretNumber ( ) const
pure virtual

The articulated part corresponding to the turret in this gun system (as opposed to an ancestor part).

Implemented in DtGenericWeaponInfo.

virtual bool DtWeaponInfoInterface::controlExternalTurret ( ) const
pure virtual

Indicates that this weapon is controlling parent parts outside of the system to turn the gun. I.e., a tank MG is controlling the main turret in order to reach targets outside the normal slew range of the MG.

Implemented in DtGenericWeaponInfo.

virtual const std::set<DtString>& DtWeaponInfoInterface::requiredTokens ( ) const
pure virtual

List of resources required to operate the weapon; these are tokens that are reserved when the weapon operates, but are not consumed. There is no token reservation system; other components just check to see if their tokens against this set to see if there is a conflict. These tokens may represent crew members, for example.

Implemented in DtGenericWeaponInfo.

virtual bool DtWeaponInfoInterface::autonomousFire ( ) const
pure virtual

Indicates whether on not this weapon should be used by VR-Forces autonomous fire controllers.

Implemented in DtGenericWeaponInfo.

virtual const std::list<DtEntityType>& DtWeaponInfoInterface::autonomousTargetTypes ( ) const
pure virtual

Returns the entity types which this weapon would be used against for autonomous fire.

Implemented in DtGenericWeaponInfo.

virtual const DtRwProperties* DtWeaponInfoInterface::weaponProperties ( ) const
pure virtual

Implemented in DtGenericWeaponInfo.

virtual int DtWeaponInfoInterface::priority ( ) const
pure virtual

Priority of this weapon. Used to compare to other weapons on this platform if there are conflicts.

Note
Lower numbers indicate higher priority.

Implemented in DtGenericWeaponInfo.


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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)