VR-Forces 4.1 Class Documentation
DtVrfObjectDataState.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtVrfObjectDataState.h,v $ $Revision: 1.1 $ $State: Exp $
7 ******************************************************************************/
8 
11 
13 
14 #pragma once
15 
16 #include <vrfGuiCore/vrfGuiCore.h>
17 
18 #include <vrvCore/DtSimState.h>
19 #include <vrvCore/DtStateView.h>
23 #include <vrvUtil/DtMessage.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 
42  bool operator==(const DtRangeItem& rhs) const
43  {
44  return ((myType == rhs.myType) &&
45  (myRange == rhs.myRange) &&
46  (myName == rhs.myName) &&
47  (myOffsetPosition == rhs.myOffsetPosition));
48  }
49  };
50 
53  {
54  public:
57 
59  virtual ~DtVrfObjectDataState();
60 
61  bool operator==(const DtVrfObjectDataState& rhs) const;
62 
63  bool operator!=(const DtVrfObjectDataState& rhs) const
64  {
65  return !(*this == rhs);
66  }
67 
68  public:
69  std::string myObjectType;
70  std::string myObjectLabel;
71  std::string myEchelonIdString;
72  std::string myOverlayParent;
80  bool myHasPlan;
83  std::string myRulesOfEngagement;
86  std::vector<DtRangeItem> myRangeItems;
87  };
88 
91 
94 
96 
98 
99  template <typename T> makVrv::DtMessage& operator << (makVrv::DtMessage& msg, const std::vector<T>& t)
100  {
101  msg << t.size();
102 
103  typename std::vector<T>::const_iterator iter = t.begin();
104 
105  while (iter != t.end())
106  {
107  msg << (*iter);
108  ++iter;
109  }
110 
111  return msg;
112  }
113 
114  template <typename T> makVrv::DtMessage& operator >> (makVrv::DtMessage& msg, std::vector<T>& t)
115  {
116  size_t iLimit;
117  size_t i;
118  msg >> iLimit;
119 
120  for (i = 0; i < iLimit; i++)
121  {
122  T item;
123 
124  msg >> item;
125  t.push_back(item);
126  }
127 
128  return msg;
129  }
130 
133 
136 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)