VR-Forces 4.10 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>
20 #include <vrvUtil/DtMessage.h>
22 #include <vlutil/vlString.h>
23 #include <matrix/vlVector.h>
24 #include <vector>
25 #include <string>
26 
27 namespace makVrv
28 {
29  class DtMessage;
30 }
31 
32 namespace makVrf
33 {
35  {
36  int myType;
37  double myRange;
39  std::string myName;
40  int myColor;
41  std::vector<double> myWedgeSizes;
42 
43  void getColor(float& r, float& g, float& b, float& a) const
44  {
45  a = (float)((myColor & 0xFF000000) >> 24) / 255.0;
46  r = (float)((myColor & 0x00FF0000) >> 16) / 255.0f;
47  g = (float)((myColor & 0x0000FF00) >> 8) / 255.0f;
48  b = (float)(myColor & 0x000000FF) / 255.0f;
49  }
50 
51  bool operator==(const DtRangeItem& rhs) const
52  {
53  return ((myType == rhs.myType) &&
54  (myRange == rhs.myRange) &&
55  (myName == rhs.myName) &&
56  (myColor == rhs.myColor) &&
57  (myWedgeSizes == rhs.myWedgeSizes) &&
58  (myOffsetPosition == rhs.myOffsetPosition));
59  }
60  };
61 
64  {
65  public:
69 
72 
73  bool operator==(const DtVrfNetworkUpdateObjectDataState& rhs) const;
74 
76  {
77  return !(*this == rhs);
78  }
79 
80  public:
81  std::string myObjectType;
82  std::string myObjectLabel;
83  std::string myEchelonIdString;
84  std::string myOverlayParent;
85  std::string myUUID;
86  std::map<std::string, std::string> myExtendedData;
94  bool myHasPlan;
97  std::string myRulesOfEngagement;
100  std::vector<DtRangeItem> myRangeItems;
102  std::string myDIGuyAnimation;
103  std::string myDIGuyHandItem;
104  std::string myDIGuyHead;
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:93
bool operator!=(const DtVrfObjectDataState &rhs) const
Definition: vrfObjectDataState.h:126
std::string myDIGuyHandItem
Definition: vrfObjectDataState.h:103
Contains makVrv::DtStateViewCollection class.
std::map< std::string, std::string > myExtendedData
Definition: vrfObjectDataState.h:86
The IGI Message.
Definition: DtMessage.h:30
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:100
DT_DLL_VRFGUICORE bool operator==(const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &lhs, const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &rhs)
Contains makVrv::DtStateView class.
std::string myObjectType
Definition: vrfObjectDataState.h:81
The class that is the interface between the GUI and the back-end.
Definition: vrfObjectDataState.h:63
int myType
Definition: vrfObjectDataState.h:36
std::string myObjectLabel
Definition: vrfObjectDataState.h:82
std::string myStatePropertiesName
Definition: vrfObjectDataState.h:101
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
bool myExecutingPlan
Definition: vrfObjectDataState.h:95
std::string myDIGuyHead
Definition: vrfObjectDataState.h:104
std::string myName
Definition: vrfObjectDataState.h:39
std::string myDIGuyAnimation
Definition: vrfObjectDataState.h:102
DtVector myBoundingVolumeOffset
Definition: vrfObjectDataState.h:99
bool myIndependentlyTasked
Definition: vrfObjectDataState.h:90
bool myIsSubordinateOfForce
Definition: vrfObjectDataState.h:89
int myColor
Definition: vrfObjectDataState.h:40
bool myUnderFire
Definition: vrfObjectDataState.h:92
bool operator!=(const DtVrfNetworkUpdateObjectDataState &rhs) const
Definition: vrfObjectDataState.h:75
A DtStateView is a the interface to simulation state information.
Definition: DtStateView.h:49
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:37
std::string myEchelonIdString
Definition: vrfObjectDataState.h:83
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:94
std::string myRulesOfEngagement
Definition: vrfObjectDataState.h:97
char myVrfObjectDataVersion
Definition: vrfObjectDataState.h:91
int myVrfMessageVersionSupported
Definition: vrfObjectDataState.h:88
makVrv::DtStateView< DtVrfObjectDataState > DtVrfObjectDataStateView
Create a DtStateView templated on DtVrfNetworkUpdateObjectDataState.
Definition: vrfObjectDataState.h:217
DtVector myBoundingVolume
Definition: vrfObjectDataState.h:98
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:41
A DtSimState is the base class for all state objects.
Definition: DtSimState.h:19
Definition: vrfObjectDataState.h:34
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:85
bool operator==(const DtRangeItem &rhs) const
Definition: vrfObjectDataState.h:51
void getColor(float &r, float &g, float &b, float &a) const
Definition: vrfObjectDataState.h:43
Contains makVrv::DtSimState class.
std::string myOverlayParent
Definition: vrfObjectDataState.h:84
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:87
DtVector myOffsetPosition
Definition: vrfObjectDataState.h:38
bool myIsCurrentlyTasked
Definition: vrfObjectDataState.h:96
DT_DLL_VRFGUICORE makVrv::DtMessage & operator>>(makVrv::DtMessage &msg, DtVrlinkSimulatedAggregateState &state)
Decode a DtVrlinkSimulatedEnvironmentState from a DtMessage.
Definition: vrfObjectDataState.h:111

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)