VR-Engage  2.3
Loading...
Searching...
No Matches
vortexInterfaceElementDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vortexInterfaceElementDescriptor.h
7//! \brief Defines DtVortexInterfaceElementDescriptor for Vortex interface parameter elements
8//! \ingroup vreVrfVortexObjparam
9
10#pragma once
11
13#include <vrfutil/rwTemplatedList.h>
14#include <readerWriter/rwString.h>
15namespace makVre
16{
17//! \brief Type identifier string for the DtVortexInterfaceElementDescriptor class
18const char DtVortexInterfaceElementDescriptorType[] = "DtVortexInterfaceElementDescriptor";
19
20//! \brief Descriptor for individual Vortex interface parameter elements
21//!
22//! DtVortexInterfaceElementDescriptor represents a single parameter element within a Vortex
23//! interface descriptor. It stores the name of the parameter in the Vortex physics engine
24//! and its data type. These elements are used in input and output parameter lists to define
25//! the interface for communication with the Vortex physics engine.
27{
28public:
29 //! \brief Default constructor
30 //!
31 //! Creates an empty interface element descriptor
33
34 //! \brief Constructor with element name and registry
35 //! \param name Name of the interface element descriptor
36 //! \param parentRegistry Optional parent registry for reader/writer operations
37 DtVortexInterfaceElementDescriptor(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0);
38
39 //! \brief Constructor with symbol element name and registry
40 //! \param name Symbol string name of the interface element descriptor
41 //! \param parentRegistry Optional parent registry for reader/writer operations
42 DtVortexInterfaceElementDescriptor(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = 0);
43
44 //! \brief Copy constructor
45 //! \param orig Original interface element descriptor to copy from
46 //! \param parentRegistry Optional parent registry for reader/writer operations
48 const DtVortexInterfaceElementDescriptor& orig, DtReaderWriterRegistry* parentRegistry = 0);
49
50 //! \brief Assignment operator
51 //! \param orig Original interface element descriptor to copy from
52 //! \return Reference to this interface element descriptor after assignment
54
55 //! \brief Virtual destructor
57
58 //! \brief Sets the Vortex parameter name
59 //! \param name The parameter name to set in the Vortex physics engine
60 virtual void setVortexName(const DtString& name);
61
62 //! \brief Gets the Vortex parameter name
63 //! \return The parameter name in the Vortex physics engine
64 virtual const DtString& vortexName() const;
65
66 //! \brief Sets the data type of the parameter
67 //! \param type The data type to set for this parameter
68 virtual void setDataType(const DtString& type);
69
70 //! \brief Gets the data type of the parameter
71 //! \return The data type of this parameter
72 virtual const DtString& dataType() const;
73
74 virtual void setIsOffsetVector(bool on);
75 virtual bool isOffsetVector() const;
76
77 virtual void setUseWorldCoords(bool on);
78 virtual bool useWorldCoords() const;
79
80 //! \brief Gets the type identifier for reader/writer operations
81 //! \return Type identifier string
82 virtual const char* readerWriterType() const override;
83
84 //! \brief Gets the XML type identifier for serialization
85 //! \return XML type identifier string used when archiving to an XML stream
86 static const char* theXmlType();
87
88 //! \brief Gets the XML type identifier for this instance
89 //! \return XML type identifier string
90 virtual const char* xmlType() const override { return theXmlType(); }
91
92protected:
93 //! \brief The parameter name in the Vortex physics engine
94 DtRwString myVortexName;
95
96 //! \brief The data type of this parameter
97 DtRwString myDataType;
98
99 DtRwBoolean myIsOffsetVector;
100
101 DtRwBoolean myUseGeocentric;
102};
103
104//! \brief Type definition for a list of Vortex interface element descriptors
105//!
106//! This list template specialization manages ownership of the descriptors
107//! and handles proper deletion when the list is destroyed
108using DtVortexInterfaceElementList = DtRwTemplatedListPtr<DtVortexInterfaceElementDescriptor, true>;
109} // namespace makVre
DtRwBoolean myIsOffsetVector
Definition vortexInterfaceElementDescriptor.h:99
virtual void setDataType(const DtString &type)
Sets the data type of the parameter.
DtVortexInterfaceElementDescriptor(const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=0)
Constructor with symbol element name and registry.
virtual void setVortexName(const DtString &name)
Sets the Vortex parameter name.
virtual ~DtVortexInterfaceElementDescriptor() override
Virtual destructor.
DtRwString myVortexName
The parameter name in the Vortex physics engine.
Definition vortexInterfaceElementDescriptor.h:94
DtVortexInterfaceElementDescriptor()
Default constructor.
virtual const char * readerWriterType() const override
Gets the type identifier for reader/writer operations.
virtual const char * xmlType() const override
Gets the XML type identifier for this instance.
Definition vortexInterfaceElementDescriptor.h:90
DtVortexInterfaceElementDescriptor & operator=(const DtVortexInterfaceElementDescriptor &orig)
Assignment operator.
virtual const DtString & dataType() const
Gets the data type of the parameter.
virtual const DtString & vortexName() const
Gets the Vortex parameter name.
DtRwBoolean myUseGeocentric
Definition vortexInterfaceElementDescriptor.h:101
DtVortexInterfaceElementDescriptor(const DtVortexInterfaceElementDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
static const char * theXmlType()
Gets the XML type identifier for serialization.
DtRwString myDataType
The data type of this parameter.
Definition vortexInterfaceElementDescriptor.h:97
DtVortexInterfaceElementDescriptor(const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
Constructor with element name and registry.
Defines export macros for the vreVrfVortexObjparam library.
#define VREVRFVORTEXOBJPARAM_DLL
Definition export.h:19
!
Definition glsVreMessageUtil.h:50
const char DtVortexInterfaceElementDescriptorType[]
Type identifier string for the DtVortexInterfaceElementDescriptor class.
Definition vortexInterfaceElementDescriptor.h:18
DtRwTemplatedListPtr< DtVortexInterfaceElementDescriptor, true > DtVortexInterfaceElementList
Type definition for a list of Vortex interface element descriptors.
Definition vortexInterfaceElementDescriptor.h:108