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 | Static Public Attributes
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  WeaponStatus {
  WeaponStatus_Busy = 1, WeaponStatus_Disabled = 2, WeaponStatus_OutOfAmmo = 4, WeaponStatus_Suppressed = 8,
  WeaponStatus_Stowed = 16
}
 
using TargetApplicability = DtTargetApplicability
 

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 DtSimTask * createFireTask (const DtRwLocationReference &location, const DtU8 hitZoneFunction) const =0
 
virtual DtSimTask * createFireTask (const DtRwLocationReference &location, const DtU8 hitZoneFunction, const DtEntityType &) const
 
virtual bool withinTargetRegion (const DtVector &localPosition) const =0
 
virtual double maximumRange () const =0
 
virtual double minimumRange () const =0
 
virtual TargetApplicability targetApplicability (const DtEntityType &type) const =0
 
virtual const std::list
< DtEntityType > & 
desiredAmmunition () 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 DtRwProperties * weaponProperties () const =0
 

Static Public Member Functions

static std::string targetApplicabilityString (TargetApplicability app)
 

Static Public Attributes

static constexpr
TargetApplicability 
TargetApplicability_Unspecified = DtTargetApplicability_Unspecified
 
static constexpr
TargetApplicability 
TargetApplicability_NotApplicable = DtTargetApplicability_NotApplicable
 
static constexpr
TargetApplicability 
TargetApplicability_Overkill = DtTargetApplicability_Overkill
 
static constexpr
TargetApplicability 
TargetApplicability_Applicable = DtTargetApplicability_Applicable
 
static constexpr
TargetApplicability 
TargetApplicability_Ideal = DtTargetApplicability_Ideal
 

Member Typedef Documentation

Applicability tier of this weapon against a given target type. Kept as nested type-aliases of the standalone DtTargetApplicability enum for backward compatibility with existing call sites.

Member Enumeration Documentation

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 DtU8  hitZoneFunction 
) 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 DtSimTask* DtWeaponInfoInterface::createFireTask ( const DtRwLocationReference &  location,
const DtU8  hitZoneFunction,
const DtEntityType &   
) const
inlinevirtual

Overload that accepts a caller-specified preferred munition type (typically the result of a prior bestMunitionForTarget() query). Weapon controllers whose task type carries an ammo field (e.g. ballistic gun) honour this hint; others ignore it. Default implementation forwards to the 2-arg overload so subclasses that do not care about munition selection get correct behaviour for free.

Reimplemented 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. TODO(DEPRECATED-TargetRegionFcn): This spatial-region gate predates the canEngageTarget chain (engage -> acquire -> face) and cannot answer ballistic reachability, LOS, facing, or peer-weapon contention. New callers must use bestMunitionForTarget()/canEngageTarget() instead. To be removed once indirect-fire / cruise-missile controllers migrate.

Implemented in DtGenericWeaponInfo.

virtual double DtWeaponInfoInterface::maximumRange ( ) const
pure virtual
Returns
the maximum range of the weapon.

Implemented in DtGenericWeaponInfo.

virtual double DtWeaponInfoInterface::minimumRange ( ) const
pure virtual
Returns
the minimum range of the 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<DtEntityType>& DtWeaponInfoInterface::desiredAmmunition ( ) const
pure virtual

List of the ammunition that is desired to be used by this weapon.

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.

Member Data Documentation

constexpr TargetApplicability DtWeaponInfoInterface::TargetApplicability_Unspecified = DtTargetApplicability_Unspecified
static
constexpr TargetApplicability DtWeaponInfoInterface::TargetApplicability_NotApplicable = DtTargetApplicability_NotApplicable
static
constexpr TargetApplicability DtWeaponInfoInterface::TargetApplicability_Overkill = DtTargetApplicability_Overkill
static
constexpr TargetApplicability DtWeaponInfoInterface::TargetApplicability_Applicable = DtTargetApplicability_Applicable
static
constexpr TargetApplicability DtWeaponInfoInterface::TargetApplicability_Ideal = DtTargetApplicability_Ideal
static

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)