]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.hxx
Small rewrite of waypoints parsing fix to move global list to the globals.hxx
[flightgear.git] / src / Main / globals.hxx
index 3104989b21e4cdf0757bd092ff99b06173850354..071c97c24cd44ea5c4ba35488230aad386e2e418 100644 (file)
@@ -59,7 +59,6 @@ class SGMagVar;
 class SGMaterialLib;
 class SGModelLib;
 class SGPropertyNode;
-class SGRoute;
 class SGTime;
 class SGSoundMgr;
 
@@ -69,11 +68,11 @@ class FGAIMgr;
 class FGATCMgr;
 class FGATCDisplay;
 class FGAircraftModel;
-class FGAutopilot;
 class FGControls;
 class FGIO;
 class FGLight;
 class FGModelMgr;
+class FGRouteMgr;
 class FGScenery;
 #ifdef FG_MPLAYER_AS
 class FGMultiplayRxMgr;
@@ -131,11 +130,8 @@ private:
     // Material properties library
     SGMaterialLib *matlib;
 
-    // Current autopilot
-    FGAutopilot *autopilot;
-
     // Global autopilot "route"
-    SGRoute *route;
+    FGRouteMgr *route_mgr;
 
     // 2D panel
     FGPanel *current_panel;
@@ -182,6 +178,10 @@ private:
     // list of serial port-like configurations
     string_list *channel_options_list;
 
+    // A list of initial waypoints that are read from the command line
+    // and or flight-plan file during initialization
+    string_list *initial_waypoints;
+
     // FlightGear scenery manager
     FGScenery *scenery;
 
@@ -215,35 +215,6 @@ public:
 
     virtual SGEventMgr * get_event_mgr () const;
 
-    virtual void add_event (const char * name,
-                            int repeat_value,
-                            int initial_value = -1 );
-
-    virtual void add_event (const char * name,
-                            const SGSubsystem * subsystem,
-                            int repeat_value,
-                            int initial_value = -1 );
-
-    template< typename Fun >
-    inline void add_event( const char * name,
-                           const Fun& func,
-                           SGEvent::interval_type repeat_value,
-                           SGEvent::interval_type initial_value = -1 )
-    {
-        event_mgr->add( name, get_subsystem( name ), func,
-                        repeat_value, initial_value);
-    }
-
-    template< typename Fun >
-    inline void add_event( const char * name,
-                           const SGSubsystem * subsystem,
-                           const Fun& func,
-                           SGEvent::interval_type repeat_value,
-                           SGEvent::interval_type initial_value = -1 )
-    {
-        event_mgr->add( name, subsystem, func, repeat_value, initial_value);
-    }
-
     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; }
@@ -281,12 +252,6 @@ public:
     inline SGMaterialLib *get_matlib() const { return matlib; }
     inline void set_matlib( SGMaterialLib *m ) { matlib = m; }
 
-    inline FGAutopilot *get_autopilot() const { return autopilot; }
-    inline void set_autopilot( FGAutopilot *ap) { autopilot = ap; }
-
-    inline SGRoute *get_route() const { return route; }
-    inline void set_route( SGRoute *r ) { route = r; }
-
     inline FGAirportList *get_airports() const { return airports; }
     inline void set_airports( FGAirportList *a ) {airports = a; }
 
@@ -366,6 +331,14 @@ public:
        channel_options_list = l;
     }
 
+    inline string_list *get_initial_waypoints () {
+        return initial_waypoints;
+    }
+  
+    inline void set_initial_waypoints (string_list *list) {
+        initial_waypoints = list;
+    }
+
     inline FGScenery * get_scenery () const { return scenery; }
     inline void set_scenery ( FGScenery *s ) { scenery = s; }