]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runways.hxx
This should apply, and everything should build cleanly, in isolation from the
[flightgear.git] / src / Airports / runways.hxx
index 9c47124d26668d22e5dc5f48ad3b15b036dd4fff..6dcf4e76d9370a9d04178551fdaf49102d54103d 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started August 2000.
 //
-// Copyright (C) 2000  Curtis L. Olson  - curt@flightgear.org
+// Copyright (C) 2000  Curtis L. Olson  - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -36,7 +36,7 @@
 
 #include <simgear/compiler.h>
 
-#include STL_STRING
+#include <string>
 #include <map>
 
 SG_USING_STD(string);
@@ -44,7 +44,7 @@ SG_USING_STD(multimap);
 
 
 struct ltstr {
-    bool operator()(const string s1, const string s2) const {
+    bool operator()(const string& s1, const string& s2) const {
         return s1 < s2;
     }
 };
@@ -52,26 +52,26 @@ struct ltstr {
 
 struct FGRunway {
 
-    string type;
-    string id;
-    string rwy_no;
-
-    double lon;
-    double lat;
-    double heading;
-    double length;
-    double width;
-    
-    string surface_flags;
-    string end1_flags;
-    string end2_flags;
-
-    double end1_displaced_threshold;
-    double end2_displaced_threshold;
-
-    double end1_stopway;
-    double end2_stopway;
-
+    string _id;
+    string _rwy_no;
+    string _type;                // runway / taxiway
+
+    double _lon;
+    double _lat;
+    double _heading;
+    double _length;
+    double _width;
+    double _displ_thresh1;
+    double _displ_thresh2;
+    double _stopway1;
+    double _stopway2;
+
+    string _lighting_flags;
+    int _surface_code;
+    string _shoulder_code;
+    int _marking_code;
+    double _smoothness;
+    bool   _dist_remaining;
 };
 
 typedef multimap < string, FGRunway, ltstr > runway_map;
@@ -87,12 +87,22 @@ private:
 
 public:
 
-    // Constructor
-    FGRunwayList( const string& file );
+    // Constructor (new)
+    FGRunwayList() {}
 
     // Destructor
     ~FGRunwayList();
 
+    // add an entry to the list
+    void add( const string& id, const string& rwy_no,
+              const double longitude, const double latitude,
+              const double heading, const double length, const double width,
+              const double displ_thresh1, const double displ_thresh2,
+              const double stopway1, const double stopway2,
+              const string& lighting_flags, const int surface_code,
+              const string& shoulder_code, const int marking_code,
+              const double smoothness, const bool dist_remaining );
+
     // search for the specified apt id.
     // Returns true if successful, otherwise returns false.
     // On success, runway data is returned thru "runway" pointer.