]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/apt_loader.cxx
Conditional compilation of ATCDCL module. Use --disable-atcdcl to try building flight...
[flightgear.git] / src / Airports / apt_loader.cxx
index 0cb01f3bb4d6c32945f568a1b452d4973f6cedb8..3dfcdf0591e0a658424214ebefb99fa51d5d0609 100644 (file)
@@ -45,7 +45,9 @@
 #include "simple.hxx"
 #include "runways.hxx"
 #include "pavement.hxx"
-#include <ATCDCL/commlist.hxx>
+#if ENABLE_ATCDCL
+#    include <ATCDCL/commlist.hxx>
+#endif
 
 #include <iostream>
 
@@ -75,7 +77,12 @@ public:
      last_apt_type("")
   {}
 
+
+#ifdef ENABLE_ATCDCL
   void parseAPT(const string &aptdb_file, FGCommList *comm_list)
+#else
+  void parseAPT(const string &aptdb_file)
+#endif
   {
     sg_gzifstream in( aptdb_file );
 
@@ -305,6 +312,9 @@ private:
                 displ_thresh2, stopway2, surface_code, true);
 
       runways.push_back(reciprocal);
+      
+      rwy->setReciprocalRunway(reciprocal);
+      reciprocal->setReciprocalRunway(rwy);
     }
   }
 
@@ -354,6 +364,9 @@ private:
               pos, heading_2, length, width, 
               displ_thresh2, stopway2, surface_code, true);
     runways.push_back(reciprocal);
+    
+    rwy->setReciprocalRunway(reciprocal);
+    reciprocal->setReciprocalRunway(rwy);
   }
 
   void parseWaterRunwayLine850(const vector<string>& token)
@@ -392,6 +405,9 @@ private:
               pos, heading_2, length, width, 
               0.0, 0.0, 13, true);
     runways.push_back(reciprocal);
+    
+    rwy->setReciprocalRunway(reciprocal);
+    reciprocal->setReciprocalRunway(rwy);
   }
 
   void parseHelipadLine850(const vector<string>& token)
@@ -452,7 +468,7 @@ private:
       pvt->addNode(pos, num == 113);
     }
   }
-  
+#if ENABLE_ATCDCL  
   void parseATISLine(FGCommList *comm_list, const vector<string>& token) 
   {
     if ( rwy_count <= 0 ) {
@@ -496,19 +512,27 @@ private:
     << "  type: " << a.type );
 #endif
   }
+#endif
 };
 
+
 // Load the airport data base from the specified aptdb file.  The
 // metar file is used to mark the airports as having metar available
 // or not.
 bool fgAirportDBLoad( const string &aptdb_file, 
+#if ENABLE_ATCDCL
         FGCommList *comm_list, const std::string &metar_file )
+#else
+        const std::string &metar_file )
+#endif
 {
 
    APTLoader ld;
-
+#if ENABLE_ATCDCL
    ld.parseAPT(aptdb_file, comm_list);
-
+#else
+   ld.parseAPT(aptdb_file);
+#endif
     //
     // Load the metar.dat file and update apt db with stations that
     // have metar data.