VR-Forces 4.3.1 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 
16 #include <vrvCigi/vrvCigi.h>
17 
19 
20 #include <vrvCore/DtDriver.h>
22 #include <vrvCore/DtUniqueID.h>
24 
27 
28 #include <matrix/vlVector.h>
29 #include <vlutil/vlRunnable.h>
30 
31 class DtThread;
32 
33 namespace makVrv
34 {
35  class DtAsynchronousAgentManager;
36  class DtAsynchronousEventQueue;
37  class DtCigiConnection;
38  class DtCigiConnectionInitializer;
39  class DtCigiIntersectionHandler;
40  class DtIgSettingsController;
41  class DtLosResponder;
42 
48  protected DtRunnable
49  {
50  public:
51 
53  DtCigiDriver(DtAgentManager& agentManager,
54  const std::string& uniqueName);
55 
57  virtual ~DtCigiDriver();
58 
60  virtual const std::string& className() const;
61 
63  const DtCigiConnectionInitializer& connectionSettings() const;
64 
66  virtual void setConnectionSettings(const DtCigiConnectionInitializer& settings);
67 
69  virtual DtConfiguration createConfiguration() const;
70 
72  virtual void realizeConfiguration(const DtConfiguration& config);
73 
77  virtual void run();
78 
81  virtual DtAgentManagerInterface& sceneInterface();
82 
85  virtual bool useThreadFlag() const;
86 
88  virtual void queueDriverFunction(boost::function<void ()> func);
89 
91  virtual void queueConnectionFunction(boost::function<void ()> func);
92 
93  void reportSmoothingEnabledChanged( bool enabled );
94 
96  boost::signal<void (DtCigiConnection*)> signal_sessionCreated;
97 
99  boost::signal<void (DtCigiConnection*)> signal_sessionAboutToBeDestroyed;
100 
101 
102  protected:
103  static std::string theCigiDriverClassName;
104 
105  protected:
107  virtual bool onStart();
108 
110  virtual bool onStop();
111 
114  virtual bool onTick();
115 
117  virtual void startThread();
118 
120  virtual void stopThread();
121 
123  virtual void setConnectionState(bool connected);
124 
126  virtual void slot_onLoadDatabase(const std::string& filename);
127 
129  virtual void performLoadDatabase(const std::string& filename);
130 
133  virtual void slot_onCoordinateSystemChanged(
134  const std::string& name,
135  const std::string& params);
136 
139  typedef std::vector<boost::function<void ()> > FunctionCallList;
140 
142  virtual void runFunctionQueue(FunctionCallQueue& queue);
143 
144  protected:
148 
150  DtThread* myThread;
151 
156 
159 
162 
164 
168 
171 
173 
176 
180 
183 
186  };
187 
189  {
190  return (*myInitializer);
191  }
192 
196  {
197  public:
198 
201 
203  virtual ~DtCigiDriverCreator();
204 
207  virtual const std::string& extension() const;
208 
210  virtual DtDriver* create(DtAgentManager& agentManager,
211  const std::string& instanceName) const;
212 
213  protected:
214  std::string myFileExtension;
215 
216  };
217 }
218 
219 #endif
220 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)