VR-Engage  2.3
Loading...
Searching...
No Matches
connector.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file connector.h
7//! \brief Defines the DtConnector base class for simulation protocol connections
8//!
9//! This file contains the base class for all connectors in VR-Engage. Connectors
10//! handle communication between the application and external simulation protocols
11//! like DIS and HLA. They provide a consistent interface for sending and receiving
12//! simulation data regardless of the underlying protocol implementation.
13
14#pragma once
15
17
19
20#include "vreUtil/attribute.h"
21
22#include <string>
23
24namespace makVre
25{
26//! \brief Base class for simulation protocol connectors
27//!
28//! DtConnector serves as the foundation for all connector classes that
29//! interface with external simulation protocols. Connectors are responsible
30//! for translating between internal VR-Engage messages and protocol-specific
31//! data formats. Each supported protocol (DIS, HLA, etc.) has its own
32//! connector implementation.
34{
35public:
36 //! \brief Enumeration of supported connector types
37 //!
38 //! Defines the simulation protocols supported by VR-Engage.
40 {
41 DIS, //!< Distributed Interactive Simulation protocol
42 HLA13, //!< High Level Architecture 1.3 protocol
43 HLA1516, //!< High Level Architecture 1516 protocol
44 HLA1516E, //!< High Level Architecture 1516e protocol
45 HLA4 //!< High Level Architecture 4 (2025) protocol
46 };
47
48 //! \brief Constructor
49 //!
50 //! Creates a connector instance with default values.
52
53 //! \brief Virtual destructor
54 //!
55 //! Ensures proper cleanup of derived connector classes.
56 virtual ~DtConnector();
57
58 //! \brief Gets the connector type
59 //! \return The connector type (protocol) enumeration value
60 //!
61 //! Returns the protocol type this connector implements.
62 virtual DtConnectorType type() { return myType; }
63
64 //! \brief Gets the connector name
65 //! \return String containing the connector name
66 //!
67 //! Returns the name of this connector instance.
68 virtual std::string name() { return myName; }
69
70
71 //! \brief Gets the file extension for a specific connector type
72 //! \param type The connector type to get the extension for
73 //! \return String containing the file extension
74 //!
75 //! Returns the standard file extension associated with the specified
76 //! connector type (protocol). Used for identifying protocol-specific files.
77 static std::string extension(DtConnectorType type);
78
79protected:
80 //! \brief Connector instance name
81 std::string myName;
82
83 //! \brief Connector type (protocol)
85
86 //! \brief Member-scope instance of Attribute callback manager
87 //!
88 //! Used to manage Attribute change callback connections and ensure that all
89 //! callbacks are unregistered when this class instance is destroyed.
91
92 //! \brief Member-scope instance of message handler group
93 //!
94 //! Used to manage message handler connections for this component. Handlers connected
95 //! through this group will be automatically disconnected when this component is destroyed.
97};
98
99} // namespace makVre
Provides attribute handling system for hierarchical data storage and manipulation.
Convenience manager that owns and organises a collection of attribute callbacks.
Definition attributeCallback.h:223
std::string myName
Connector instance name.
Definition connector.h:81
virtual DtConnectorType type()
Gets the connector type.
Definition connector.h:62
DtConnector()
Constructor.
DtConnectorType
Enumeration of supported connector types.
Definition connector.h:40
@ DIS
Distributed Interactive Simulation protocol.
Definition connector.h:41
@ HLA1516E
High Level Architecture 1516e protocol.
Definition connector.h:44
@ HLA4
High Level Architecture 4 (2025) protocol.
Definition connector.h:45
@ HLA1516
High Level Architecture 1516 protocol.
Definition connector.h:43
@ HLA13
High Level Architecture 1.3 protocol.
Definition connector.h:42
DtConnectorType myType
Connector type (protocol)
Definition connector.h:84
static std::string extension(DtConnectorType type)
Gets the file extension for a specific connector type.
DtAttributeCallbackManager myAttributeCallbacks
Member-scope instance of Attribute callback manager.
Definition connector.h:90
virtual std::string name()
Gets the connector name.
Definition connector.h:68
DtVreMessageHandlerGroup myMessageHandlers
Member-scope instance of message handler group.
Definition connector.h:96
virtual ~DtConnector()
Virtual destructor.
Manager class for connecting message handlers to message types.
Definition vreMessageManager.h:292
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
!
Definition glsVreMessageUtil.h:50
Defines the central message manager for the VREngage messaging system.