VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtAmmunitionManager Class Reference

The DtAmmunitionManager is a clas that will maintain ammunition (that which is not published, such as bullets in a gun), their munition type, and the targets they can currently target. More...

Public Member Functions

 DtAmmunitionManager ()
 Constructs the ammunition manager. More...
 
virtual ~DtAmmunitionManager ()
 The destructor. More...
 
virtual bool init ()
 Initializes the ammunition manager. More...
 
virtual bool reinitialize ()
 Resets the ammunition manager to initial state. More...
 
virtual bool loadParametersFromFile (const DtFilename &filename)
 Calls createParameters() to get a new instance of the parameter object, and calls getSelf() on the parameters to load them from the file. More...
 
virtual void resetParameters ()
 Resets the parameters. More...
 
virtual DtAmmunitionParamssetParameters (DtAmmunitionParams *)
 Sets parameters and returns the existing parameters. More...
 
virtual bool parametersLoaded () const
 
virtual const DtFilename & parametersFile () const
 
virtual DtAmmunitionParamsparameters ()
 
virtual const DtAmmunitionParamsparameters () const
 

Static Public Member Functions

static void setAmmunitionManager (DtAmmunitionManager *)
 Set this in order to be able to map between the ammunition name in the priorities list and the ammunition type. More...
 
static DtAmmunitionManagerammunitionManager ()
 

Protected Member Functions

virtual DtAmmunitionParamscreateParameters ()
 

Protected Attributes

DtFilename myParametersFile
 
DtAmmunitionParamsmyParameters
 Parameters for this ammunition manager. More...
 

Static Protected Attributes

static DtAmmunitionManagertheAmmunitionManager
 The global instance that can be referened by other classes. More...
 

Private Member Functions

 DtAmmunitionManager (const DtAmmunitionManager &orig)
 Not defined! copy constructor. More...
 
DtAmmunitionManageroperator= (const DtAmmunitionManager &other)
 assignment operator More...
 

Detailed Description

The DtAmmunitionManager is a clas that will maintain ammunition (that which is not published, such as bullets in a gun), their munition type, and the targets they can currently target.

Constructor & Destructor Documentation

DtAmmunitionManager::DtAmmunitionManager ( )

Constructs the ammunition manager.

virtual DtAmmunitionManager::~DtAmmunitionManager ( )
virtual

The destructor.

DtAmmunitionManager::DtAmmunitionManager ( const DtAmmunitionManager orig)
private

Not defined! copy constructor.

Member Function Documentation

virtual bool DtAmmunitionManager::init ( )
virtual

Initializes the ammunition manager.

  • Clears out ammunition paramters
    Returns
    a boolean signifying success or failure.
virtual bool DtAmmunitionManager::reinitialize ( )
virtual

Resets the ammunition manager to initial state.

  • calls init to initialize the manager.
Returns
a boolean signifying success or failure.
See Also
init
virtual bool DtAmmunitionManager::loadParametersFromFile ( const DtFilename &  filename)
virtual

Calls createParameters() to get a new instance of the parameter object, and calls getSelf() on the parameters to load them from the file.

Assigns the newly loaded parameters to myParameters and processes parameters specified. If there are parameters already in this class it will merge the parameters in. Make sure to call reinitialize before load if you want to load parameters into a clean list

Returns
True on success.
virtual DtAmmunitionParams* DtAmmunitionManager::parameters ( )
virtual
Returns
The parameters for this DtAmmunitionManager.
virtual const DtAmmunitionParams* DtAmmunitionManager::parameters ( ) const
virtual
virtual void DtAmmunitionManager::resetParameters ( )
virtual

Resets the parameters.

virtual DtAmmunitionParams* DtAmmunitionManager::setParameters ( DtAmmunitionParams )
virtual

Sets parameters and returns the existing parameters.

Once set this class will take ownership of the memory. If you do not need the old parameters that are returned, delete them

virtual bool DtAmmunitionManager::parametersLoaded ( ) const
virtual
Returns
true if a parameter set has been loaded.
virtual const DtFilename& DtAmmunitionManager::parametersFile ( ) const
virtual
Returns
The name of the detonation parameters file that was loaded.
static void DtAmmunitionManager::setAmmunitionManager ( DtAmmunitionManager )
static

Set this in order to be able to map between the ammunition name in the priorities list and the ammunition type.

If this manager is not present then there can be no mapping

static DtAmmunitionManager* DtAmmunitionManager::ammunitionManager ( )
static
virtual DtAmmunitionParams* DtAmmunitionManager::createParameters ( )
protectedvirtual
Returns
A new instance of DtAmmunitionParams. If new parameters are used in a derived version of this class, override this method to return a derived version of DtAmmunitionParams.
DtAmmunitionManager& DtAmmunitionManager::operator= ( const DtAmmunitionManager other)
private

assignment operator

Member Data Documentation

DtFilename DtAmmunitionManager::myParametersFile
protected
DtAmmunitionParams* DtAmmunitionManager::myParameters
protected

Parameters for this ammunition manager.

DtAmmunitionManager* DtAmmunitionManager::theAmmunitionManager
staticprotected

The global instance that can be referened by other classes.

This must be set in order to be used. The creation of an ammunition manager will not, by default, set this value


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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)