VR-Link API Documentation for DIS
hStateMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
9 
10 #ifndef hDtStateMsg_H_
11 #define hDtStateMsg_H_
12 
13 #if DtHLA
14 
15 
16 #include <vlutil/vlTimeStampType.h>
17 
18 #include <vlutil/vlString.h>
19 #include <vlutil/vlTime.h>
20 #include "rtiNamespace.h"
21 #include <vl/region.h>
22 
23 
24 class DT_DLL_VL DtHlaObject;
26 
27 
32 
34 {
35 public:
36 
37 
39  DtStateMsg(
40  objHandle id,
41  const HandleValueMap& attrs
42  );
43 
45  DtStateMsg(
46  objHandle id,
47  HandleValueMap* attrs
48  );
49 
50 
52  virtual ~DtStateMsg();
53 
55  DtStateMsg(const DtStateMsg& orig);
56 
58  DtStateMsg& operator=(const DtStateMsg& orig);
59 
61  virtual objHandle objectId() const;
62 
64  virtual const HandleValueMap& handleMap() const;
65 
67  virtual HandleValueMap* handleMap();
68 
69 #if DtHLA_1516
70 
72  virtual void setTag(const RTI::VariableLengthData& tag);
73  virtual void setCustomTag(const RTI::VariableLengthData& tag);
74  virtual const RTI::VariableLengthData& tag() const;
75 
76  #if DtHLA_1516_EVOLVED
77 
78 
79 
80  virtual const DtString& producingFederate() const;
81 
84  virtual void setProducingFederate(const DtString& fedHandle);
85  #endif
86 #else
87 
89  virtual void setTag(const DtString& tag);
90  virtual void setCustomTag(const DtString& tag);
91  virtual const DtString& tag() const;
92 
93 #endif
94 
96  virtual bool customTagSet() const;
97 
99  virtual void print(DtExerciseConn* exConn,
100  RTI::ObjectClassHandle h) const;
101 
103  virtual void printToStream(std::ostream& stream,DtExerciseConn* exConn,
104  RTI::ObjectClassHandle h) const;
105 
107  virtual void printHeader(DtExerciseConn* exConn,
108  RTI::ObjectClassHandle classHandle) const;
109 
111  virtual void printHeaderToStream(std::ostream& stream, DtExerciseConn* exConn,
112  RTI::ObjectClassHandle classHandle) const;
113 
115  virtual void printAttrs(DtExerciseConn* exConn,
116  RTI::ObjectClassHandle classHandle, int withHex) const;
117 
119  virtual void printAttrsToStream(std::ostream& stream, DtExerciseConn* exConn,
120  RTI::ObjectClassHandle classHandle, int withHex) const;
121 
123  virtual void print(DtHlaObject *obj,
124  bool fullReport = true) const;
125 
126 
127 
131  virtual void setTimeStamp(DtTime time,
133 
136  virtual DtTime timeStamp() const;
137 
139  virtual DtTimeStampType timeStampType() const;
140 
145  virtual DtTime guessTimeValid(DtTime referenceTime) const;
146 
148 
149 #if DtHLA_1516
150  virtual const std::set<DtDDMRegion>* region() const;
151  virtual void setRegion(const std::set<DtDDMRegion>& regions);
152 #else
153  virtual const DtDDMRegion* region() const;
154  virtual void setRegion(const DtDDMRegion& region);
155 #endif
156 
157 
158 public:
159 
163  static void setTagIsAsciiTime(bool val);
164  static bool tagIsAsciiTime();
165 
166 protected:
167 
168 #if DtHLA_1516
169  HandleValueMap* myAvList;
170  objHandle myId;
171  RTI::VariableLengthData myTag;
172  #if DtHLA_1516_EVOLVED
173  DtString myProducingFederateName;
174  #endif
175 #else
176  HandleValueMap* myAvList;
177  DtString myTag;
178  objHandle myId;
179 #endif
180  DtTime myTime;
181  DtTimeStampType myTimeType;
182  bool myCustomTagSet;
183 
184 #if DtHLA_1516
185  // 1516
186  std::set<DtDDMRegion>* myRegion;
187 #else
188  // 13
189  DtDDMRegion* myRegion;
190 #endif
191 
192 
193 protected:
194 
195  static bool theTagIsAsciiTime;
196 };
197 
198 inline const HandleValueMap& DtStateMsg::handleMap() const
199 {
200  return *myAvList;
201 }
202 
203 inline HandleValueMap* DtStateMsg::handleMap()
204 {
205  return myAvList;
206 }
207 
208 
209 inline objHandle DtStateMsg::objectId() const
210 {
211  return myId;
212 }
213 
214 #endif
215 #endif
216 

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)