VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrlinkCommandInteractionTranslator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 #include <vl/interaction.h>
12 
14 
15 namespace makVrf
16 {
25  {
26  public:
27 
28  using EventPtr = std::unique_ptr<makVrfEvents::DtEvent>;
29  using EventList = std::vector<EventPtr>;
30 
34  using ConverterFcn = std::function<EventList(const DtInteraction*, DtCommunicationManager* commMgr)>;
35 
38 
40  virtual ~DtVrlinkCommandInteractionTranslator() override;
41 
43  virtual void init(DtVrlinkNetworkInterface*) override;
44 
48  template <typename InteractionType>
49  void addConversionFunction(ConverterFcn fcn);
50 
52  template <typename InteractionType>
53  void removeConversionFunction();
54 
56  virtual void registerDefaultConversions();
57 
59  virtual void clearConversionFunctions();
60 
62  virtual DtVrlinkNetworkInterface* networkInterface();
63 
64 #if DtHLA
65  virtual EventList defaultNetnEtrMoveToLocationConverter(const DtInteraction* inter,
69  DtCommunicationManager* commMgr);
70 
74  virtual EventList defaultNetnEtrMagicMoveConverter(const DtInteraction* inter,
75  DtCommunicationManager* commMgr);
76 
80  virtual EventList defaultNetnEtrMagicResourceConverter(const DtInteraction* inter,
81  DtCommunicationManager* commMgr);
82 
86  virtual EventList defaultNetnEtrFireAtEntityConverter(const DtInteraction* inter,
87  DtCommunicationManager* commMgr);
88 
92  virtual EventList defaultNetnEtrFireAtLocationConverter(const DtInteraction* inter,
93  DtCommunicationManager* commMgr);
94 
98  virtual EventList defaultNetnEtrMountConverter(const DtInteraction* inter,
99  DtCommunicationManager* commMgr);
100 
104  virtual EventList defaultNetnEtrDismountConverter(const DtInteraction* inter,
105  DtCommunicationManager* commMgr);
106 
110  virtual EventList defaultNetnEtrSetOrderedSpeedConverter(const DtInteraction* inter,
111  DtCommunicationManager* commMgr);
112 
116  virtual EventList defaultNetnEtrSetOrderedAltitudeConverter(const DtInteraction* inter,
117  DtCommunicationManager* commMgr);
118 
122  virtual EventList defaultNetnEtrSetRulesOfEngagementConverter(const DtInteraction* inter,
123  DtCommunicationManager* commMgr);
124 #endif
125 
126  protected:
127 
130  virtual bool processEvent(const makVrfEvents::DtEvent&) override { return true; };
131 
132  protected:
133 
135  {
136  public:
138 
139  protected:
141  : myFcn(fcn), myTranslator(converter) {};
142 
144  {
145  myFcn = fcn;
146  myTranslator = converter;
147  }
148 
151  };
152 
153  template <typename InteractionType>
155  {
156  public:
157 
159 
161 
162  protected:
163 
164  void registerCallback();
165 
166  void unregisterCallback();
167 
168  static void processInteractionCallback(InteractionType* inter, void* converter);
169 
170  void processInteraction(InteractionType* inter);
171  };
172 
173  using ConverterPtr = std::unique_ptr<InteractionConverterBase>;
174  using ConverterList = std::vector<ConverterPtr>;
176 
177  };
178 
179 }
180 
181 #include <vrlinkNetworkInterface/vrlinkCommandInteractionTranslator.inl>
Definition: event.h:13
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:54
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)