VR-Link API Documentation for DIS
hReflectedObj.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #if DtHLA
8 
9 #ifndef DtHlaReflectedObject_H_
10 #define DtHlaReflectedObject_H_
11 
12 
13 #include "globalObjDes.h"
14 #include "hlaObjWithSR.h"
15 #include "refObjCbInfo.h"
16 #include "objectId.h"
17 
22 
25 class DT_DLL_VL DtHlaStateDecoder;
26 class DT_DLL_VL DtStateMsg;
28 
34 
36 {
37 
38 public:
39 
41  typedef DtStateRepository* (*DtBaseStateRepCreator)();
42 
43 public:
44 
47  DtStateRepository* stateRep);
48 
51  DtReflectedObject(DtHlaObject* obj,
52  DtExerciseConn* conn, DtBaseStateRepCreator creator);
53 
56  DtReflectedObject(const DtObjectId& id,
57  const DtGlobalObjectDesignator& des,
58  DtExerciseConn* conn, DtBaseStateRepCreator creator);
59 
61  virtual ~DtReflectedObject();
62 
65  virtual DtStateRepository* stateRep() const;
66 
68  virtual DtStateRepository* sr() const;
69 
72  virtual DtHlaStateDecoder* decoder();
73 
76  virtual DtHlaObjectWithStateRep* hlaObject() const;
77 
79  virtual const DtObjectId& objectId() const;
80 
82  virtual const DtObjectId& id() const;
83 
85  virtual const DtObjectId& localId() const;
86 
88  virtual const DtString& name() const;
89 
92  virtual const DtGlobalObjectDesignator& globalId() const;
93 
94 #if DtHLA_1516_EVOLVED
95 
96 
97 
98  virtual const DtString& lastProducingFederate() const;
99 #endif
100 
101 #if DtHLA_1516
102 
103 
104 
105 
106  virtual const std::set<DtDDMRegion>& lastRegionInformation() const;
107 #endif
108 
111  virtual DtTime lastSimTimeUpdated() const;
112 
113 
116  virtual DtTime lastReceivedTimeStamp() const;
117 
119  virtual void baseAddPostUpdateCallback(
120  DtReflectedObjectCallbackFunction cb, void* userData);
121  virtual void baseRemovePostUpdateCallback(
122  DtReflectedObjectCallbackFunction cb, void* userData);
123 
125  virtual DtReflectedObject* nextObj() const;
126 
128  virtual DtReflectedObject* prevObj() const;
129 
132  virtual DtReflectedObject* wrapNextObj() const;
133 
136  virtual DtReflectedObject* wrapPrevObj() const;
137 
142  void setHlaObject(DtHlaObject* obj,
143  DtHlaStateDecoder* decoder = NULL);
144 
147  virtual void setNoHlaObject(const DtObjectId& id,
148  const DtGlobalObjectDesignator& des);
149 
152  void detachHlaObject();
153 
155  virtual void requestUpdate();
156 
157 protected:
158 
161 
163  DtReflectedObject& operator=(const DtReflectedObject& orig);
164 
166  virtual void processPostUpdateCallbacks();
167 
168 protected:
169 
171  static void requestUpdatePostDrainCb(void* usr);
172 
174  static void processPostUpdateCallbacksCb(
175  const DtStateMsg& stateMsg,
176  DtHlaObject* obj,
177  void* usr);
178 
179 protected:
180 
181  DtExerciseConn* myExConn;
182  DtHlaObjectWithStateRep* myHlaObj;
183  DtStateRepository* myStateRep;
184  DtHlaStateDecoder* myDecoder;
185  bool myRequestCbRegistered;
186  DtIntrusiveList myStateUpdateCallbacks;
187  DtObjectId myId;
188  DtString myName;
189 };
190 
191 
192 inline const DtObjectId& DtReflectedObject::localId() const
193 {
194  return id();
195 }
196 
198 {
199  return myStateRep;
200 }
201 
203 {
204  return myStateRep;
205 }
206 
207 inline DtHlaObjectWithStateRep* DtReflectedObject::hlaObject() const
208 {
209  return myHlaObj;
210 }
211 
213 {
215 }
216 
218 {
220 }
221 
223 {
225 }
226 
228 {
230 }
231 
232 #endif
233 #endif
234 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)