]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/route_mgr.hxx
Remove un-needed header.
[flightgear.git] / src / Autopilot / route_mgr.hxx
index bb885c7df30b96de86276cb50c02a8e580a5624f..b66a06b72f4cb697a4113c1f66c0083378a0a045 100644 (file)
 #define _ROUTE_MGR_HXX 1
 
 #include <simgear/props/props.hxx>
-#include <simgear/route/waypoint.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
 
-#include <Navaids/route.hxx>
+#include <Navaids/FlightPlan.hxx>
 
 // forward decls
 class SGPath;
 class PropertyWatcher;
 
-class FGAirport;
-class FGRunway;
-
-typedef SGSharedPtr<FGAirport> FGAirportRef;
-
 /**
  * Top level route manager class
  * 
@@ -57,20 +51,6 @@ public:
   void unbind ();
   void update (double dt);
   
-  typedef enum {
-    ROUTE_HIGH_AIRWAYS, ///< high-level airways routing
-    ROUTE_LOW_AIRWAYS, ///< low-level airways routing
-    ROUTE_VOR ///< VOR-VOR routing
-  } RouteType;
-  
-  /**
-   * Insert waypoints from index-1 to index. In practice this means you can
-   * 'fill in the gaps' between defined waypoints. If index=0, the departure
-   * airport is used as index-1; if index is -1, the destination airport is
-   * used as the final waypoint.
-   */
-  bool routeToIndex(int index, RouteType aRouteType);
-        
   bool isRouteActive() const;
          
   int currentIndex() const;
@@ -104,6 +84,11 @@ public:
    * route could not be activated for some reason
    */
   bool activate();
+  
+  /**
+   * deactivate the route if active
+   */
+  void deactivate();
 
   /**
    * Step to the next waypoint on the active route
@@ -156,8 +141,6 @@ private:
     SGPropertyNode_ptr _pathNode;
     SGPropertyNode_ptr _currentWpt;
     
-    /// integer property corresponding to the RouteType enum
-    SGPropertyNode_ptr _routingType;
     
     /** 
      * Signal property to notify people that the route was edited
@@ -194,12 +177,6 @@ private:
     InputListener *listener;
     SGPropertyNode_ptr mirror;    
   
-    virtual void departureChanged();
-    void buildDeparture(flightgear::WayptRef enroute, flightgear::WayptVec& wps);
-    
-    virtual void arrivalChanged();
-    void buildArrival(flightgear::WayptRef enroute, flightgear::WayptVec& wps);
-    
     /**
      * Helper to keep various pieces of state in sync when the route is
      * modified (waypoints added, inserted, removed). Notably, this fires the
@@ -217,6 +194,11 @@ private:
      */
     bool checkFinished();
     
+    /*
+     * update state when we pass the final waypoint
+     */
+    void endOfRoute();
+    
     /**
      * Predicate for helping the UI - test if at least one waypoint was
      * entered by the user (as opposed to being generated by the route-manager)