VR-Forces 4.2 Class Documentation
DtVrfObjectDataState.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>
14 
15 #include <vrvCore/DtSimState.h>
16 #include <vrvCore/DtStateView.h>
17 #include <vrvCore/DtSimObjectEntryCollection.h>
18 #include <vrvCore/DtStateViewCollection.h>
19 #include <vrvUtil/extendedTypeEncoding.h>
20 #include <vrvUtil/DtMessage.h>
21 #include <matrix/vlVector.h>
22 #include <vector>
23 #include <string>
24 
25 namespace makVrv
26 {
27  class DtMessage;
28 }
29 
30 namespace makVrf
31 {
33  {
34  int myType;
35  double myRange;
37  std::string myName;
38 
39  bool operator==(const DtRangeItem& rhs) const
40  {
41  return ((myType == rhs.myType) &&
42  (myRange == rhs.myRange) &&
43  (myName == rhs.myName) &&
44  (myOffsetPosition == rhs.myOffsetPosition));
45  }
46  };
47 
49  struct DT_DLL_VRFGUICORE DtVrfObjectDataState : public makVrv::DtSimState
50  {
51  public:
55 
57  virtual ~DtVrfObjectDataState();
58 
59  bool operator==(const DtVrfObjectDataState& rhs) const;
60 
61  bool operator!=(const DtVrfObjectDataState& rhs) const
62  {
63  return !(*this == rhs);
64  }
65 
66  public:
67  std::string myObjectType;
68  std::string myObjectLabel;
69  std::string myEchelonIdString;
70  std::string myOverlayParent;
78  bool myHasPlan;
81  std::string myRulesOfEngagement;
84  std::vector<DtRangeItem> myRangeItems;
85  };
86 
88  DT_DLL_VRFGUICORE makVrv::DtMessage& operator<<( makVrv::DtMessage& msg,const DtVrfObjectDataState& state );
89 
91  DT_DLL_VRFGUICORE makVrv::DtMessage& operator>>( makVrv::DtMessage& msg, DtVrfObjectDataState& state );
92 
93  DT_DLL_VRFGUICORE makVrv::DtMessage& operator<<( makVrv::DtMessage& msg, const makVrf::DtRangeItem& state );
94 
95  DT_DLL_VRFGUICORE makVrv::DtMessage& operator>>( makVrv::DtMessage& msg, makVrf::DtRangeItem& state );
96 
97  template <typename T> makVrv::DtMessage& operator << (makVrv::DtMessage& msg, const std::vector<T>& t)
98  {
99  msg << t.size();
100 
101  typename std::vector<T>::const_iterator iter = t.begin();
102 
103  while (iter != t.end())
104  {
105  msg << (*iter);
106  ++iter;
107  }
108 
109  return msg;
110  }
111 
112  template <typename T> makVrv::DtMessage& operator >> (makVrv::DtMessage& msg, std::vector<T>& t)
113  {
114  size_t iLimit;
115  size_t i;
116  msg >> iLimit;
117 
118  for (i = 0; i < iLimit; i++)
119  {
120  T item;
121 
122  msg >> item;
123  t.push_back(item);
124  }
125 
126  return msg;
127  }
128 
130  typedef makVrv::DtStateView<DtVrfObjectDataState> DtVrfObjectDataStateView;
131 
133  typedef makVrv::DtSimObjectEntryCollection<DtVrfObjectDataState> DtVrfObjectDataStateCollection;
134 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)