]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/event_mgr.hxx
Some Linux platforms need <cstdio> for snprintf.
[simgear.git] / simgear / structure / event_mgr.hxx
index 23ee5348d9a836408370e773650c93e1d2ba6cc4..699522b8082ef5ba3d5c3c9743ed15b0cfd68a03 100644 (file)
@@ -17,6 +17,7 @@ public:
     double interval;
     SGCallback* callback;
     bool repeat;
+    bool running;
 };
 
 class SGTimerQueue {
@@ -24,6 +25,7 @@ public:
     SGTimerQueue(int preSize=1);
     ~SGTimerQueue();
 
+    void clear();
     void update(double deltaSecs);
 
     double now() { return _now; }
@@ -67,12 +69,14 @@ private:
 class SGEventMgr : public SGSubsystem
 {
 public:
-    SGEventMgr() { _rtProp = 0; }
-    ~SGEventMgr() { _rtProp = 0; }
+    SGEventMgr();
+    ~SGEventMgr();
 
-    virtual void init() {}
+    virtual void init();
     virtual void update(double delta_time_sec);
-
+    virtual void unbind();
+    virtual void shutdown();
+    
     void setRealtimeProperty(SGPropertyNode* node) { _rtProp = node; }
 
     /**
@@ -126,6 +130,7 @@ private:
     SGPropertyNode_ptr _rtProp;
     SGTimerQueue _rtQueue; 
     SGTimerQueue _simQueue;
+    bool _inited;
 };
 
 #endif // _SG_EVENT_MGR_HXX