VR-Engage  2.2
Loading...
Searching...
No Matches
vreVrfTurretedBalGunPSR.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreVrfTurretedBalGunPSR.h
7//! \ingroup vreVrfobjcore
8//! \brief Turreted ballistic gun process state repository for VREngage
9//!
10//! This file defines the DtVreVrfTurretedBalGunPSR class, which extends the basic turreted
11//! ballistic gun PSR to provide VREngage-specific functionality. It adds support for
12//! VREngage-specific munition loading and tracking features.
13
14#pragma once
15
18
19#include <vrfobjcore/vrfTurretedBalGunPSR.h>
20
21namespace makVre
22{
23//! \brief Default name for the VREngage turreted ballistic gun PSR
24const char DtVreVrfTurretedBalGunPSRDefaultName[] = "vre-vrf-turreted-ballistic-gun-process-state-repository-default";
25
26//! \brief Type identifier string for the VREngage turreted ballistic gun PSR
27const char DtVreVrfTurretedBalGunPSRType[] = "vre-vrf-turreted-ballistic-gun-process-state-repository";
28
29//! \brief Extended turreted ballistic gun process state repository for VREngage
30//!
31//! This class extends the basic turreted ballistic gun PSR to provide VREngage-specific
32//! functionality. It uses a VREngage-specific munition loader to support additional
33//! features such as tracking and displaying ammunition counts in user interfaces.
34class VREVRFOBJCORE_DLL DtVreVrfTurretedBalGunPSR : public DtVrfTurretedBalGunPSR
35{
36protected:
37 //! \brief Protected default constructor (not for direct use)
38 //!
39 //! Default constructor is protected and only intended for use by derived classes.
40 //! Normal instantiation should use the public constructor with a VRF object.
42
43public:
44 //! \brief Constructor with VRF object and optional name
45 //! \param vrfObject Pointer to the local object this PSR is associated with
46 //! \param rwName Optional reader/writer name
47 //! \param parentRegistry Optional parent registry for reader/writer functionality
48 //!
49 //! Creates a new turreted ballistic gun PSR for the specified VRF object.
50 //! Initializes the VREngage-specific munition loader for ammunition tracking.
51 DtVreVrfTurretedBalGunPSR(DtLocalObject* vrfObject, const DtString& rwName = DtString::nullString(),
52 DtReaderWriterRegistry* parentRegistry = 0);
53
54 //! \brief Copy constructor
55 //! \param orig The source PSR to copy from
56 //! \param rwName Optional reader/writer name
57 //! \param parentRegistry Optional parent registry for reader/writer functionality
58 //!
59 //! Creates a new turreted ballistic gun PSR as a copy of the provided original.
60 DtVreVrfTurretedBalGunPSR(const DtVreVrfTurretedBalGunPSR& orig, const DtString& rwName = DtString::nullString(),
61 DtReaderWriterRegistry* parentRegistry = 0);
62
63 //! \brief Assignment operator
64 //! \param orig The source PSR to copy from
65 //! \return Reference to this PSR after assignment
66 //!
67 //! Assigns the contents of the provided PSR to this one.
69
70 //! \brief Virtual destructor
71 //!
72 //! Cleans up resources used by the PSR.
73 virtual ~DtVreVrfTurretedBalGunPSR() override;
74
75 //! \brief Gets the type identifier for this PSR
76 //! \return String identifying this PSR type
77 //!
78 //! Returns a unique type identifier string for this PSR type.
79 //! Will return DtVreVrfTurretedBalGunPSRType.
80 virtual DtString type() const override;
81
82 //! \brief Creates a clone of this PSR
83 //! \param rwName Optional reader/writer name for the clone
84 //! \param parentRegistry Optional parent registry for reader/writer functionality
85 //! \return Pointer to a new PSR that is a clone of this one
86 //!
87 //! Creates a new turreted ballistic gun PSR as a deep copy of this one.
88 virtual DtVrfProcessStateRepository* clone(const DtString& rwName = DtString::nullString(),
89 DtReaderWriterRegistry* parentRegistry = 0) const override;
90
91 //! \brief Factory function to create a new instance of this PSR
92 //! \param name The reader/writer name for the new instance
93 //! \param vrfObject Pointer to the local object this PSR will be associated with
94 //! \param parentRegistry Parent registry for reader/writer functionality
95 //! \return Pointer to a newly created PSR instance
96 //!
97 //! Static factory function used by the PSR creation system to instantiate
98 //! new instances of this PSR type.
99 static DtVrfProcessStateRepository* creator(
100 const DtString& name, DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
101
102 //! \brief Gets the munition loader (const version)
103 //! \return Const reference to the munition loader
104 //!
105 //! Returns a constant reference to the VREngage-specific munition loader.
106 //! This loader provides extended functionality for tracking ammunition counts.
107 virtual const DtVrfMunitionLoader& munitionLoader() const override;
108
109 //! \brief Gets the munition loader (non-const version)
110 //! \return Reference to the munition loader
111 //!
112 //! Returns a reference to the VREngage-specific munition loader, allowing
113 //! modification of its state. This loader provides extended functionality
114 //! for tracking ammunition counts.
115 virtual DtVrfMunitionLoader& munitionLoader() override;
116
117protected:
118 //! \brief VREngage-specific munition loader
119 //!
120 //! Instance of the VREngage-specific munition loader to support publishing
121 //! ammunition counts and other extended functionality. This loader tracks
122 //! and publishes the amount of ammunition left in the magazine for display
123 //! in user interfaces.
125};
126} // namespace makVre
Extended munition loader with VREngage-specific functionality.
Definition vreMunitionLoader.h:30
DtVreVrfTurretedBalGunPSR(const DtVreVrfTurretedBalGunPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this PSR.
virtual const DtVrfMunitionLoader & munitionLoader() const override
Gets the munition loader (const version)
DtVreVrfTurretedBalGunPSR(DtLocalObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Constructor with VRF object and optional name.
const DtVreVrfTurretedBalGunPSR & operator=(const DtVreVrfTurretedBalGunPSR &orig)
Assignment operator.
virtual DtString type() const override
Gets the type identifier for this PSR.
static DtVrfProcessStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Factory function to create a new instance of this PSR.
DtVreVrfTurretedBalGunPSR()
Protected default constructor (not for direct use)
DtVreMunitionLoader myVreMunitionLoader
VREngage-specific munition loader.
Definition vreVrfTurretedBalGunPSR.h:124
virtual ~DtVreVrfTurretedBalGunPSR() override
Virtual destructor.
virtual DtVrfMunitionLoader & munitionLoader() override
Gets the munition loader (non-const version)
Export macros for the VREngage Object Core library.
#define VREVRFOBJCORE_DLL
Platform-specific DLL export/import declaration.
Definition export.h:27
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtVreVrfTurretedBalGunPSRType[]
Type identifier string for the VREngage turreted ballistic gun PSR.
Definition vreVrfTurretedBalGunPSR.h:27
const char DtVreVrfTurretedBalGunPSRDefaultName[]
Default name for the VREngage turreted ballistic gun PSR.
Definition vreVrfTurretedBalGunPSR.h:24
Munition loader class for VREngage.