|
VR-Engage
2.2
|
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>
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) | |
| DtAmmoLoadTime & | operator= (const DtAmmoLoadTime &orig) |
| virtual DtAmmoLoadTime * | clone (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 |
| makVre::DtAmmoLoadTime::DtAmmoLoadTime | ( | ) |
Default constructor.
Creates a new ammunition loading time parameter with default values.
Referenced by clone(), DtAmmoLoadTime(), and operator=().
| makVre::DtAmmoLoadTime::DtAmmoLoadTime | ( | const DtString & | name, |
| DtReaderWriterRegistry *const | parentRegistry = NULL ) |
Constructor with ammunition name.
| name | The name of the ammunition type |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition loading time parameter for the specified ammunition type.
| makVre::DtAmmoLoadTime::DtAmmoLoadTime | ( | const DtSymbolString & | name, |
| DtReaderWriterRegistry *const | parentRegistry = NULL ) |
Constructor with ammunition name as symbol string.
| name | The name of the ammunition type as a symbol string |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition loading time parameter for the specified ammunition type.
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the ammunition loading time parameter.
| makVre::DtAmmoLoadTime::DtAmmoLoadTime | ( | const DtAmmoLoadTime & | orig, |
| DtReaderWriterRegistry *const | parentRegistry = NULL ) |
Copy constructor.
| orig | The source object to copy from |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition loading time parameter as a copy of the provided original.
References DtAmmoLoadTime().
| DtAmmoLoadTime & makVre::DtAmmoLoadTime::operator= | ( | const DtAmmoLoadTime & | orig | ) |
Assignment operator.
| orig | The source object to copy from |
Assigns the contents of the provided ammunition loading time parameter to this one.
References DtAmmoLoadTime().
|
virtual |
Creates a clone of this object.
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition loading time parameter as a deep copy of this one.
References DtAmmoLoadTime().
|
virtual |
Sets the ammunition name.
| name | The name of the ammunition type |
Sets the name that identifies this ammunition type.
|
virtual |
Gets the ammunition name.
Gets the name that identifies this ammunition type.
|
virtual |
Sets the ammunition loading time.
| time | The loading time in seconds |
Sets the time required to load this ammunition type into a weapon.
|
virtual |
Gets the ammunition loading time.
Gets the time required to load this ammunition type into a weapon.
|
overridevirtual |
Gets the reader/writer type identifier.
Returns the type identifier for this reader/writer class.
|
static |
Gets the XML type identifier.
Returns the type identifier used when archiving to an XML stream.
Referenced by xmlType().
|
inlineoverridevirtual |
Gets the XML type identifier for this instance.
Returns the type identifier used when archiving this instance to an XML stream.
References theXmlType().
|
protected |
The ammunition type name.
Stores the name that identifies this ammunition type.
|
protected |
The ammunition loading time in seconds.
Stores the time required to load this ammunition type into a weapon.