VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtAmmoLoadTime Class Reference

Detailed Description

This class defines the loading time parameters for specific ammunition types used by weapons in VREngage. It allows for realistic simulation of weapon reloading times based on ammunition type, enhancing combat simulation fidelity.

#include <ammoLoadTime.h>

Inheritance diagram for makVre::DtAmmoLoadTime:
[legend]

Public Member Functions

 DtAmmoLoadTime ()
 
 DtAmmoLoadTime (const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
 
 DtAmmoLoadTime (const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
 
virtual ~DtAmmoLoadTime () override
 
 DtAmmoLoadTime (const DtAmmoLoadTime &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
 
DtAmmoLoadTimeoperator= (const DtAmmoLoadTime &orig)
 
virtual DtAmmoLoadTimeclone (DtReaderWriterRegistry *parentRegistry=NULL) const
 
virtual void setAmmoType (const DtEntityType &name)
 
virtual const DtEntityType & ammoType () const
 
virtual void setLoadTime (double time)
 
virtual double loadTime () const
 
virtual const char * readerWriterType () const override
 
virtual const char * xmlType () const override
 

Static Public Member Functions

static const char * theXmlType ()
 

Protected Attributes

DtRwEntityType myAmmoType
 
DtRwReal myLoadTime
 

Constructor & Destructor Documentation

◆ DtAmmoLoadTime() [1/4]

makVre::DtAmmoLoadTime::DtAmmoLoadTime ( )

Default constructor.

Creates a new ammunition loading time parameter with default values.

Referenced by clone(), DtAmmoLoadTime(), and operator=().

◆ DtAmmoLoadTime() [2/4]

makVre::DtAmmoLoadTime::DtAmmoLoadTime ( const DtString & name,
DtReaderWriterRegistry *const parentRegistry = NULL )

Constructor with ammunition name.

Parameters
nameThe name of the ammunition type
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new ammunition loading time parameter for the specified ammunition type.

◆ DtAmmoLoadTime() [3/4]

makVre::DtAmmoLoadTime::DtAmmoLoadTime ( const DtSymbolString & name,
DtReaderWriterRegistry *const parentRegistry = NULL )

Constructor with ammunition name as symbol string.

Parameters
nameThe name of the ammunition type as a symbol string
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new ammunition loading time parameter for the specified ammunition type.

◆ ~DtAmmoLoadTime()

virtual makVre::DtAmmoLoadTime::~DtAmmoLoadTime ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the ammunition loading time parameter.

◆ DtAmmoLoadTime() [4/4]

makVre::DtAmmoLoadTime::DtAmmoLoadTime ( const DtAmmoLoadTime & orig,
DtReaderWriterRegistry *const parentRegistry = NULL )

Copy constructor.

Parameters
origThe source object to copy from
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new ammunition loading time parameter as a copy of the provided original.

References DtAmmoLoadTime().

Member Function Documentation

◆ operator=()

DtAmmoLoadTime & makVre::DtAmmoLoadTime::operator= ( const DtAmmoLoadTime & orig)

Assignment operator.

Parameters
origThe source object to copy from
Returns
Reference to this object after assignment

Assigns the contents of the provided ammunition loading time parameter to this one.

References DtAmmoLoadTime().

◆ clone()

virtual DtAmmoLoadTime * makVre::DtAmmoLoadTime::clone ( DtReaderWriterRegistry * parentRegistry = NULL) const
virtual

Creates a clone of this object.

Parameters
parentRegistryParent registry for reader/writer functionality (optional)
Returns
Pointer to a new object that is a clone of this one

Creates a new ammunition loading time parameter as a deep copy of this one.

References DtAmmoLoadTime().

◆ setAmmoType()

virtual void makVre::DtAmmoLoadTime::setAmmoType ( const DtEntityType & name)
virtual

Sets the ammunition name.

Parameters
nameThe name of the ammunition type

Sets the name that identifies this ammunition type.

◆ ammoType()

virtual const DtEntityType & makVre::DtAmmoLoadTime::ammoType ( ) const
virtual

Gets the ammunition name.

Returns
Reference to the ammunition name string

Gets the name that identifies this ammunition type.

◆ setLoadTime()

virtual void makVre::DtAmmoLoadTime::setLoadTime ( double time)
virtual

Sets the ammunition loading time.

Parameters
timeThe loading time in seconds

Sets the time required to load this ammunition type into a weapon.

◆ loadTime()

virtual double makVre::DtAmmoLoadTime::loadTime ( ) const
virtual

Gets the ammunition loading time.

Returns
The loading time in seconds

Gets the time required to load this ammunition type into a weapon.

◆ readerWriterType()

virtual const char * makVre::DtAmmoLoadTime::readerWriterType ( ) const
overridevirtual

Gets the reader/writer type identifier.

Returns
String identifying this reader/writer type

Returns the type identifier for this reader/writer class.

◆ theXmlType()

static const char * makVre::DtAmmoLoadTime::theXmlType ( )
static

Gets the XML type identifier.

Returns
String identifying this type in XML archives

Returns the type identifier used when archiving to an XML stream.

Referenced by xmlType().

◆ xmlType()

virtual const char * makVre::DtAmmoLoadTime::xmlType ( ) const
inlineoverridevirtual

Gets the XML type identifier for this instance.

Returns
String identifying this type in XML archives

Returns the type identifier used when archiving this instance to an XML stream.

References theXmlType().

Member Data Documentation

◆ myAmmoType

DtRwEntityType makVre::DtAmmoLoadTime::myAmmoType
protected

The ammunition type name.

Stores the name that identifies this ammunition type.

◆ myLoadTime

DtRwReal makVre::DtAmmoLoadTime::myLoadTime
protected

The ammunition loading time in seconds.

Stores the time required to load this ammunition type into a weapon.


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