VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCustomReflectedEntityList.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvVrl/vrvVrl.h>
14 
15 #include <vl/reflectedEntityList.h>
16 #include <vl/reflectedEntity.h>
17 #include <vl/entityStateRepository.h>
18 #include <vl/globalObjectDesignator.h>
20 
21 
22 #ifndef DT_PROTOCOL_NAMESPACE
23 #error Namespace Protocol Macro DT_PROTOCOL_NAMESPACE not defined.
24 #endif
25 
26 class DtReflectedObject;
27 class DtBeginAppearanceEffectInter;
28 class DtStopAppearanceEffectInter;
29 class DtEndAppearanceEffectInter;
30 class DtExecuteGestureInter;
31 class DtEndGestureInter;
32 
33 namespace makVrv
34 {
35  namespace DT_PROTOCOL_NAMESPACE
36  {
37  class DtEntityElementProcessor;
39  class DtVrlinkConnection;
40 
42 
43 #ifdef DtHLA
45  {
46  public:
48  virtual void addRegion( DtDDMRegionSP regionToAdd ) = 0;
49 
51  virtual void removeRegion( DtDDMRegionSP regionToRemove ) = 0;
52  };
53 #endif
54 
55  template <typename ReflectedListClass,typename ReflectedEntityType,typename ReflectedEntityStateRepositoryType>
57 #ifdef DtHLA
59 #endif
60  {
61  public:
62 
65 
66 #if DtHLA
67  // CTOR for HLA
69  const DtDDMRegionSet& regionsToUse );
70 #endif
71 
74 
75 
79 
80 #if DtHLA
81  virtual DtReflectedObject* newReflectedObject( DtHlaObject* obj ) const;
85  virtual DtReflectedEntity* newReflectedEntity( DtHlaObject* obj ) const;
86 
91  virtual void removeAndDelete( DtReflectedEntity* entity, const char* msg = NULL ) override;
92 
93  virtual void addRegion(DtDDMRegionSP regionToAdd);
94 
95  virtual void removeRegion(DtDDMRegionSP regionToRemove);
96 
97  virtual void resolveOrphans();
98 #endif
99 
100 #if DtDIS
101 
107  const DtEntityIdentifier& id,
108  const DtEntityType& type) const;
109 
112  virtual void removeAndDelete(DtReflectedObject* obj, const char* msg = NULL) override;
113 #endif
114 
115  //Whenever an entity is added.
116  virtual void entityAdded(DtReflectedEntity* ent);
117 
118  // Callback to push extended data into DtEntityStateRepository attributes.
119  static void entityUpdatedCallback(DtReflectedEntity* ent, void* usr);
120  virtual void entityUpdated(DtReflectedEntity* ent);
121 
122 #if DtDIS
123 
124  virtual void processDiGuyPdu( const DtDIGuyCustomPdu& pdu );
125 
126 #elif DtHLA
127 
128  static void receivedBeginAppearanceEffectInteractionCb( DtBeginAppearanceEffectInter* inter, void* usr );
129  virtual void receivedBeginAppearanceEffectInteraction( DtBeginAppearanceEffectInter* inter );
130 
131  static void receivedStopAppearanceEffectInteractionCb( DtStopAppearanceEffectInter* inter, void* usr );
132  virtual void receivedStopAppearanceEffectInteraction( DtStopAppearanceEffectInter* inter );
133 
134  static void receivedEndAppearanceEffectInteractionCb( DtEndAppearanceEffectInter* inter, void* usr );
135  virtual void receivedEndAppearanceEffectInteraction( DtEndAppearanceEffectInter* inter );
136 
137  static void receivedExecuteGestureInteractionCb( DtExecuteGestureInter* inter, void* usr );
138  virtual void receivedExecuteGestureInteraction( DtExecuteGestureInter* inter );
139 
140  static void receivedEndGestureInteractionCb( DtEndGestureInter* inter, void* usr );
141  virtual void receivedEndGestureInteraction( DtEndGestureInter* inter );
142 
143 #endif
144 
145  protected:
146 
147  typedef std::map<DtReflectedEntity*, DtVrlinkEntityStateListener*> ReflectedEntityListenerMap;
148 
151 
152 #if DtHLA
153  typedef std::set<DtReflectedEntity*> DiscoveredSet;
155 #endif
156 
157  };
158 
162  {
163  public:
164 
166  static DtVrvEntityReflectedListCreator& instance( DtVrlinkConnection& conn );
167 
170  virtual DtReflectedEntityList* create( DtEntityElementProcessor& listener );
171 
172 #if DtHLA
173  virtual DtReflectedEntityList* create( DtEntityElementProcessor& listener,
175  const DtDDMRegionSet& );
176 #endif
177 
178  protected:
180 
182  const DtRwProperties& stateProperties() const;
183 
185  const DtRwProperties& parameterProperties() const;
186 
187  protected:
189  };
190  }
191 
192 }
Contains the DtReflectedExtEntityList class declaration.
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtCustomReflectedEntityList(DtEntityElementProcessor &listener)
CTOR.
virtual void resolveOrphans()
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
DiscoveredSet myDiscovered
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Definition: DtCustomReflectedEntityList.h:154
DtVrlinkConnection & myConnection
Definition: DtCustomReflectedEntityList.h:188
virtual void processDiGuyPdu(const DtDIGuyCustomPdu &pdu)
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
virtual DtReflectedObject * newReflectedObject(DtHlaObject *obj) const
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
virtual void addRegion(DtDDMRegionSP regionToAdd)=0
HLA specific DDM region add function.
virtual DtVrlinkEntityStateListener * findEntityStateListener(const DtGlobalObjectDesignator &objName)
Find the entity state listener for the given entity.
This class will create VRL specific interceptors to deal with network traffic for entities...
Definition: DtCustomReflectedEntityList.h:44
ReflectedEntityListenerMap myReflectedEntityListenerMap
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Definition: DtCustomReflectedEntityList.h:150
#define DT_PROTOCOL_NAMESPACE
Contains defines and includes header files for protocols.
Definition: vrfProtocol.h:13
#define DL_DLL_IGCONVRLINK
Definition: dllExport.h:26
virtual void removeRegion(DtDDMRegionSP regionToRemove)=0
HLA specific DDM region remove function.
virtual void entityUpdated(DtReflectedEntity *ent)
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Contains makVrv::DtVirtualBaseClass class.
Definition: DtCustomReflectedEntityList.h:56
std::map< DtReflectedEntity *, DtVrlinkEntityStateListener * > ReflectedEntityListenerMap
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Definition: DtCustomReflectedEntityList.h:147
static void entityUpdatedCallback(DtReflectedEntity *ent, void *usr)
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
std::set< DtReflectedEntity * > DiscoveredSet
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Definition: DtCustomReflectedEntityList.h:153
The DtEntityElementProcessor creates a reflected entity list, which calls on this class to create DtV...
Definition: DtEntityElementProcessor.h:48
virtual void addRegion(DtDDMRegionSP regionToAdd)
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
virtual void removeRegion(DtDDMRegionSP regionToRemove)
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
virtual void removeAndDelete(DtReflectedEntity *entity, const char *msg=NULL) override
Default calls down to base class version, but can be overridden.
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
DtEntityElementProcessor & myElementProcessor
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Definition: DtCustomReflectedEntityList.h:149
Contains DLL export macros.
virtual void entityAdded(DtReflectedEntity *ent)
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
VRVatnage reflected list creator class. Allows replacing the class of reflected entity list created b...
Definition: DtCustomReflectedEntityList.h:161
virtual DtReflectedEntity * newReflectedEntity(DtHlaObject *obj) const
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...

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)