Add a method to return a const pointer to the raw airport data, plus a couple of whitespace cleanups
This commit is contained in:
parent
49b6bef6bb
commit
a7e6a0e294
1 changed files with 15 additions and 8 deletions
|
@ -444,6 +444,8 @@ typedef airport_map::iterator airport_map_iterator;
|
||||||
typedef airport_map::const_iterator const_airport_map_iterator;
|
typedef airport_map::const_iterator const_airport_map_iterator;
|
||||||
|
|
||||||
typedef vector < FGAirport * > airport_list;
|
typedef vector < FGAirport * > airport_list;
|
||||||
|
typedef airport_list::iterator airport_list_iterator;
|
||||||
|
typedef airport_list::const_iterator const_airport_list_iterator;
|
||||||
|
|
||||||
|
|
||||||
class FGAirportList {
|
class FGAirportList {
|
||||||
|
@ -467,16 +469,16 @@ public:
|
||||||
const double elevation, const string& name, const bool has_metar );
|
const double elevation, const string& name, const bool has_metar );
|
||||||
|
|
||||||
// search for the specified id.
|
// search for the specified id.
|
||||||
// Returns NULL if unsucessfull.
|
// Returns NULL if unsucessfull.
|
||||||
FGAirport* search( const string& id );
|
FGAirport* search( const string& id );
|
||||||
|
|
||||||
// Search for the next airport in ASCII sequence to the supplied id.
|
// Search for the next airport in ASCII sequence to the supplied id.
|
||||||
// eg. id = "KDC" or "KDCA" would both return "KDCA".
|
// eg. id = "KDC" or "KDCA" would both return "KDCA".
|
||||||
// If exact = true then only exact matches are returned.
|
// 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"
|
// NOTE: Numbers come prior to A-Z in ASCII sequence so id = "LD" would return "LD57", not "LDDP"
|
||||||
// Implementation assumes airport codes are unique.
|
// Implementation assumes airport codes are unique.
|
||||||
// Returns NULL if unsucessfull.
|
// Returns NULL if unsucessfull.
|
||||||
const FGAirport* findFirstById( const string& id, bool exact = false );
|
const FGAirport* findFirstById( const string& id, bool exact = false );
|
||||||
|
|
||||||
// search for the airport closest to the specified position
|
// search for the airport closest to the specified position
|
||||||
// (currently a linear inefficient search so it's probably not
|
// (currently a linear inefficient search so it's probably not
|
||||||
|
@ -494,6 +496,11 @@ public:
|
||||||
* Return a specific airport, by position.
|
* Return a specific airport, by position.
|
||||||
*/
|
*/
|
||||||
const FGAirport *getAirport( unsigned int index ) const;
|
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
|
* Mark the specified airport record as not having metar
|
||||||
|
|
Loading…
Add table
Reference in a new issue