| 1 | |
| 2 | #include "config.h" |
| 3 | |
| 4 | // implement various test-only methods on classes |
| 5 | |
| 6 | #include <Airports/groundnetwork.hxx> |
| 7 | #include <Airports/airport.hxx> |
| 8 | #include <Airports/xmlloader.hxx> |
| 9 | #include <Navaids/procedure.hxx> |
| 10 | |
| 11 | void FGAirport::testSuiteInjectGroundnetXML(const SGPath& path) |
| 12 | { |
| 13 | _groundNetwork.reset(new FGGroundNetwork(const_cast<FGAirport*>(this))); |
| 14 | XMLLoader::loadFromPath(_groundNetwork.get(), path); |
| 15 | _groundNetwork->init(); |
| 16 | } |
| 17 | |
| 18 | void FGAirport::testSuiteInjectProceduresXML(const SGPath& path) |
| 19 | { |
| 20 | if (mProceduresLoaded) { |
| 21 | SG_LOG(SG_GENERAL, SG_ALERT, "Procedures already loaded for" << ident()); |
| 22 | mSIDs.clear(); |
| 23 | mSTARs.clear(); |
| 24 | mApproaches.clear(); |
| 25 | } |
| 26 | |
| 27 | mProceduresLoaded = true; |
| 28 | flightgear::RouteBase::loadAirportProcedures(path, const_cast<FGAirport*>(this)); |
| 29 | } |
| 30 |