VR-Engage  2.2
Loading...
Searching...
No Matches
vreWeaponControllerDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreWeaponControllerDescriptor.h
7//! \ingroup vreVrfobjparam
8//! \brief Weapon controller descriptor for VREngage
9//!
10//! This file defines the DtVreWeaponControllerDescriptor class, which configures
11//! weapon controller components in VREngage. It extends the base weapon controller
12//! descriptor to add equipment resource type configuration and ammunition selection
13//! capabilities.
14
15#pragma once
16
18
19#include <vrfobjparam/weaponControllerDescriptor.h>
20#include <vrfutil/rwResource.h>
21
22namespace makVre
23{
24//! \brief Type identifier string for the weapon controller descriptor
25const char DtVreWeaponControllerDescriptorType[] = "vre-weapon-controller-descriptor";
26
27//! \brief Weapon controller descriptor for VREngage
28//!
29//! This class extends the base weapon controller descriptor to add configuration for
30//! equipment resource types and ammunition selection capabilities. It provides parameters
31//! for direct fire weapon controllers, allowing them to choose appropriate ammunition
32//! based on target types and maintain resource tracking.
33class VREVRFOBJPARAM_DLL DtVreWeaponControllerDescriptor : public DtWeaponControllerDescriptor
34{
35public:
36 //! \brief Constructor with component name
37 //! \param name The name of this component
38 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
39 //!
40 //! Creates a new weapon controller descriptor with the specified name.
41 DtVreWeaponControllerDescriptor(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0);
42
43 //! \brief Copy constructor
44 //! \param orig The source descriptor to copy from
45 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
46 //!
47 //! Creates a new weapon controller descriptor as a copy of the provided original.
49 const DtVreWeaponControllerDescriptor& orig, DtReaderWriterRegistry* parentRegistry = 0);
50
51 //! \brief Assignment operator
52 //! \param orig The source descriptor to copy from
53 //! \return Reference to this descriptor after assignment
54 //!
55 //! Assigns the contents of the provided descriptor to this one.
57
58 //! \brief Virtual destructor
59 //!
60 //! Cleans up resources used by the descriptor.
62
63 //! \brief Default constructor (deleted)
64 //!
65 //! Default constructor is explicitly deleted to prevent
66 //! creation of instances without proper initialization.
68
69 //! \brief Gets the type identifier for this descriptor
70 //! \return String identifying this descriptor type
71 //!
72 //! Returns a unique type identifier string for this descriptor type.
73 //! Will return DtVreWeaponControllerDescriptorType.
74 virtual DtString type() const override;
75
76 //! \brief Creates a clone of this descriptor
77 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
78 //! \return Pointer to a new descriptor that is a clone of this one
79 //!
80 //! Creates a new weapon controller descriptor as a deep copy of this one.
81 virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = 0) const override;
82
83 //! \brief Gets the equipment resource type
84 //! \return Reference to the equipment resource entity type
85 //!
86 //! Returns the type of equipment resource used by this weapon controller.
87 //! This is used for resource tracking and management in the simulation.
88 virtual const DtEntityType& equipmentResourceType() const;
89
90 //! \brief Sets the equipment resource type
91 //! \param equipmentResourceType The equipment resource entity type
92 //!
93 //! Sets the type of equipment resource used by this weapon controller.
94 //! This is used for resource tracking and management in the simulation.
95 virtual void setEquipmentResourceType(const DtEntityType& equipmentResourceType);
96
97 //! \brief Factory function to create a new instance of this descriptor
98 //! \return Pointer to a newly created descriptor
99 //!
100 //! Static factory function used by the descriptor creation system to instantiate
101 //! new instances of this descriptor type.
102 static DtComponentDescriptor* creator();
103
104protected:
105 //! \brief Equipment resource entity type
106 //!
107 //! The type of equipment resource used by this weapon controller.
108 //! This is used for resource tracking and management in the simulation.
109 //! Parameter name: "equipment-resource"
111};
112} // namespace makVre
virtual const DtEntityType & equipmentResourceType() const
Gets the equipment resource type.
virtual DtString type() const override
Gets the type identifier for this descriptor.
virtual ~DtVreWeaponControllerDescriptor() override
Virtual destructor.
static DtComponentDescriptor * creator()
Factory function to create a new instance of this descriptor.
DtRwResource myEquipmentResourceType
Equipment resource entity type.
Definition vreWeaponControllerDescriptor.h:110
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this descriptor.
DtVreWeaponControllerDescriptor()=delete
Default constructor (deleted)
DtVreWeaponControllerDescriptor & operator=(const DtVreWeaponControllerDescriptor &orig)
Assignment operator.
DtVreWeaponControllerDescriptor(const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
Constructor with component name.
virtual void setEquipmentResourceType(const DtEntityType &equipmentResourceType)
Sets the equipment resource type.
DtVreWeaponControllerDescriptor(const DtVreWeaponControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
Export macros for the VREngage Object Parameter library.
#define VREVRFOBJPARAM_DLL
Platform-specific DLL export/import declaration.
Definition export.h:27
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtVreWeaponControllerDescriptorType[]
Type identifier string for the weapon controller descriptor.
Definition vreWeaponControllerDescriptor.h:25