VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtCigiDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtCigiDriver.h,v $ $Revision: 1.18 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtCigiDriver_H_
14 #define DtCigiDriver_H_
15 
17 
18 #include <vrvCore/DtDriver.h>
21 
24 
25 #include <matrix/vlVector.h>
26 #include <vlutil/vlRunnable.h>
27 
28 class DtThread;
29 
30 namespace makVrv
31 {
32  class DtAsynchronousAgentManager;
33  class DtAsynchronousEventQueue;
34  class DtCigiConnection;
35  class DtCigiConnectionInitializer;
36  class DtCigiIntersectionHandler;
37  class DtIgSettingsController;
38  class DtLosResponder;
39 
45  protected DtRunnable
46  {
47  public:
48 
50  DtCigiDriver(DtAgentManager& agentManager,
51  const std::string& uniqueName);
52 
54  virtual ~DtCigiDriver();
55 
57  virtual const std::string& className() const;
58 
60  const DtCigiConnectionInitializer& connectionSettings() const;
61 
63  virtual void setConnectionSettings(const DtCigiConnectionInitializer& settings);
64 
66  virtual DtConfiguration createConfiguration() const;
67 
69  virtual void realizeConfiguration(const DtConfiguration& config);
70 
74  virtual void run();
75 
78  virtual DtAgentManagerInterface& sceneInterface();
79 
82  virtual bool useThreadFlag() const;
83 
85  virtual void queueDriverFunction(boost::function<void ()> func);
86 
88  virtual void queueConnectionFunction(boost::function<void ()> func);
89 
90  void reportSmoothingEnabledChanged( bool enabled );
91 
93  boost::signal<void (DtCigiConnection*)> signal_sessionCreated;
94 
96  boost::signal<void (DtCigiConnection*)> signal_sessionAboutToBeDestroyed;
97 
98 
99  protected:
100  static std::string theCigiDriverClassName;
101 
102  protected:
104  virtual bool onStart();
105 
107  virtual bool onStop();
108 
111  virtual bool onTick();
112 
114  virtual void startThread();
115 
117  virtual void stopThread();
118 
120  virtual void setConnectionState(bool connected);
121 
125  virtual void slot_onLoadDatabase(const std::string& filename);
126 
131  virtual void performLoadDatabase(const std::string& filename);
132 
138  virtual void slot_terrainPatchCreated();
139 
140  // \brief Calls setDatabaseLoaded on the DtCigiConnection.
141  virtual void slot_firstTickAfterTerrainPatchCreated();
142 
145  virtual void slot_onCoordinateSystemChanged(
146  const std::string& name,
147  const std::string& params);
148 
151  typedef std::vector<boost::function<void ()> > FunctionCallList;
152 
154  virtual void runFunctionQueue(FunctionCallQueue& queue);
155 
156  protected:
160 
162  DtThread* myThread;
163 
168 
171 
174 
176 
180 
183 
185 
188 
192 
195 
198  };
199 
201  {
202  return (*myInitializer);
203  }
204 
208  {
209  public:
210 
213 
215  virtual ~DtCigiDriverCreator();
216 
219  virtual const std::string& extension() const;
220 
222  virtual DtDriver* create(DtAgentManager& agentManager,
223  const std::string& instanceName) const;
224 
225  protected:
226  std::string myFileExtension;
227 
228  };
229 }
230 
231 #endif
232 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)