// forward decls
class FGAirportDynamics;
class FGRunway;
+class FGTaxiway;
typedef SGSharedPtr<FGRunway> FGRunwayPtr;
+typedef SGSharedPtr<FGTaxiway> FGTaxiwayPtr;
/***************************************************************************************
*
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;
};
FGAirport(const FGAirport&);
std::vector<FGRunwayPtr> mRunways;
- std::vector<FGRunwayPtr> mTaxiways;
-};
-
-typedef std::vector < FGAirport * > airport_list;
-typedef airport_list::iterator airport_list_iterator;
-typedef airport_list::const_iterator const_airport_list_iterator;
-
-
-
-class FGAirportList {
-private:
-
- airport_list airports_array;
-
-public:
- // Constructor (new)
- FGAirportList();
-
- // Destructor
- ~FGAirportList();
-
- // add an entry to the list
- FGAirport* add( const std::string& id, const SGGeod& location, const SGGeod& tower,
- const std::string& name, bool has_metar, FGPositioned::Type aType);
-
- /**
- * Return the number of airports in the list.
- */
- int size() const;
-
- /**
- * Return a specific airport, by position.
- */
- const FGAirport *getAirport( unsigned int index ) const;
-
+ std::vector<FGTaxiwayPtr> mTaxiways;
};
// find basic airport location info from airport database