VR-Engage  2.2
Loading...
Searching...
No Matches
bullseyePSR.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6#pragma once
7
8//! \file bullseyePSR.h
9//! \ingroup vreVrfobjcore
10//! \brief Bullseye process state repository for VREngage
11//!
12//! This file defines the DtBullseyePSR class, which provides a process state repository
13//! for the bullseye controller component in VREngage. It stores and manages references
14//! to entities designated as bullseye reference points for tactical communications.
15
17#include <vrfobjcore/vrfProcessStateRepository.h>
18#include <readerWriter/readerWriter.h>
19#include <vrfobjcore/simObjectReference.h>
20#include <vrfobjcore/rwSimObjectReference.h>
21
22namespace makVre
23{
24//! \brief Type identifier string for the bullseye process state repository
25const char DtBullseyePSRType[] = "bullseye-psr";
26
27//! \brief Default name for the bullseye process state repository
28const char DtBullseyePSRDefaultName[] = "bullseye-psr-default";
29
30//! \brief Process state repository for the bullseye controller component
31//!
32//! This class provides storage and management for bullseye reference entity data,
33//! which is used by the bullseye controller component in VREngage simulations.
34//! A bullseye reference point is a tactical position reference commonly used in
35//! military simulations for communicating relative positions.
36class VREVRFOBJCORE_DLL DtBullseyePSR : public DtVrfProcessStateRepository
37{
38public:
39 //! \brief Constructor with VRF object and optional name
40 //! \param vrfObject Pointer to the local object this PSR is associated with
41 //! \param rwName Optional reader/writer name
42 //! \param parentRegistry Optional parent registry for reader/writer functionality
43 //!
44 //! Creates a new bullseye PSR for the specified VRF object.
45 DtBullseyePSR(DtLocalObject* vrfObject, const DtString& rwName = DtString::nullString(),
46 DtReaderWriterRegistry* parentRegistry = 0);
47
48 //! \brief Copy constructor
49 //! \param orig The source PSR to copy from
50 //! \param rwName Optional reader/writer name
51 //! \param parentRegistry Optional parent registry for reader/writer functionality
52 //!
53 //! Creates a new bullseye PSR as a copy of the provided original.
54 DtBullseyePSR(const DtBullseyePSR& orig, const DtString& rwName = DtString::nullString(),
55 DtReaderWriterRegistry* parentRegistry = 0);
56
57 //! \brief Virtual destructor
58 //!
59 //! Cleans up resources used by the PSR.
60 virtual ~DtBullseyePSR() override;
61
62 //! \brief Assignment operator (not implemented)
63 //! \param orig The source PSR to copy from
64 //! \return Reference to this PSR after assignment
65 //!
66 //! Assignment operator is declared but not implemented to prevent assignment.
68
69 //! \brief Creates a clone of this PSR
70 //! \param rwName Optional reader/writer name for the clone
71 //! \param parentRegistry Optional parent registry for reader/writer functionality
72 //! \return Pointer to a new PSR that is a clone of this one
73 //!
74 //! Creates a new bullseye PSR as a deep copy of this one.
75 virtual DtVrfProcessStateRepository* clone(const DtString& rwName = DtString::nullString(),
76 DtReaderWriterRegistry* parentRegistry = 0) const override;
77
78 //! \brief Gets the type identifier for this PSR
79 //! \return String identifying this PSR type
80 //!
81 //! Returns a unique type identifier string for this PSR type.
82 //! Will return DtBullseyePSRType.
83 virtual DtString type() const override;
84
85 //! \brief Gets the currently selected bullseye entity
86 //! \return Reference to the bullseye entity, or an invalid reference if none is set
87 //!
88 //! Returns a reference to the entity currently designated as the bullseye reference point.
89 virtual DtSimObjectReference bullseyeEntity() const;
90
91 //! \brief Sets the bullseye entity
92 //! \param uuid The UUID of the entity to set as the bullseye reference
93 //!
94 //! Designates the specified entity as the bullseye reference point.
95 virtual void setBullseyeEntity(const DtUUID& uuid);
96
97 //! \brief Removes the bullseye entity designation
98 //!
99 //! Clears the current bullseye reference point, if any.
100 virtual void removeBullseyeEntity();
101
102 //! \brief Factory function to create a new instance of this PSR
103 //! \param rwName The reader/writer name for the new instance
104 //! \param vrfObject Pointer to the local object this PSR will be associated with
105 //! \param parentRegistry Parent registry for reader/writer functionality
106 //! \return Pointer to a newly created PSR instance
107 //!
108 //! Static factory function used by the PSR creation system to instantiate
109 //! new instances of this PSR type.
110 static DtVrfProcessStateRepository* creator(
111 const DtString& rwName, DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
112
113protected:
114 //! \brief Reference to the selected bullseye entity
115 //!
116 //! Stores a reference to the entity designated as the bullseye reference point.
117 //! This entity serves as a tactical position reference for communicating
118 //! relative positions in military simulations.
119 DtRwSimObjectReference myBullseyeEntity;
120};
121
122} // namespace makVre
virtual ~DtBullseyePSR() override
Virtual destructor.
virtual DtSimObjectReference bullseyeEntity() const
Gets the currently selected bullseye entity.
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this PSR.
virtual DtString type() const override
Gets the type identifier for this PSR.
virtual void setBullseyeEntity(const DtUUID &uuid)
Sets the bullseye entity.
DtBullseyePSR & operator=(const DtBullseyePSR &orig)
Assignment operator (not implemented)
DtRwSimObjectReference myBullseyeEntity
Reference to the selected bullseye entity.
Definition bullseyePSR.h:119
virtual void removeBullseyeEntity()
Removes the bullseye entity designation.
DtBullseyePSR(DtLocalObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Constructor with VRF object and optional name.
static DtVrfProcessStateRepository * creator(const DtString &rwName, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Factory function to create a new instance of this PSR.
DtBullseyePSR(const DtBullseyePSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
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 DtBullseyePSRDefaultName[]
Default name for the bullseye process state repository.
Definition bullseyePSR.h:28
const char DtBullseyePSRType[]
Type identifier string for the bullseye process state repository.
Definition bullseyePSR.h:25