]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runways.hxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / Airports / runways.hxx
index 4b6e5e3d131ffda22a196fb72e1cd993ccfb8dbd..a0ff3ec2694dec3eb0dd44a981800046a81946ad 100644 (file)
 
 #include <simgear/compiler.h>
 
-#ifdef SG_HAVE_STD_INCLUDES
-#  include <istream>
-#elif defined( FG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
-#elif defined( __BORLANDC__ )
-#  include <iostream>
-#else
-#  include <istream.h>
-#endif
-
 #include STL_STRING
 #include <vector>
 
-#define NDEBUG                 // she don't work without it.
-#include <mk4.h>
-#include <mk4str.h>
-#undef NDEBUG
-
-FG_USING_STD(string);
-FG_USING_STD(vector);
+// Forward declarations.
+class c4_Storage;
+class c4_View;
 
-#if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
-FG_USING_STD(istream);
-#endif
+SG_USING_STD(string);
+SG_USING_STD(vector);
 
 
 class FGRunway {
@@ -81,22 +66,11 @@ public:
 
 public:
 
-    FGRunway();
-    ~FGRunway();
+    FGRunway() {}
+    ~FGRunway() {}
 
 };
 
-inline istream&
-operator >> ( istream& in, FGRunway& a )
-{
-    int tmp;
-
-    return in >> a.rwy_no >> a.lat >> a.lon >> a.heading >> a.length >> a.width
-             >> a.surface_flags >> a.end1_flags >> tmp >> tmp >> a.end2_flags
-             >> tmp >> tmp;
-}
-
-
 class FGRunways {
 
 private:
@@ -113,12 +87,20 @@ public:
     // Destructor
     ~FGRunways();
 
-    // search for the specified id.
+    // search for the specified apt id.
     // Returns true if successful, otherwise returns false.
     // On success, runway data is returned thru "runway" pointer.
     // "runway" is not changed if "apt" is not found.
-    bool search( const string& id, FGRunway* runway );
-    FGRunway search( const string& id );
+    bool search( const string& aptid, FGRunway* runway );
+    bool search( const string& aptid, const string& rwyno, FGRunway* runway );
+
+    // DCL - search for runway closest to desired heading in degrees
+    bool search( const string& aptid, const int hdg, FGRunway* runway );
+
+    // Return the runway number of the runway closest to a given heading
+    string search( const string& aptid, const int tgt_hdg );
+
+    FGRunway search( const string& aptid );
     bool next( FGRunway* runway );
     FGRunway next();
 };