VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfObjectDataState.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include <vrfGuiCore/vrfGuiCore.h>
15 
16 #include <vrvCore/DtSimState.h>
17 #include <vrvCore/DtStateView.h>
21 #include <vrvUtil/DtMessage.h>
23 #include <vlutil/vlString.h>
24 #include <matrix/vlVector.h>
25 #include <vector>
26 #include <string>
27 
28 namespace makVrv
29 {
30  class DtMessage;
31 }
32 
33 namespace makVrf
34 {
36  {
37  int myType;
38  double myRange;
40  std::string myName;
41  int myColor;
42  std::vector<double> myWedgeSizes;
43 
44  void getColor(float& r, float& g, float& b, float& a) const
45  {
46  a = (float)((myColor & 0xFF000000) >> 24) / 255.0;
47  r = (float)((myColor & 0x00FF0000) >> 16) / 255.0f;
48  g = (float)((myColor & 0x0000FF00) >> 8) / 255.0f;
49  b = (float)(myColor & 0x000000FF) / 255.0f;
50  }
51 
52  bool operator==(const DtRangeItem& rhs) const
53  {
54  return ((myType == rhs.myType) &&
55  (myRange == rhs.myRange) &&
56  (myName == rhs.myName) &&
57  (myColor == rhs.myColor) &&
58  (myWedgeSizes == rhs.myWedgeSizes) &&
59  (myOffsetPosition == rhs.myOffsetPosition));
60  }
61  };
62 
65  {
66  public:
70 
73 
74  bool operator==(const DtVrfNetworkUpdateObjectDataState& rhs) const;
75 
77  {
78  return !(*this == rhs);
79  }
80 
81  public:
82  std::string myObjectType;
83  std::string myObjectLabel;
84  std::string myEchelonIdString;
85  std::string myOverlayParent;
86  std::string myUUID;
87  std::map<std::string, std::string> myExtendedData;
95  bool myHasPlan;
98  std::string myRulesOfEngagement;
101  std::vector<DtRangeItem> myRangeItems;
103  std::string myDIGuyAnimation;
104  std::string myDIGuyHandItem;
105 
107  std::map<int, uintptr_t> myStateDataUpdateBuffers;
108  std::map<int, uintptr_t> myGuiStateDataUpdateBuffers;
109  };
110 
112  {
113 
114  public:
115 
119 
121  virtual ~DtVrfObjectDataState();
122 
123  DtVrfObjectDataState& operator=(const DtVrfObjectDataState&);
125  bool operator==(const DtVrfObjectDataState&) const;
126  bool operator!=(const DtVrfObjectDataState& rhs) const
127  {
128  return !(*this == rhs);
129  }
130 
131  public:
135  };
136 
139 
142 
145 
148 
149  template <typename T> makVrv::DtMessage& operator << (makVrv::DtMessage& msg, const std::vector<T>& t)
150  {
151  msg << t.size();
152 
153  typename std::vector<T>::const_iterator iter = t.begin();
154 
155  while (iter != t.end())
156  {
157  msg << (*iter);
158  ++iter;
159  }
160 
161  return msg;
162  }
163 
164  template <typename K, typename V> makVrv::DtMessage& operator << (makVrv::DtMessage& msg, const std::map<K, V>& t)
165  {
166  msg << t.size();
167 
168  typename std::map<K, V>::const_iterator iter = t.begin();
169 
170  while (iter != t.end())
171  {
172  msg << iter->first;
173  msg << iter->second;
174  ++iter;
175  }
176 
177  return msg;
178  }
179 
180  template <typename T> makVrv::DtMessage& operator >> (makVrv::DtMessage& msg, std::vector<T>& t)
181  {
182  size_t iLimit;
183  size_t i;
184  msg >> iLimit;
185 
186  for (i = 0; i < iLimit; i++)
187  {
188  T item;
189 
190  msg >> item;
191  t.push_back(item);
192  }
193 
194  return msg;
195  }
196 
197  template <typename K, typename V> makVrv::DtMessage& operator >> (makVrv::DtMessage& msg, std::map<K, V>& t)
198  {
199  size_t iLimit;
200  size_t i;
201  msg >> iLimit;
202 
203  for (i = 0; i < iLimit; i++)
204  {
205  K key;
206  V value;
207 
208  msg >> key;
209  msg >> value;
210  t[key] = value;
211  }
212 
213  return msg;
214  }
215 
218 
221 
225  {
226  public:
228  makVrv::DtStateViewCollection<DtVrfObjectDataState>(de, makVrv::DtSimEntryUpdater::NoUpdates)
229  {
230  }
231  };
232 }
bool myVrfSimulated
Definition: vrfObjectDataState.h:94
bool operator!=(const DtVrfObjectDataState &rhs) const
Definition: vrfObjectDataState.h:126
std::string myDIGuyHandItem
Definition: vrfObjectDataState.h:104
Contains makVrv::DtStateViewCollection class.
std::map< std::string, std::string > myExtendedData
Definition: vrfObjectDataState.h:87
The IGI Message.
Definition: DtMessage.h:33
DT_DLL_VRFGUICORE makVrv::DtMessage & operator<<(makVrv::DtMessage &msg, const DtVrlinkNetworkUpdateSimulatedAggregateState &state)
Encode a DtVrlinkSimulatedEnvironmentState into a DtMessage.
A DtSimObjectEntryCollection is a collection of DtSimObjectEntry&#39;s that have a specific state...
Definition: DtSimObjectEntryCollection.h:25
bool myStatePropertiesInitialized
Definition: vrfObjectDataState.h:132
DtVrfObjectDataStateViewCollection(makVrv::DtDe &de)
Definition: vrfObjectDataState.h:227
Contains DtSimObjectEntryCollection class.
bool myStatePropertiesUpdated
Definition: vrfObjectDataState.h:134
std::vector< DtRangeItem > myRangeItems
Definition: vrfObjectDataState.h:101
Contains makVrv::DtStateView class.
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
std::string myObjectType
Definition: vrfObjectDataState.h:82
The class that is the interface between the GUI and the back-end.
Definition: vrfObjectDataState.h:64
int myType
Definition: vrfObjectDataState.h:37
std::string myObjectLabel
Definition: vrfObjectDataState.h:83
std::string myStatePropertiesName
Definition: vrfObjectDataState.h:102
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
bool myExecutingPlan
Definition: vrfObjectDataState.h:96
std::string myName
Definition: vrfObjectDataState.h:40
std::string myDIGuyAnimation
Definition: vrfObjectDataState.h:103
DtVector myBoundingVolumeOffset
Definition: vrfObjectDataState.h:100
bool myIndependentlyTasked
Definition: vrfObjectDataState.h:91
bool myIsSubordinateOfForce
Definition: vrfObjectDataState.h:90
int myColor
Definition: vrfObjectDataState.h:41
bool myUnderFire
Definition: vrfObjectDataState.h:93
bool operator!=(const DtVrfNetworkUpdateObjectDataState &rhs) const
Definition: vrfObjectDataState.h:76
A DtStateView is a the interface to simulation state information.
Definition: DtStateView.h:52
A DtStateViewCollection is a collection of DtStateViews of a specific state.
Definition: DtStateViewCollection.h:27
std::map< int, uintptr_t > myGuiStateDataUpdateBuffers
Definition: vrfObjectDataState.h:108
double myRange
Definition: vrfObjectDataState.h:38
std::string myEchelonIdString
Definition: vrfObjectDataState.h:84
makVrv::DtSimObjectEntryCollection< DtVrfNetworkUpdateObjectDataState > DtVrfObjectDataStateCollection
Create a DtSimObjectEntryCollection templated on DtVrfNetworkUpdateObjectDataState.
Definition: vrfObjectDataState.h:220
Collection of VRF Object specific state data.
Definition: vrfObjectDataState.h:224
bool myHasPlan
Definition: vrfObjectDataState.h:95
std::string myRulesOfEngagement
Definition: vrfObjectDataState.h:98
char myVrfObjectDataVersion
Definition: vrfObjectDataState.h:92
int myVrfMessageVersionSupported
Definition: vrfObjectDataState.h:89
makVrv::DtStateView< DtVrfObjectDataState > DtVrfObjectDataStateView
Create a DtStateView templated on DtVrfNetworkUpdateObjectDataState.
Definition: vrfObjectDataState.h:217
DtVector myBoundingVolume
Definition: vrfObjectDataState.h:99
size_t size() const
Get the current size of the message in bytes.
DtRwProperties myStateProperties
Definition: vrfObjectDataState.h:133
std::vector< double > myWedgeSizes
Definition: vrfObjectDataState.h:42
A DtSimState is the base class for all state objects.
Definition: DtSimState.h:22
Definition: vrfObjectDataState.h:35
A list of properties.
Definition: rwProperties.h:126
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
std::string myUUID
Definition: vrfObjectDataState.h:86
bool operator==(const DtRangeItem &rhs) const
Definition: vrfObjectDataState.h:52
void getColor(float &r, float &g, float &b, float &a) const
Definition: vrfObjectDataState.h:44
Contains makVrv::DtSimState class.
std::string myOverlayParent
Definition: vrfObjectDataState.h:85
std::map< int, uintptr_t > myStateDataUpdateBuffers
Once updated this data will be deleted by the main thread.
Definition: vrfObjectDataState.h:107
int myVrfSessionId
Definition: vrfObjectDataState.h:88
DtVector myOffsetPosition
Definition: vrfObjectDataState.h:39
bool myIsCurrentlyTasked
Definition: vrfObjectDataState.h:97
DT_DLL_VRFGUICORE makVrv::DtMessage & operator>>(makVrv::DtMessage &msg, DtVrlinkSimulatedAggregateState &state)
Decode a DtVrlinkSimulatedEnvironmentState from a DtMessage.
Definition: vrfObjectDataState.h:111
Contains additional type to message encoding functions.

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)