]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/simple.hxx
testair.cxx is a 21 lines long, obsolete test application. After removing
[flightgear.git] / src / Airports / simple.hxx
index f79b6187be777f79f6240f4453f9a8879e6acf49..dc4d7c319a3e60891003b3d16cb20ef542b0b850 100644 (file)
 // forward decls
 class FGAirportDynamics;
 class FGRunway;
+class FGTaxiway;
 
 typedef SGSharedPtr<FGRunway> FGRunwayPtr;
+typedef SGSharedPtr<FGTaxiway> FGTaxiwayPtr;
 
 /***************************************************************************************
  *
@@ -93,25 +95,41 @@ public:
     bool hasHardRunwayOfLengthFt(double aLengthFt) const;
     
     unsigned int numTaxiways() const;
-    FGRunway* getTaxiwayByIndex(unsigned int aIndex) const;
+    FGTaxiway* getTaxiwayByIndex(unsigned int aIndex) const;
     
-    void addRunway(FGRunway* aRunway);
+    void setRunwaysAndTaxiways(std::vector<FGRunwayPtr>& rwys,
+      std::vector<FGTaxiwayPtr>& txwys);
     
     class AirportFilter : public Filter
      {
      public:
        virtual bool pass(FGPositioned* aPos) const { 
-         Type ty(aPos->type());
-         return (ty >= AIRPORT) && (ty <= SEAPORT);
+         return passAirport(static_cast<FGAirport*>(aPos));
+       }
+       
+       virtual Type minType() const {
+         return AIRPORT;
+       }
+       
+       virtual Type maxType() const {
+         return SEAPORT;
+       }
+       
+       virtual bool passAirport(FGAirport* aApt) const {
+         return true;
        }
      };
      
-     class HardSurfaceFilter : public Filter
+     class HardSurfaceFilter : public AirportFilter
      {
      public:
        HardSurfaceFilter(double minLengthFt);
        
-       virtual bool pass(FGPositioned* aPos) const;
+       virtual bool passAirport(FGAirport* aApt) const;
+       
+       virtual Type maxType() const {
+         return AIRPORT;
+       }
      private:
        double mMinLengthFt;
      };
@@ -153,7 +171,7 @@ private:
     FGAirport(const FGAirport&);
     
     std::vector<FGRunwayPtr> mRunways;
-    std::vector<FGRunwayPtr> mTaxiways;
+    std::vector<FGTaxiwayPtr> mTaxiways;
 };
 
 // find basic airport location info from airport database