VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCigiDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vrvCore/DtDriver.h>
17 
20 
21 #include <matrix/vlVector.h>
22 #include <vlutil/vlRunnable.h>
23 
24 class DtThread;
25 
26 namespace makVrv
27 {
28  class DtAsynchronousAgentManager;
29  class DtAsynchronousEventQueue;
30  class DtCigiConnection;
31  class DtCigiConnectionInitializer;
32  class DtCigiIntersectionHandler;
33  class DtIgSettingsController;
34  class DtLosResponder;
35 
41  protected DtRunnable
42  {
43  public:
44 
46  DtCigiDriver(DtAgentManager& agentManager,
47  const std::string& uniqueName);
48 
50  virtual ~DtCigiDriver();
51 
53  virtual const std::string& className() const;
54 
56  const DtCigiConnectionInitializer& connectionSettings() const;
57 
59  virtual void setConnectionSettings(const DtCigiConnectionInitializer& settings);
60 
62  virtual DtConfiguration createConfiguration() const;
63 
65  virtual void realizeConfiguration(const DtConfiguration& config);
66 
70  virtual void run();
71 
74  virtual DtAgentManagerInterface& sceneInterface();
75 
78  virtual bool useThreadFlag() const;
79 
81  virtual void queueDriverFunction(boost::function<void ()> func);
82 
84  virtual void queueConnectionFunction(boost::function<void ()> func);
85 
86  void reportSmoothingEnabledChanged( bool enabled );
87 
89  boost::signal<void (DtCigiConnection*)> signal_sessionCreated;
90 
92  boost::signal<void (DtCigiConnection*)> signal_sessionAboutToBeDestroyed;
93 
95 
96  virtual DtIgSettingsController& igSettingsController();
97  virtual const DtIgSettingsController& isSettingsController() const;
98 
99  virtual DtCigiViewController& viewController();
100  virtual const DtCigiViewController& viewController() const;
101 
102  virtual DtCigiIntersectionHandler& intersectionHandler();
103  virtual const DtCigiIntersectionHandler& intersectionHandler() const;
105 
106 
107  protected:
108  static std::string theCigiDriverClassName;
109 
110  protected:
112  virtual bool onStart();
113 
115  virtual bool onStop();
116 
119  virtual bool onTick();
120 
122  virtual void startThread();
123 
125  virtual void stopThread();
126 
128  virtual void setConnectionState(bool connected);
129 
133  virtual void slot_onLoadDatabase(const std::string& filename);
134 
139  virtual void performLoadDatabase(const std::string& filename);
140 
146  virtual void slot_terrainPatchCreated();
147 
148  // \brief Calls setDatabaseLoaded on the DtCigiConnection.
149  virtual void slot_firstTickAfterTerrainPatchCreated();
150 
153  virtual void slot_onCoordinateSystemChanged(
154  const std::string& name,
155  const std::string& params);
156 
159  typedef std::vector<boost::function<void ()> > FunctionCallList;
160 
162  virtual void runFunctionQueue(FunctionCallQueue& queue);
163 
168  virtual void slot_displayEngineAdded( const DtDeRecord& igRecord );
169 
170  protected:
174 
176  DtThread* myThread;
177 
182 
185 
188 
190 
194 
197 
199 
202 
206 
209 
212  };
213 
215  {
216  return (*myInitializer);
217  }
218 
222  {
223  public:
224 
227 
229  virtual ~DtCigiDriverCreator();
230 
233  virtual const std::string& extension() const;
234 
236  virtual DtDriver* create(DtAgentManager& agentManager,
237  const std::string& instanceName) const;
238 
239  protected:
240  std::string myFileExtension;
241 
242  };
243 }
244 
245 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)