]> 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 0a25f8d46249acf29132f1c3462d558719da9a0b..dc4d7c319a3e60891003b3d16cb20ef542b0b850 100644 (file)
@@ -104,17 +104,32 @@ public:
      {
      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;
      };