DtVreLauncherController extends the base launcher controller to add equipment status monitoring functionality. It tracks the state of associated equipment resources and updates weapon availability based on the equipment status. This allows for disabling missile systems when the associated equipment is damaged or unavailable.
#include <vreLauncherController.h>
|
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| |
◆ DtVreLauncherController() [1/3]
| makVre::DtVreLauncherController::DtVreLauncherController |
( |
const DtString & | name, |
|
|
DtLocalObject * | owner, |
|
|
DtSimulationServices * | simManager, |
|
|
DtComponentDescriptor * | desc = 0, |
|
|
DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
- Parameters
-
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new launcher controller component with the specified parameters.
Referenced by DtVreLauncherController(), and operator=().
◆ ~DtVreLauncherController()
| virtual makVre::DtVreLauncherController::~DtVreLauncherController |
( |
| ) |
|
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the launcher controller component.
◆ DtVreLauncherController() [2/3]
| makVre::DtVreLauncherController::DtVreLauncherController |
( |
| ) |
|
|
delete |
Default constructor (deleted)
Default constructor is deleted to prevent creation of instances without proper initialization.
◆ DtVreLauncherController() [3/3]
◆ operator=()
Assignment operator (deleted)
- Returns
- Reference to this object
Assignment operator is deleted to prevent assignment.
References DtVreLauncherController().
◆ type()
| virtual const char * makVre::DtVreLauncherController::type |
( |
| ) |
const |
|
overridevirtual |
Gets the type identifier for this component.
- Returns
- String identifying the component type (DtVreLauncherControllerType)
Implements the DtSimComponent::type() method to return the type identifier for this component.
◆ tick()
| virtual void makVre::DtVreLauncherController::tick |
( |
| ) |
|
|
overridevirtual |
Updates the controller state each simulation frame.
Checks myEquipmentResource. If it's null, attempts to look it up and cache it, which will happen after a reset. If myEquipmentResource is non-null, updates the DtWeaponComponentInterface::DT_WEAPON_DISABLED flag based on whether or not the value of this resource is non-zero. This allows the weapon system to be disabled when the associated equipment is damaged or unavailable.
◆ creator()
| static DtSimComponent * makVre::DtVreLauncherController::creator |
( |
const DtString & | name, |
|
|
DtLocalObject * | owner, |
|
|
DtSimulationServices * | simManager, |
|
|
DtComponentDescriptor * | desc = 0, |
|
|
DtReaderWriterRegistry * | parentRegistry = 0 ) |
|
static |
Factory method to create a new instance of this component.
- Parameters
-
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
- Returns
- Pointer to the newly created component
Static factory method used by the component creation system to instantiate new instances of this component type.
◆ onRestore()
| virtual void makVre::DtVreLauncherController::onRestore |
( |
| ) |
|
|
overridevirtual |
Handles component restoration.
Called whenever a component is restored from a saved state. Sets myEquipmentResource to null, forcing it to be looked up again on the next tick. This ensures proper initialization after scenario restoration.
◆ preFirstTickInit()
| virtual void makVre::DtVreLauncherController::preFirstTickInit |
( |
| ) |
|
|
overrideprotectedvirtual |
Performs initialization before the first simulation tick.
Initializes the myMissileSimObjectFacadeMap and performs other one-time initialization tasks that must be completed before the first simulation tick occurs.
◆ lookupEquipmentResource()
| virtual DtSimResource * makVre::DtVreLauncherController::lookupEquipmentResource |
( |
| ) |
|
|
privatevirtual |
Looks up the appropriate equipment resource.
- Returns
- Pointer to the equipment resource, or nullptr if not found
Searches for and returns a pointer to the equipment resource that affects this launcher's availability. This method is called when the resource pointer is null, typically after initialization or reset.
◆ myEquipmentResource
| DtSimResource* makVre::DtVreLauncherController::myEquipmentResource |
|
protected |
Pointer to the equipment resource being monitored.
Stores a reference to the equipment resource that affects the availability of this launcher system. When this resource value becomes zero (indicating damaged or unavailable equipment), the launcher is disabled.
The documentation for this class was generated from the following file: