VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reflectedEntityListHLA.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2014 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #if DtHLA
11 
12 #pragma once
13 
15 #include <vl/reflectedEntityHLA.h>
16 #include <vl/region.h>
17 #include <matrix/geodeticCoord.h>
18 #include <vector>
19 
20 class DtGeodeticRegion;
22 class DtReflectedDIGuyObjectList;
23 
39 {
40 public:
41 
48  DtExerciseConn* exConn,
49  bool smoothCapable = false,
50  const DtDDMRegionSet* regionSetToUse = 0 );
51 
53  DtExerciseConn* exConn,
54  const DtString& updateRateTag,
55  bool smoothCapable = false,
56  const DtDDMRegionSet* regionSetToUse = 0 );
57 
65 
67  DtExerciseConn* exConn,
68  const DtList *handleList,
69  bool smoothCapable = false,
70  const DtDDMRegionSet* regionSetToUse = 0 );
71 
73  DtExerciseConn* exConn,
74  const DtList *handleList,
75  const DtString& updateRateTag,
76  bool smoothCapable = false,
77  const DtDDMRegionSet* regionSetToUse = 0 );
78 
80  virtual ~DtReflectedEntityList();
81 
84  virtual DtReflectedEntity* lookup(
85 #if DtHLA_1516
86  RTI::ObjectInstanceHandle id);
87 #else
88  RTI::ObjectHandle id);
89 #endif
90 
93  virtual DtReflectedEntity* lookup(const DtGlobalObjectDesignator& objName);
94 
97  virtual DtReflectedEntity* lookup(const DtEntityIdentifier& entityId);
98 
102  virtual DtReflectedEntity* first() const;
103 
107  virtual DtReflectedEntity* last() const;
108 
112  virtual void addToObjectList(DtReflectedObject* refObj);
113 
117  virtual void addToEntityIdentifierHashList(DtReflectedEntity* ent);
118 
122  virtual void addEntityAdditionCallback(
123  DtEntityCallbackFunction cb, void* userData);
124 
128  virtual void removeEntityAdditionCallback(
129  DtEntityCallbackFunction cb, void* userData);
130 
134  virtual void addEntityRemovalCallback(
135  DtEntityCallbackFunction cb, void* userData);
136 
140  virtual void removeEntityRemovalCallback(
141  DtEntityCallbackFunction cb, void* userData);
142 
148  virtual void discoverOnlyWhenEntityTypeKnown(bool yesNo);
149 
150 protected:
151 
154  virtual const DtList* dfltHandleList();
155 
158  virtual DtReflectedObject* newReflectedObject(DtHlaObject* obj) const;
159 
162  virtual DtReflectedEntity* newReflectedEntity(DtHlaObject* obj) const;
163 
166  virtual void removeAndDelete(DtReflectedObject* object, char* msg);
167 
171  virtual void removeAndDelete(DtReflectedEntity* entity, char* msg = NULL);
172 
175  virtual void objectAdded(DtReflectedObject* obj);
176 
181  virtual void entityAdded(DtReflectedEntity* ent);
182 
185  virtual void initializeDIGuy();
186 
192  virtual void processDiGuyObjectAddition( DtReflectedDIGuyObject* beam );
193  virtual void processDiGuyObjectUpdate( DtReflectedDIGuyObject* beam );
194  virtual void processDiGuyObjectRemoval( DtReflectedDIGuyObject* beam );
195 
199  virtual void resolveOrphans();
200 
201 protected:
202 
206  static bool checkEntityType(DtReflectedObject* obj, void* usr);
207 
212  static void checkEntityId(DtReflectedEntity* ent, void* usr);
213 
217  static void diGuyObjectAdditionCb(
218  DtReflectedDIGuyObject* beam, void* usr );
219  static void diGuyObjectUpdateCb(
220  DtReflectedDIGuyObject* beam, void* usr );
221  static void diGuyObjectRemovalCb(
222  DtReflectedDIGuyObject* beam, void* usr );
223 
225  static void resolveOrphansPostDrainCb( void* usr );
226 
231  static bool delayDiGuyObjectDiscoveryCondition(
232  DtReflectedObject* beam, void* usr );
233 
234 private:
235 
238 
241 
242 protected:
243 
245  bool mySmoothCapable;
246 
248  DtHashlist myEntityIdentifierHashlist;
249 
250  std::set<DtReflectedDIGuyObject*> myOrphanDiGuyObjects;
251  DtReflectedDIGuyObjectList* myReflectedDiGuyObjects;
252 
253 };
254 
255 #endif // DtHLA
Instances of this class provide a protocol independent interface to a reflected entity in a DIS envir...
Definition: reflectedEntityDIS.h:39
Instances of DtReflectedObjectList are lists of instances of classes derived from DtReflectedObject...
Definition: reflectedObjectListDIS.h:38
Contains the HLA DtReflectedObjectList class declaration.
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:61
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
This file provides a definition of GeodeticCoords and several helper functions.
DtReflectedObjectList & operator=(const DtReflectedObjectList &orig)
assignment operator – not implemented
DtList is deprecated, please use std::list&lt;T&gt;.
Definition: vlList.h:71
Definition: reflectedDiGuyObject.h:115
Instances of DtReflectedObject are used to represent a simulation entity reflected across a network (...
Definition: reflectedObjectDIS.h:34
Instances of this class provide a protocol independent interface to a list of reflected entities in a...
Definition: reflectedEntityListDIS.h:31
void(* DtEntityCallbackFunction)(DtReflectedEntity *obj, void *userData)
Callback function that takes a DtReflectedEntity and user data.
Definition: reflectedEntityDIS.h:33
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
virtual void removeAndDelete(DtReflectedObject *obj, char *msg=NULL)
Remove the remote object from the list if found and delete it.
DtHashlist is deprecated and provided for backwards compatibility only.
Definition: vlHashlist.h:69
virtual void objectAdded(DtReflectedObject *object)
Called after a remote object has been added to the list.
Instances of DtString are used to represent strings.
Definition: vlString.h:29

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)