VR-Forces 4.8 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) 2016 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>
19 
20 
21 #ifndef DT_PROTOCOL_NAMESPACE
22 #error Namespace Protocol Macro DT_PROTOCOL_NAMESPACE not defined.
23 #endif
24 
25 class DtReflectedObject;
30 class DtEndGestureInter;
31 
32 
33 namespace makVrv
34 {
35  namespace DT_PROTOCOL_NAMESPACE
36  {
38 
39 #ifdef DtHLA
41  {
42  public:
44  virtual void addRegion( DtDDMRegionSP regionToAdd ) = 0;
45 
47  virtual void removeRegion( DtDDMRegionSP regionToRemove ) = 0;
48  };
49 #endif
50 
51  template <typename ReflectedListClass,typename ReflectedEntityType,typename ReflectedEntityStateRepositoryType>
53 #ifdef DtHLA
55 #endif
56  {
57  public:
58 
61 
62 #if DtHLA
63  // CTOR for HLA
65  const DtDDMRegionSet& regionsToUse );
66 #endif
67 
70 
71 
72 #if DtHLA
73  virtual DtReflectedObject* newReflectedObject( DtHlaObject* obj ) const;
77  virtual DtReflectedEntity* newReflectedEntity( DtHlaObject* obj ) const;
78 
82 
86  virtual void removeAndDelete( DtReflectedEntity* entity, char* msg = NULL );
87 
88  virtual void addRegion(DtDDMRegionSP regionToAdd);
89 
90  virtual void removeRegion(DtDDMRegionSP regionToRemove);
91 
92  virtual void resolveOrphans();
93 #endif
94 
95 #if DtDIS
96 
102  const DtEntityIdentifier& id,
103  const DtEntityType& type) const;
104 
107  virtual void removeAndDelete(DtReflectedObject* obj, char* msg = NULL);
108 #endif
109 
110  //Whenever an entity is added.
111  virtual void entityAdded(DtReflectedEntity* ent);
112 
113  // Callback to push extended data into DtEntityStateRepository attributes.
114  static void entityUpdatedCallback(DtReflectedEntity* ent, void* usr);
115  virtual void entityUpdated(DtReflectedEntity* ent);
116 
117 #if DtDIS
118 
119  virtual void processDiGuyPdu( const DtDIGuyCustomPdu& pdu );
120 
121 #elif DtHLA
122 
123  static void receivedBeginAppearanceEffectInteractionCb( DtBeginAppearanceEffectInter* inter, void* usr );
124  virtual void receivedBeginAppearanceEffectInteraction( DtBeginAppearanceEffectInter* inter );
125 
126  static void receivedStopAppearanceEffectInteractionCb( DtStopAppearanceEffectInter* inter, void* usr );
127  virtual void receivedStopAppearanceEffectInteraction( DtStopAppearanceEffectInter* inter );
128 
129  static void receivedEndAppearanceEffectInteractionCb( DtEndAppearanceEffectInter* inter, void* usr );
130  virtual void receivedEndAppearanceEffectInteraction( DtEndAppearanceEffectInter* inter );
131 
132  static void receivedExecuteGestureInteractionCb( DtExecuteGestureInter* inter, void* usr );
133  virtual void receivedExecuteGestureInteraction( DtExecuteGestureInter* inter );
134 
135  static void receivedEndGestureInteractionCb( DtEndGestureInter* inter, void* usr );
136  virtual void receivedEndGestureInteraction( DtEndGestureInter* inter );
137 
138 #endif
139 
140  protected:
141 
142  typedef std::map<DtReflectedEntity*, DtVrlinkEntityStateListener*> ReflectedEntityListenerMap;
143 
146 
147 #if DtHLA
148  typedef std::set<DtReflectedEntity*> DiscoveredSet;
150 #endif
151 
152  };
153 
154  }
155 
156 }
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:149
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:144
This class will create VRL specific interceptors to deal with network traffic for entities...
Definition: DtCustomReflectedEntityList.h:40
ReflectedEntityListenerMap myReflectedEntityListenerMap
Definition: DtCustomReflectedEntityList.h:145
virtual void removeRegion(DtDDMRegionSP regionToRemove)=0
HLA specific DDM region remove function.
virtual void entityUpdated(DtReflectedEntity *ent)
Contains makVrv::DtVirtualBaseClass class.
Definition: DtCustomReflectedEntityList.h:52
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:142
virtual DtVrlinkEntityStateListener * findEntityStateListener(const DtString &objName)
Find the entity state listener for the given entity.
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:148
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:65
Contains DLL export macros.
virtual void entityAdded(DtReflectedEntity *ent)
virtual DtReflectedEntity * newReflectedEntity(DtHlaObject *obj) const

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)