~ubuntu-branches/ubuntu/precise/flightgear/precise

« back to all changes in this revision

Viewing changes to src/Airports/xmlloader.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Ove Kaaven
  • Date: 2011-01-30 15:46:35 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110130154635-rlynmg9n5hzxq5xe
Tags: 2.0.0-3
* Recommend fgfs-aircraft-base and fgfs-models-base.
  Closes. #610276.
* Added note about scenery SharedModels.tgz to README.Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#ifndef _XML_LOADER_HXX_
17
17
#define _XML_LOADER_HXX_
18
18
 
19
 
#include <simgear/xml/easyxml.hxx>
20
 
 
21
19
class FGAirportDynamics;
22
20
class FGRunwayPreference;
 
21
class FGSidStar;
23
22
 
 
23
class XMLVisitor; // ffrom easyxml.hxx
24
24
 
25
25
class XMLLoader {
26
26
public:
27
27
  XMLLoader();
28
28
  ~XMLLoader();
29
 
 
 
29
  
30
30
  static void load(FGRunwayPreference* p);
31
 
  static void load(FGAirportDynamics* d);
32
 
  
 
31
  static void load(FGAirportDynamics*  d);
 
32
  static void load(FGSidStar*          s);
 
33
  
 
34
  /**
 
35
   * Search the scenery for a file name of the form:
 
36
   *   I/C/A/ICAO.filename.xml
 
37
   * and parse it as an XML property list, passing the data to the supplied
 
38
   * visitor. If no such file could be found, returns false, otherwise returns
 
39
   * true. Other failures (malformed XML, etc) with throw an exception.
 
40
   */
 
41
  static bool loadAirportXMLDataIntoVisitor(const std::string& aICAO, 
 
42
    const std::string& aFileName, XMLVisitor& aVisitor);
 
43
  
 
44
  /**
 
45
   * Search the scenery for a file name of the form:
 
46
   *   I/C/A/ICAO.filename.xml
 
47
   * and return the corresponding SGPath if found (and true),
 
48
   * or false and invalid path if no matching data could be found
 
49
   */
 
50
  static bool findAirportData(const std::string& aICAO, 
 
51
    const std::string& aFileName, SGPath& aPath);
33
52
};
34
53
 
35
54
#endif