VR-Engage  2.2
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 //! \brief Gets the type identifier for reader/writer operations
75 //! \return Type identifier string
76 virtual const char* readerWriterType() const override;
77
78 //! \brief Gets the XML type identifier for serialization
79 //! \return XML type identifier string used when archiving to an XML stream
80 static const char* theXmlType();
81
82 //! \brief Gets the XML type identifier for this instance
83 //! \return XML type identifier string
84 virtual const char* xmlType() const override { return theXmlType(); }
85
86protected:
87 //! \brief The parameter name in the Vortex physics engine
88 DtRwString myVortexName;
89
90 //! \brief The data type of this parameter
91 DtRwString myDataType;
92};
93
94//! \brief Type definition for a list of Vortex interface element descriptors
95//!
96//! This list template specialization manages ownership of the descriptors
97//! and handles proper deletion when the list is destroyed
98using DtVortexInterfaceElementList = DtRwTemplatedListPtr<DtVortexInterfaceElementDescriptor, true>;
99} // namespace makVre
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:88
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:84
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.
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:91
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
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
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:98