diff --git a/src/Airports/simple.hxx b/src/Airports/simple.hxx index 7645f5972..9e3161474 100644 --- a/src/Airports/simple.hxx +++ b/src/Airports/simple.hxx @@ -444,6 +444,8 @@ typedef airport_map::iterator airport_map_iterator; typedef airport_map::const_iterator const_airport_map_iterator; typedef vector < FGAirport * > airport_list; +typedef airport_list::iterator airport_list_iterator; +typedef airport_list::const_iterator const_airport_list_iterator; class FGAirportList { @@ -467,16 +469,16 @@ public: const double elevation, const string& name, const bool has_metar ); // search for the specified id. - // Returns NULL if unsucessfull. + // Returns NULL if unsucessfull. FGAirport* search( const string& id ); - // Search for the next airport in ASCII sequence to the supplied id. - // eg. id = "KDC" or "KDCA" would both return "KDCA". - // If exact = true then only exact matches are returned. - // NOTE: Numbers come prior to A-Z in ASCII sequence so id = "LD" would return "LD57", not "LDDP" - // Implementation assumes airport codes are unique. - // Returns NULL if unsucessfull. - const FGAirport* findFirstById( const string& id, bool exact = false ); + // Search for the next airport in ASCII sequence to the supplied id. + // eg. id = "KDC" or "KDCA" would both return "KDCA". + // If exact = true then only exact matches are returned. + // NOTE: Numbers come prior to A-Z in ASCII sequence so id = "LD" would return "LD57", not "LDDP" + // Implementation assumes airport codes are unique. + // Returns NULL if unsucessfull. + const FGAirport* findFirstById( const string& id, bool exact = false ); // search for the airport closest to the specified position // (currently a linear inefficient search so it's probably not @@ -494,6 +496,11 @@ public: * Return a specific airport, by position. */ const FGAirport *getAirport( unsigned int index ) const; + + /** + * Return a pointer to the raw airport list + */ + inline const airport_list* getAirportList() { return(&airports_array); } /** * Mark the specified airport record as not having metar