]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.hxx
Attempt #1 to sort out confusion between left / right / parking brake
[flightgear.git] / src / Main / globals.hxx
index 905752c6dfe092ab9662e0d70581ddbeb7e031a9..9e91b443bce4b8b780d591748bfce7a163ec4016 100644 (file)
 #ifndef _GLOBALS_HXX
 #define _GLOBALS_HXX
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <simgear/compiler.h>
+#include <simgear/structure/callback.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/structure/event_mgr.hxx>
 
 #include <vector>
 #include STL_STRING
 
-#include "fgfs.hxx"
-
-
 SG_USING_STD( vector );
 SG_USING_STD( string );
 
@@ -53,21 +57,22 @@ class SGEphemeris;
 class SGCommandMgr;
 class SGMagVar;
 class SGMaterialLib;
-class SGModelLoader;
+class SGModelLib;
 class SGPropertyNode;
 class SGRoute;
 class SGTime;
 class SGSoundMgr;
 
+class FGAirportList;
+class FGRunwayList;
 class FGAIMgr;
 class FGATCMgr;
 class FGATCDisplay;
 class FGAircraftModel;
 class FGAutopilot;
 class FGControls;
-class FGEnvironment;
-class FGEnvironmentMgr;
 class FGIO;
+class FGLight;
 class FGModelMgr;
 class FGScenery;
 #ifdef FG_MPLAYER_AS
@@ -83,12 +88,14 @@ class FGViewer;
 /**
  * Bucket for subsystem pointers representing the sim's state.
  */
+
 class FGGlobals
 {
 
 private:
 
-    FGSubsystemMgr * subsystem_mgr;
+    SGSubsystemMgr * subsystem_mgr;
+    SGEventMgr * event_mgr;
 
     // Number of milliseconds elapsed since the start of the program.
     double sim_time_sec;
@@ -136,8 +143,11 @@ private:
     // sound manager
     SGSoundMgr *soundmgr;
 
-    // environment information
-    FGEnvironmentMgr * environment_mgr;
+    // Simple Airport List
+    FGAirportList *airports;
+
+    // Runway List
+    FGRunwayList *runways;
 
     // ATC manager
     FGATCMgr *ATC_mgr;
@@ -163,7 +173,7 @@ private:
 
     SGCommandMgr *commands;
 
-    SGModelLoader * model_loader;
+    SGModelLib *model_lib;
 
     FGAircraftModel *acmodel;
 
@@ -178,7 +188,8 @@ private:
     // Tile manager
     FGTileMgr *tile_mgr;
 
-    FGIO* io;
+    // Input/Ouput subsystem
+    FGIO *io;
 
 #ifdef FG_MPLAYER_AS
     //Mulitplayer managers
@@ -192,16 +203,18 @@ public:
     FGGlobals();
     virtual ~FGGlobals();
 
-    virtual FGSubsystemMgr * get_subsystem_mgr () const;
+    virtual SGSubsystemMgr * get_subsystem_mgr () const;
 
-    virtual FGSubsystem * get_subsystem (const char * name);
+    virtual SGSubsystem * get_subsystem (const char * name);
 
     virtual void add_subsystem (const char * name,
-                                FGSubsystem * subsystem,
-                                FGSubsystemMgr::GroupType
-                                  type = FGSubsystemMgr::GENERAL,
+                                SGSubsystem * subsystem,
+                                SGSubsystemMgr::GroupType
+                                type = SGSubsystemMgr::GENERAL,
                                 double min_time_sec = 0);
 
+    virtual SGEventMgr * get_event_mgr () const;
+
     inline double get_sim_time_sec () const { return sim_time_sec; }
     inline void inc_sim_time_sec (double dt) { sim_time_sec += dt; }
     inline void set_sim_time_sec (double t) { sim_time_sec = t; }
@@ -245,12 +258,11 @@ public:
     inline SGRoute *get_route() const { return route; }
     inline void set_route( SGRoute *r ) { route = r; }
 
-    inline FGEnvironmentMgr * get_environment_mgr() {
-      return environment_mgr;
-    }
-    inline void set_environment_mgr(FGEnvironmentMgr * mgr) {
-      environment_mgr = mgr;
-    }
+    inline FGAirportList *get_airports() const { return airports; }
+    inline void set_airports( FGAirportList *a ) {airports = a; }
+
+    inline FGRunwayList *get_runways() const { return runways; }
+    inline void set_runways( FGRunwayList *r ) {runways = r; }
 
     inline FGATCMgr *get_ATC_mgr() const { return ATC_mgr; }
     inline void set_ATC_mgr( FGATCMgr *a ) {ATC_mgr = a; }
@@ -282,10 +294,10 @@ public:
 
     inline SGCommandMgr *get_commands () { return commands; }
 
-    inline SGModelLoader * get_model_loader () { return model_loader; }
+    inline SGModelLib * get_model_lib () { return model_lib; }
 
-    inline void set_model_loader (SGModelLoader * loader) {
-        model_loader = loader;
+    inline void set_model_lib (SGModelLib *m) {
+        model_lib = m;
     }
 
     inline FGAircraftModel *get_aircraft_model () { return acmodel; }
@@ -331,8 +343,7 @@ public:
     inline FGTileMgr * get_tile_mgr () const { return tile_mgr; }
     inline void set_tile_mgr ( FGTileMgr *t ) { tile_mgr = t; }
 
-    FGIO* get_io() const { return io; }
-
+    inline FGIO* get_io() const { return io; }
 
     /**
      * Save the current state as the initial state.