From 32f4fdfaf767e1266b463fdc90219008f8cb5082 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer <torsten@ลง3r.de> Date: Sat, 28 Mar 2015 00:33:26 +0100 Subject: [PATCH] Add simple getter for all runways to FGAirport --- src/Airports/airport.cxx | 8 ++++++++ src/Airports/airport.hxx | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/Airports/airport.cxx b/src/Airports/airport.cxx index 750ccac82..60a711bf5 100644 --- a/src/Airports/airport.cxx +++ b/src/Airports/airport.cxx @@ -314,6 +314,14 @@ bool FGAirport::hasHardRunwayOfLengthFt(double aLengthFt) const return false; } +//------------------------------------------------------------------------------ +FGRunwayList FGAirport::getRunways() const +{ + loadRunways(); + + return mRunways; +} + //------------------------------------------------------------------------------ FGRunwayList FGAirport::getRunwaysWithoutReciprocals() const { diff --git a/src/Airports/airport.hxx b/src/Airports/airport.hxx index 6713e77d1..b9155d68d 100644 --- a/src/Airports/airport.hxx +++ b/src/Airports/airport.hxx @@ -130,6 +130,11 @@ class FGAirport : public FGPositioned * an airport *once*, not *twice* - eg mapping and nav-display code. */ FGRunwayList getRunwaysWithoutReciprocals() const; + + /** + * Retrieve all runways at the airport + */ + FGRunwayList getRunways() const; /** * Useful predicate for FMS/GPS/NAV displays and similar - check if this