]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.hxx
A new comm radio and atis implementation
[flightgear.git] / src / Main / globals.hxx
index 3f8ae0689d738933c8d0c97d37d1bcb8e5db2dfb..61ee6ebfc7d5c7c8c48e3702808635ed55d1d5bc 100644 (file)
@@ -55,7 +55,6 @@ class SGSubsystemMgr;
 class SGSubsystem;
 class SGSoundMgr;
 
-class FGATISMgr;
 class FGControls;
 class FGTACANList;
 class FGLocale;
@@ -114,14 +113,11 @@ private:
     SGEphemeris *ephem;
 
     // Material properties library
-    SGMaterialLib *matlib;
+    SGSharedPtr<SGMaterialLib> matlib;
 
     // Global autopilot "route"
     FGRouteMgr *route_mgr;
 
-    // ATC manager
-    FGATISMgr *ATIS_mgr;
-
     // control input state
     FGControls *controls;
 
@@ -163,6 +159,12 @@ private:
     void initProperties();
     
     SGSharedPtr<FGSampleQueue> _chatter_queue;
+    
+    void cleanupListeners();
+    
+    typedef std::vector<SGPropertyChangeListener*> SGPropertyChangeListenerVec;
+    SGPropertyChangeListenerVec _listeners_to_cleanup;
+    
 public:
 
     FGGlobals();
@@ -265,9 +267,6 @@ public:
     inline SGMaterialLib *get_matlib() const { return matlib; }
     void set_matlib( SGMaterialLib *m );
 
-    inline FGATISMgr *get_ATIS_mgr() const { return ATIS_mgr; }
-    inline void set_ATIS_mgr( FGATISMgr *a ) {ATIS_mgr = a; }
-
     inline FGControls *get_controls() const { return controls; }
     inline void set_controls( FGControls *c ) { controls = c; }
 
@@ -346,6 +345,8 @@ public:
     
     FGSampleQueue* get_chatter_queue() const;
     void set_chatter_queue(FGSampleQueue* queue);
+    
+    void addListenerToCleanup(SGPropertyChangeListener* l);
 };