VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfCloudLayerStateProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vrfGuiCore/DtCloudLayerProcessObjectAgent.hpp>
15 
18 #include <vrvVrl/DtCloudLayerStateListener.h>
20 #include <vrvVrl/DtCloudLayerElement.h>
22 #include <vrvVrl/DtCloudLayerProcessor.h>
25 #include <vrvCore/DtSimEntryObjectAgent.hpp>
26 #include <vlutil/vlPerformanceStats.h>
27 
28 namespace makVrv
29 {
30  namespace DT_PROTOCOL_NAMESPACE
31  {
32  class DtStateListenerInterface;
33  }
34 }
35 
36 namespace makVrf
37 {
38  namespace VRF_PROTOCOL_NAMESPACE
39  {
40  class VRF_PROTOCOL_EXPORT DtVrfCloudLayerElement : public makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerElement
41  {
42  public:
44  DtVrfCloudLayerElement(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& conn, makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerStateListener& listener);
45 
47  virtual ~DtVrfCloudLayerElement();
48 
49  virtual void setVisible(bool);
50  virtual void show(int context);
51  virtual void hide(int context);
52 
53  virtual bool isVisible() const;
54 
55  protected:
56  virtual void sendAll();
57  virtual void slot_cloudLayerUpdated();
58 
59  virtual void updateEnabledState();
60 
61  protected:
62  std::set<int> myShowHideContexts;
63  bool myVisible;
64  };
65 
66  class VRF_PROTOCOL_EXPORT DtVrfCloudLayerProcessor : public makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerProcessor
67  {
68  public:
70 
71  virtual ~DtVrfCloudLayerProcessor();
72 
75  virtual void slot_environmentalDiscovered(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkEnvironmentalStateListenerInterface& listener);
76 
77  protected:
78  virtual void elementAttributeChangeRequested(
79  makVrv::DtUniqueID id, makVrv::DtUniqueID parentId, DtBoost::shared_ptr<const makVrv::DtElementAttribute> atr );
80  virtual makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerElement* createElement(makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerStateListener& listener);
81 
82  protected:
84  };
85 
88  {
89  public:
90 
93 
96 
97  static DtVrfCloudLayerStateProcessor* findInstance(
99  {
100  return dynamic_cast<DtVrfCloudLayerStateProcessor*>(
101  sim.findInstance("DtVrfCloudLayerStateProcessor"));
102  }
103 
104  static void registerInstance(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& sim,
106  {
107  sim.registerInstance("DtVrfCloudLayerStateProcessor",proc);
108  }
109 
111  void postDrainInput();
112 
114  void setObjectUpdateRate(makVrv::DtUniqueID uniqueId, makVrv::DtSimEntryUpdater::UpdateRate rate);
115 
117  void forceObjectUpdate(makVrv::DtUniqueID uniqueId);
118 
121 
124 
126  virtual void createAndSendState(makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerStateListener& listener,
127  DtCloudLayerProcessObjectAgent& objectDriver);
128 
129  virtual void setState(makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerStateListener& listener,
131 
132  virtual void slot_postUpdateCallback(
134 
135  protected:
136 
138  static void postDrainInput(void* usr);
139 
140  protected:
141 
142  //A Listener and a driver which will be updated with it.
144  {
145  public:
146  VrfCloudLayerObjectDataStateUpdater(makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerStateListener& listener,
147  DtCloudLayerProcessObjectAgent& driver,
148  DtVrfCloudLayerStateProcessor& processor);
149 
151 
153 
154  //Are the updaters equal
155  bool operator==(const VrfCloudLayerObjectDataStateUpdater& orig) const;
156 
158  void update(double timeT);
159 
160  public:
161 
162  makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerStateListener* myListener;
163  DtCloudLayerProcessObjectAgent* myAgent;
165  };
166 
167  typedef std::vector<makVrv::DtUniqueID> CloudLayerIdList;
168 
170  {
171  makVrv::DT_PROTOCOL_NAMESPACE::DtCloudLayerStateListener* myListener;
172  DtCloudLayerProcessObjectAgent* myAgent;
175  };
176 
177  typedef std::map<makVrv::DtUniqueID,CloudLayerSimDataInstance > CloudLayerAgentMap;
178 
180  typedef std::map<makVrv::DtSimEntryUpdater::UpdateRate,CloudLayerUpdaterGroup>
182 
183  protected:
184 
186 
189  DtTimedSection myTimer;
190  makVrv::DtSimEntryObjectAgent* mySimEntryAgent;
191 
195  };
196 
198  {
199  public:
202 
204 
207  static void registerInstance(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& conn,
209 
211  };
212  }
213 }

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)