X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Fxmlloader.hxx;h=47e34daaf7ca8850f16ea0a74ee61f0ea4a75590;hb=2dee4ef14ff449381d11ef2d55d07b2e199677af;hp=eb066495f09a2c6fc52d6c664248cd49c4e64345;hpb=70be1629e61d9b751a2f73df30b83bb1be6ca4fe;p=flightgear.git diff --git a/src/Airports/xmlloader.hxx b/src/Airports/xmlloader.hxx index eb066495f..47e34daaf 100644 --- a/src/Airports/xmlloader.hxx +++ b/src/Airports/xmlloader.hxx @@ -16,23 +16,39 @@ #ifndef _XML_LOADER_HXX_ #define _XML_LOADER_HXX_ -#include - class FGAirportDynamics; class FGRunwayPreference; class FGSidStar; - +class XMLVisitor; // ffrom easyxml.hxx class XMLLoader { public: XMLLoader(); ~XMLLoader(); - static string expandICAODirs(const string in); + static void load(FGRunwayPreference* p); static void load(FGAirportDynamics* d); static void load(FGSidStar* s); + /** + * Search the scenery for a file name of the form: + * I/C/A/ICAO.filename.xml + * and parse it as an XML property list, passing the data to the supplied + * visitor. If no such file could be found, returns false, otherwise returns + * true. Other failures (malformed XML, etc) with throw an exception. + */ + static bool loadAirportXMLDataIntoVisitor(const std::string& aICAO, + const std::string& aFileName, XMLVisitor& aVisitor); + + /** + * Search the scenery for a file name of the form: + * I/C/A/ICAO.filename.xml + * and return the corresponding SGPath if found (and true), + * or false and invalid path if no matching data could be found + */ + static bool findAirportData(const std::string& aICAO, + const std::string& aFileName, SGPath& aPath); }; #endif