]> git.mxchange.org Git - flightgear.git/commitdiff
Update for path-aware easyXML API
authorJames Turner <zakalawe@mac.com>
Sun, 3 Jul 2016 22:43:39 +0000 (23:43 +0100)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Sep 2016 21:27:46 +0000 (23:27 +0200)
src/Airports/xmlloader.cxx
src/FDM/YASim/YASim.cxx
src/FDM/YASim/proptest.cpp
src/FDM/YASim/yasim-test.cpp
src/Navaids/FlightPlan.cxx
src/Navaids/route.cxx
src/Traffic/TrafficMgr.cxx

index d5b90ad2f586492dc2fffb42ed478e260a63f45c..1ad823919a36e02f75634c2935c79695cc53bf1e 100644 (file)
@@ -54,7 +54,7 @@ void XMLLoader::load(FGGroundNetwork* net)
   t.stamp();
   try {
       FGGroundNetXMLLoader visitor(net);
-      readXML(path.local8BitStr(), visitor);
+      readXML(path, visitor);
   } catch (sg_exception& e) {
     SG_LOG(SG_NAVAID, SG_INFO, "parsing groundnet XML failed:" << e.getFormattedMessage());
   }
@@ -106,7 +106,7 @@ bool XMLLoader::loadAirportXMLDataIntoVisitor(const string& aICAO,
   }
 
   SG_LOG(SG_GENERAL, SG_DEBUG, "loadAirportXMLDataIntoVisitor: loading from " << path);
-  readXML(path.local8BitStr(), aVisitor);
+  readXML(path, aVisitor);
   return true;
 }
 
index 22073380a24a60093e95bf5583cb18937c3afcf6..868f65f88bd66b6309cc672791965061b4382ba1 100644 (file)
@@ -170,7 +170,7 @@ void YASim::init()
     f.append(fgGetString("/sim/aero"));
     f.concat(".xml");
     try {
-        readXML(f.local8BitStr(), *_fdm);
+        readXML(f, *_fdm);
     } catch (const sg_exception &e) {
         SG_LOG(SG_FLIGHT, SG_ALERT,
                "Error reading YASim FDM: '" << f << "'" << std::endl
index cc4ffc42110fe2bfe8b1d978eed7c37175bc2038..49abc1916e156d2f5efcb4546ad63a16c2382352 100644 (file)
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
 
     // Read
     try {
-        readXML(argv[1], fdm);
+        readXML(SGPath::fromLocal8Bit(argv[1]), fdm);
     } catch (const sg_exception &e) {
         printf("XML parse error: %s (%s)\n",
                e.getFormattedMessage().c_str(), e.getOrigin());
index 87b834e53b1d51d017d3603c1c4fc0d96200eb6c..dbd860887711d54f411e0250214214bfe67205d9 100644 (file)
@@ -83,7 +83,7 @@ int main(int argc, char** argv)
     // Read
     try {
         string file = argv[1];
-        readXML(file, *fdm);
+        readXML(SGPath(file), *fdm);
     } catch (const sg_exception &e) {
         printf("XML parse error: %s (%s)\n",
                e.getFormattedMessage().c_str(), e.getOrigin());
index d5f91323d9da67eb4044e827076f6a5d5ba1cfaf..6e2658da215f36b37e4339b8d3a77d8fe51a607e 100644 (file)
@@ -727,7 +727,7 @@ bool FlightPlan::loadGpxFormat(const SGPath& path)
     GpxXmlVisitor gpxVistor(this);
     try
     {
-        readXML(path.local8BitStr(), gpxVistor);
+        readXML(path, gpxVistor);
     } catch (sg_exception& e)
     {
         // XML parsing fails => not a GPX XML file
index 43109b85a1cc198bc7edaf8d963d6dec62a5d44e..780489eba091007087928fd6f81f08be6a5f7100 100644 (file)
@@ -379,7 +379,7 @@ void RouteBase::loadAirportProcedures(const SGPath& aPath, FGAirport* aApt)
   assert(aApt);
   try {
     NavdataVisitor visitor(aApt, aPath);
-      readXML(aPath.local8BitStr(), visitor);
+      readXML(aPath, visitor);
   } catch (sg_io_exception& ex) {
     SG_LOG(SG_NAVAID, SG_WARN, "failure parsing procedures: " << aPath <<
       "\n\t" << ex.getMessage() << "\n\tat:" << ex.getLocation().asString());
index e4596a5d522377d9ce9a4329c2aad3dcd5efd805..c9908cb7dd2a07e8a54c6ad0b6354f8de9a48202 100644 (file)
@@ -167,7 +167,7 @@ public:
             SGPath path = globals->get_fg_root();
             path.append("/Traffic/");
             path.append(attval);
-            readXML(path.local8BitStr(), *this);
+            readXML(path, *this);
         }
         elementValueStack.push_back("");
         //  cout << "  " << atts.getName(i) << '=' << atts.getValue(i) << endl;
@@ -385,7 +385,7 @@ private:
             SG_LOG(SG_AI, SG_INFO, "parsing traffic in:" << p);
             simgear::PathList trafficFiles = d2.children(simgear::Dir::TYPE_FILE, ".xml");
             BOOST_FOREACH(SGPath xml, trafficFiles) {
-                readXML(xml.local8BitStr(), *this);
+                readXML(xml, *this);
                 if (_cancelThread) {
                     return;
                 }
@@ -564,7 +564,7 @@ void FGTrafficManager::init()
                 // use a SchedulerParser to parse, but run it in this thread,
                 // i.e don't start it
                 ScheduleParseThread parser(this);
-                readXML(path.local8BitStr(), parser);
+                readXML(path, parser);
             }
         } else if (path.extension() == "conf") {
             if (path.exists()) {