]> git.mxchange.org Git - flightgear.git/blob - src/Airports/runwayprefloader.hxx
Merge branch 'durk/traffic'
[flightgear.git] / src / Airports / runwayprefloader.hxx
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 _RUNWAY_PREF_LOADER_HXX_
17 #define _RUNWAY_PREF_LOADER_HXX_
18
19 #include <time.h>
20 #include <string>
21
22 #include <simgear/compiler.h>
23 #include <simgear/xml/easyxml.hxx>
24
25 #include "runwayprefs.hxx"
26
27 using std::string;
28
29 class FGRunwayPreferenceXMLLoader : public XMLVisitor {
30 public:
31     FGRunwayPreferenceXMLLoader(FGRunwayPreference* p);
32
33 protected:
34     virtual void startXML (); 
35     virtual void endXML   ();
36     virtual void startElement (const char * name, const XMLAttributes &atts);
37     virtual void endElement (const char * name);
38     virtual void data (const char * s, int len);
39     virtual void pi (const char * target, const char * data);
40     virtual void warning (const char * message, int line, int column);
41     virtual void error (const char * message, int line, int column);
42
43     time_t processTime(const string &tme);
44
45 private:
46     FGRunwayPreference* _pref;
47
48     string value;
49
50     string scheduleName;
51     ScheduleTime currTimes; // Needed for parsing;
52
53     RunwayList  rwyList;
54     RunwayGroup rwyGroup;
55 };
56
57 #endif