VR-Forces 5.0.2 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;
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 
78  virtual DtVrlinkEntityStateListener* findEntityStateListener(const DtGlobalObjectDesignator& objName);
79 
80 #if DtHLA
81  virtual DtReflectedObject* newReflectedObject( DtHlaObject* obj ) const;
85  virtual DtReflectedEntity* newReflectedEntity( DtHlaObject* obj ) const;
86 
90  virtual void removeAndDelete( DtReflectedEntity* entity, char* msg = NULL );
91 
92  virtual void addRegion(DtDDMRegionSP regionToAdd);
93 
94  virtual void removeRegion(DtDDMRegionSP regionToRemove);
95 
96  virtual void resolveOrphans();
97 #endif
98 
99 #if DtDIS
100 
106  const DtEntityIdentifier& id,
107  const DtEntityType& type) const;
108 
111  virtual void removeAndDelete(DtReflectedObject* obj, char* msg = NULL);
112 #endif
113 
114  //Whenever an entity is added.
115  virtual void entityAdded(DtReflectedEntity* ent);
116 
117  // Callback to push extended data into DtEntityStateRepository attributes.
118  static void entityUpdatedCallback(DtReflectedEntity* ent, void* usr);
119  virtual void entityUpdated(DtReflectedEntity* ent);
120 
121 #if DtDIS
122 
123  virtual void processDiGuyPdu( const DtDIGuyCustomPdu& pdu );
124 
125 #elif DtHLA
126 
127  static void receivedBeginAppearanceEffectInteractionCb( DtBeginAppearanceEffectInter* inter, void* usr );
128  virtual void receivedBeginAppearanceEffectInteraction( DtBeginAppearanceEffectInter* inter );
129 
130  static void receivedStopAppearanceEffectInteractionCb( DtStopAppearanceEffectInter* inter, void* usr );
131  virtual void receivedStopAppearanceEffectInteraction( DtStopAppearanceEffectInter* inter );
132 
133  static void receivedEndAppearanceEffectInteractionCb( DtEndAppearanceEffectInter* inter, void* usr );
134  virtual void receivedEndAppearanceEffectInteraction( DtEndAppearanceEffectInter* inter );
135 
136  static void receivedExecuteGestureInteractionCb( DtExecuteGestureInter* inter, void* usr );
137  virtual void receivedExecuteGestureInteraction( DtExecuteGestureInter* inter );
138 
139  static void receivedEndGestureInteractionCb( DtEndGestureInter* inter, void* usr );
140  virtual void receivedEndGestureInteraction( DtEndGestureInter* inter );
141 
142 #endif
143 
144  protected:
145 
146  typedef std::map<DtReflectedEntity*, DtVrlinkEntityStateListener*> ReflectedEntityListenerMap;
147 
150 
151 #if DtHLA
152  typedef std::set<DtReflectedEntity*> DiscoveredSet;
154 #endif
155 
156  };
157 
161  {
162  public:
163 
165  static DtVrvEntityReflectedListCreator& instance( DtVrlinkConnection& conn );
166 
169  virtual DtReflectedEntityList* create( DtEntityElementProcessor& listener );
170 
171 #if DtHLA
172  virtual DtReflectedEntityList* create( DtEntityElementProcessor& listener,
174  const DtDDMRegionSet& );
175 #endif
176 
177  protected:
179 
180  protected:
182  };
183  }
184 
185 }
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
Instances of DtBeginAppearanceEffectInter are used to store state data for DIGuyInteraction.BeginAppearanceEffect interactions.
Definition: beginAppearanceEffectInterHLA.h:27
DtCustomReflectedEntityList(DtEntityElementProcessor &listener)
CTOR.
Instances of DtEndGestureInter are used to store state data for DIGuyInteraction.EndGesture interacti...
Definition: endGestureInterHLA.h:27
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:153
DtVrlinkConnection & myConnection
Definition: DtCustomReflectedEntityList.h:181
virtual void processDiGuyPdu(const DtDIGuyCustomPdu &pdu)
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Instances of DtStopAppearanceEffectInter are used to store state data for DIGuyInteraction.StopAppearanceEffect interactions.
Definition: stopAppearanceEffectInterHLA.h:27
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 removeAndDelete(DtReflectedEntity *entity, char *msg=NULL)
Default calls down to base class version, but can be overridden.
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:149
#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...
#define DT_PROTOCOL_NAMESPACE
Contains DLL export macros.
Definition: vrfDis.h:17
Contains makVrv::DtVirtualBaseClass class.
Definition: DtCustomReflectedEntityList.h:56
Instances of DtEndAppearanceEffectInter are used to store state data for DIGuyInteraction.EndAppearanceEffect interactions.
Definition: endAppearanceEffectInterHLA.h:27
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:146
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:152
Instances of DtExecuteGestureInter are used to store state data for DIGuyInteraction.ExecuteGesture interactions.
Definition: executeGestureInterHLA.h:27
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...
DtEntityElementProcessor & myElementProcessor
Methods to create VR-Vantage specific listeners and objects to support VR-Vantage and possible VR-For...
Definition: DtCustomReflectedEntityList.h:148
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:160
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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)