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 {
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
* 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