FlightGear next
xmlloader.hxx
Go to the documentation of this file.
1// This program is free software; you can redistribute it and/or
2// modify it under the terms of the GNU General Public License as
3// published by the Free Software Foundation; either version 2 of the
4// License, or (at your option) any later version.
5//
6// This program is distributed in the hope that it will be useful, but
7// WITHOUT ANY WARRANTY; without even the implied warranty of
8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9// General Public License for more details.
10//
11// You should have received a copy of the GNU General Public License
12// along with this program; if not, write to the Free Software
13// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14//
15
16#ifndef _XML_LOADER_HXX_
17#define _XML_LOADER_HXX_
18
19#include "airports_fwd.hxx"
20
21class XMLVisitor; // ffrom easyxml.hxx
22class SGPath;
23
24class XMLLoader {
25public:
26 XMLLoader();
27 ~XMLLoader();
28
29 static void load(FGRunwayPreference* p);
30 static void load(FGGroundNetwork* net);
31 static void load(FGSidStar* s);
32
33 static void loadFromStream(FGGroundNetwork* net, std::istream& inData);
34 static void loadFromPath(FGGroundNetwork* net, const SGPath& path);
35
43 static bool loadAirportXMLDataIntoVisitor(const std::string& aICAO,
44 const std::string& aFileName, XMLVisitor& aVisitor);
45
52 static bool findAirportData(const std::string& aICAO,
53 const std::string& aFileName, SGPath& aPath);
54};
55
56#endif
#define p(x)
static void loadFromPath(FGGroundNetwork *net, const SGPath &path)
Definition xmlloader.cxx:86
static void load(FGSidStar *s)
static void load(FGRunwayPreference *p)
static void loadFromStream(FGGroundNetwork *net, std::istream &inData)
Definition xmlloader.cxx:72
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 parse it as an XML proper...
static bool findAirportData(const std::string &aICAO, const std::string &aFileName, SGPath &aPath)
Search the scenery for a file name of the form: I/C/A/ICAO.filename.xml and return the corresponding ...