VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
externalDataState.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
12 
13 #pragma once
14 
15 #include <vrfGuiCore/vrfGuiCore.h>
17 #include <vrvCore/DtEntityState.h>
18 #include <vrvUtil/DtMessage.h>
20 
21 namespace makVrf
22 {
26  {
27  public:
28 
32 
34  virtual ~DtExternalDataState();
35 
36  const DtSimpleTypedDictionary& dictionary() const
37  {
38  return myDictionary;
39  }
40 
42  {
43  return myDictionary;
44  }
45 
46  virtual std::string dataHandlerType() const = 0;
47  virtual std::string visualHandlerType() const = 0;
48 
49  bool operator==(const DtExternalDataState&) const;
50 
51  public:
53  };
54 
57 
60 
61  template <typename T>
62  makVrv::DtMessage& operator>>( makVrv::DtMessage& msg, std::set<T>& state )
63  {
64  int size;
65  msg >> size;
66 
67  int i;
68 
69  for (i = 0; i < size; i++)
70  {
71  T t;
72  msg >> t;
73 
74  state.insert(t);
75  }
76 
77  return msg;
78  }
79 
80  template <typename T>
81  makVrv::DtMessage& operator<<( makVrv::DtMessage& msg, const std::set<T>& state )
82  {
83  int size = state.size();
84  msg << size;
85 
86  typename std::set<T>::const_iterator iter = state.begin();
87  while (iter != state.end())
88  {
89  msg << *iter;
90  ++iter;
91  }
92 
93  return msg;
94  }
95 
99  {
100  public:
102  makVrv::DtStateViewCollection<DtExternalDataState>(de, makVrv::DtSimEntryUpdater::AnyUpdates)
103  {
104  }
105  };
106 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)