]> git.mxchange.org Git - flightgear.git/blob - src/FDM/fdm_shell.hxx
Merge branch 'topics/mainloop' into next
[flightgear.git] / src / FDM / fdm_shell.hxx
1 #ifndef FG_FDM_SHELL_HXX
2 #define FG_FDM_SHELL_HXX
3
4 #include <simgear/structure/subsystem_mgr.hxx>
5
6 // forward decls
7 class FGInterface;
8
9 /**
10  * Wrap an FDM implementation in a subsystem with standard semantics
11  * Notably, deal with the various cases in which update() should not
12  * be called, such as replay or before scenery has loaded
13  *
14  * This class also provides the factory method which creates the
15  * specific FDM class (createImplementation)
16  */
17 class FDMShell : public SGSubsystem
18 {
19 public:
20   FDMShell();
21   ~FDMShell();
22   
23   virtual void init();
24   virtual void reinit();
25   
26   virtual void bind();
27   virtual void unbind();
28   
29   virtual void update(double dt);
30   
31 private:
32
33   void createImplementation();
34   
35   FGInterface* _impl;
36   SGPropertyNode* _props; // root property tree for this FDM instance
37   bool _dataLogging;
38 };
39
40 #endif // of FG_FDM_SHELL_HXX