VR-Forces 4.10 Class Documentation
 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) 2020 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 DtEntityExistenceListener;
39 
41 
42 #ifdef DtHLA
44  {
45  public:
47  virtual void addRegion( DtDDMRegionSP regionToAdd ) = 0;
48 
50  virtual void removeRegion( DtDDMRegionSP regionToRemove ) = 0;
51  };
52 #endif
53 
54  template <typename ReflectedListClass,typename ReflectedEntityType,typename ReflectedEntityStateRepositoryType>
56 #ifdef DtHLA
58 #endif
59  {
60  public:
61 
64 
65 #if DtHLA
66  // CTOR for HLA
68  const DtDDMRegionSet& regionsToUse );
69 #endif
70 
73 
74 
78 
79 #if DtHLA
80  virtual DtReflectedObject* newReflectedObject( DtHlaObject* obj ) const;
84  virtual DtReflectedEntity* newReflectedEntity( DtHlaObject* obj ) const;
85 
89  virtual void removeAndDelete( DtReflectedEntity* entity, char* msg = NULL );
90 
91  virtual void addRegion(DtDDMRegionSP regionToAdd);
92 
93  virtual void removeRegion(DtDDMRegionSP regionToRemove);
94 
95  virtual void resolveOrphans();
96 #endif
97 
98 #if DtDIS
99 
105  const DtEntityIdentifier& id,
106  const DtEntityType& type) const;
107 
110  virtual void removeAndDelete(DtReflectedObject* obj, char* msg = NULL);
111 #endif
112 
113  //Whenever an entity is added.
114  virtual void entityAdded(DtReflectedEntity* ent);
115 
116  // Callback to push extended data into DtEntityStateRepository attributes.
117  static void entityUpdatedCallback(DtReflectedEntity* ent, void* usr);
118  virtual void entityUpdated(DtReflectedEntity* ent);
119 
120 #if DtDIS
121 
122  virtual void processDiGuyPdu( const DtDIGuyCustomPdu& pdu );
123 
124 #elif DtHLA
125 
126  static void receivedBeginAppearanceEffectInteractionCb( DtBeginAppearanceEffectInter* inter, void* usr );
127  virtual void receivedBeginAppearanceEffectInteraction( DtBeginAppearanceEffectInter* inter );
128 
129  static void receivedStopAppearanceEffectInteractionCb( DtStopAppearanceEffectInter* inter, void* usr );
130  virtual void receivedStopAppearanceEffectInteraction( DtStopAppearanceEffectInter* inter );
131 
132  static void receivedEndAppearanceEffectInteractionCb( DtEndAppearanceEffectInter* inter, void* usr );
133  virtual void receivedEndAppearanceEffectInteraction( DtEndAppearanceEffectInter* inter );
134 
135  static void receivedExecuteGestureInteractionCb( DtExecuteGestureInter* inter, void* usr );
136  virtual void receivedExecuteGestureInteraction( DtExecuteGestureInter* inter );
137 
138  static void receivedEndGestureInteractionCb( DtEndGestureInter* inter, void* usr );
139  virtual void receivedEndGestureInteraction( DtEndGestureInter* inter );
140 
141 #endif
142 
143  protected:
144 
145  typedef std::map<DtReflectedEntity*, DtVrlinkEntityStateListener*> ReflectedEntityListenerMap;
146 
149 
150 #if DtHLA
151  typedef std::set<DtReflectedEntity*> DiscoveredSet;
153 #endif
154 
155  };
156 
157  }
158 
159 }
Contains the DtReflectedExtEntityList class declaration.
Instances of DtBeginAppearanceEffectInter are used to store state data for DIGuyInteraction.BeginAppearanceEffect interactions.
Definition: beginAppearanceEffectInterHLA.h:27
Instances of DtEndGestureInter are used to store state data for DIGuyInteraction.EndGesture interacti...
Definition: endGestureInterHLA.h:27
DtCustomReflectedEntityList(DtEntityExistenceListener &listener)
CTOR.
DiscoveredSet myDiscovered
Definition: DtCustomReflectedEntityList.h:152
virtual void processDiGuyPdu(const DtDIGuyCustomPdu &pdu)
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.
DtEntityExistenceListener & myListener
Definition: DtCustomReflectedEntityList.h:147
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:43
ReflectedEntityListenerMap myReflectedEntityListenerMap
Definition: DtCustomReflectedEntityList.h:148
virtual void removeRegion(DtDDMRegionSP regionToRemove)=0
HLA specific DDM region remove function.
virtual void entityUpdated(DtReflectedEntity *ent)
Contains makVrv::DtVirtualBaseClass class.
Definition: DtCustomReflectedEntityList.h:55
Instances of DtEndAppearanceEffectInter are used to store state data for DIGuyInteraction.EndAppearanceEffect interactions.
Definition: endAppearanceEffectInterHLA.h:27
std::map< DtReflectedEntity *, DtVrlinkEntityStateListener * > ReflectedEntityListenerMap
Definition: DtCustomReflectedEntityList.h:145
static void entityUpdatedCallback(DtReflectedEntity *ent, void *usr)
#define DT_PROTOCOL_NAMESPACE
Make VR-Vantage VRLink code export with library #ifdef DL_DLL_IGCONVRLINK #undef DL_DLL_IGCONVRLINK #...
Definition: export.h:32
std::set< DtReflectedEntity * > DiscoveredSet
Definition: DtCustomReflectedEntityList.h:151
Instances of DtExecuteGestureInter are used to store state data for DIGuyInteraction.ExecuteGesture interactions.
Definition: executeGestureInterHLA.h:27
virtual void addRegion(DtDDMRegionSP regionToAdd)
HLA specific DDM region add function.
virtual void removeRegion(DtDDMRegionSP regionToRemove)
HLA specific DDM region remove function.
The HLA 13 reflected entity list used by the driver to listen to reflected entities.
Definition: DtEntityExistenceListener.h:69
Contains DLL export macros.
virtual void entityAdded(DtReflectedEntity *ent)
virtual DtReflectedEntity * newReflectedEntity(DtHlaObject *obj) const

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)