VR-Engage  2.2
Loading...
Searching...
No Matches
vreJoystickControllerDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreJoystickControllerDescriptor.h
7//! \ingroup vreVrfobjparam
8//! \brief Joystick controller descriptor for VREngage
9//!
10//! This file defines the DtVreJoystickControllerDescriptor class, which configures
11//! joystick controller components in VREngage. It provides parameters for joystick
12//! input handling and port group configuration.
13
14#pragma once
15
17#include <vrfobjparam/joyDeviceControllerDescriptor.h>
18
19namespace makVre
20{
21//! \brief Type identifier string for the joystick controller descriptor
22const char DtVreJoystickControllerDescriptorType[] = "vre-joystick-controller-descriptor";
23
24//! \brief Joystick controller descriptor for VREngage
25//!
26//! This class defines a descriptor for joystick controller components in VREngage.
27//! It extends the base joystick device controller descriptor to add configuration for
28//! port group assignment, allowing joystick inputs to be directed to appropriate
29//! control systems in the simulation.
30class VREVRFOBJPARAM_DLL DtVreJoystickControllerDescriptor : public DtJoyDeviceControllerDescriptor
31{
32private:
33 //! \brief Default constructor (not implemented)
34 //!
35 //! Default constructor is private and not implemented to prevent
36 //! creation of instances without proper initialization.
38
39public:
40 //! \brief Constructor with component name
41 //! \param componentName The name of this component
42 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
43 //!
44 //! Creates a new joystick controller descriptor with the specified name.
45 DtVreJoystickControllerDescriptor(const DtString& componentName, DtReaderWriterRegistry* parentRegistry = 0);
46
47 //! \brief Constructor with component name as symbol string
48 //! \param componentName The name of this component as a symbol string
49 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
50 //!
51 //! Creates a new joystick controller descriptor with the specified name.
53 const DtSymbolString& componentName, DtReaderWriterRegistry* parentRegistry = NULL);
54
55 //! \brief Copy constructor
56 //! \param orig The source descriptor to copy from
57 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
58 //!
59 //! Creates a new joystick controller descriptor as a copy of the provided original.
61 const DtVreJoystickControllerDescriptor& orig, DtReaderWriterRegistry* parentRegistry = 0);
62
63 //! \brief Virtual destructor
64 //!
65 //! Cleans up resources used by the descriptor.
67
68 //! \brief Assignment operator
69 //! \param orig The source descriptor to copy from
70 //! \return Reference to this descriptor after assignment
71 //!
72 //! Assigns the contents of the provided descriptor to this one.
74
75 //! \brief Gets the type identifier for this descriptor
76 //! \return String identifying this descriptor type
77 //!
78 //! Returns a unique type identifier string for this descriptor type.
79 //! Will return DtVreJoystickControllerDescriptorType.
80 virtual DtString type() const override;
81
82 //! \brief Creates a clone of this descriptor
83 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
84 //! \return Pointer to a new descriptor that is a clone of this one
85 //!
86 //! Creates a new joystick controller descriptor as a deep copy of this one.
87 virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = 0) const override;
88
89 //! \brief Factory function to create a new instance of this descriptor
90 //! \return Pointer to a newly created descriptor
91 //!
92 //! Static factory function used by the descriptor creation system to instantiate
93 //! new instances of this descriptor type.
94 static DtComponentDescriptor* creator();
95
96 //! \brief Gets the port group name
97 //! \return String identifying the port group
98 //!
99 //! Returns the name of the port group that this joystick controller is assigned to.
100 //! Port groups are used to direct joystick inputs to appropriate control systems.
101 virtual std::string portGroupName() const;
102
103 //! \brief Sets the port group name
104 //! \param name String identifying the port group
105 //!
106 //! Sets the name of the port group that this joystick controller is assigned to.
107 //! Port groups are used to direct joystick inputs to appropriate control systems.
108 virtual void setPortGroupName(std::string name);
109
110protected:
111 //! \brief Port group name
112 //!
113 //! The name of the port group that this joystick controller is assigned to.
114 //! Port groups are used to direct joystick inputs to appropriate control systems.
115 DtRwString myPortGroupName;
116};
117} // namespace makVre
DtVreJoystickControllerDescriptor(const DtVreJoystickControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
DtVreJoystickControllerDescriptor(const DtString &componentName, DtReaderWriterRegistry *parentRegistry=0)
Constructor with component name.
DtVreJoystickControllerDescriptor(const DtSymbolString &componentName, DtReaderWriterRegistry *parentRegistry=NULL)
Constructor with component name as symbol string.
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this descriptor.
DtVreJoystickControllerDescriptor()
Default constructor (not implemented)
virtual void setPortGroupName(std::string name)
Sets the port group name.
DtRwString myPortGroupName
Port group name.
Definition vreJoystickControllerDescriptor.h:115
virtual std::string portGroupName() const
Gets the port group name.
DtVreJoystickControllerDescriptor & operator=(const DtVreJoystickControllerDescriptor &orig)
Assignment operator.
virtual ~DtVreJoystickControllerDescriptor() override
Virtual destructor.
static DtComponentDescriptor * creator()
Factory function to create a new instance of this descriptor.
virtual DtString type() const override
Gets the type identifier for this descriptor.
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 DtVreJoystickControllerDescriptorType[]
Type identifier string for the joystick controller descriptor.
Definition vreJoystickControllerDescriptor.h:22