]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/navrecord.hxx
don't destroy iterated map entries; delete _menubar; restore closed
[flightgear.git] / src / Navaids / navrecord.hxx
index ab1ca85c0281d632e7bf4f87f88732363baf057d..8b950abc55d665a310ed60ca519a9a3e5a401017 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started May 2004.
 //
-// Copyright (C) 2004  Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2004  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
 SG_USING_STD(istream);
 
 
-#define FG_NAV_DEFAULT_RANGE 50
-#define FG_LOC_DEFAULT_RANGE 18
-#define FG_DME_DEFAULT_RANGE 50
+#define FG_NAV_DEFAULT_RANGE 50 // nm
+#define FG_LOC_DEFAULT_RANGE 18 // nm
+#define FG_DME_DEFAULT_RANGE 50 // nm
+#define FG_NAV_MAX_RANGE 300    // nm
 
 
 class FGNavRecord {
@@ -87,11 +88,11 @@ public:
     inline int get_range() const { return range; }
     inline double get_multiuse() const { return multiuse; }
     inline void set_multiuse( double m ) { multiuse = m; }
-    inline const char *get_ident() { return ident.c_str(); }
-    inline string get_name() { return name; }
-    inline string get_apt_id() { return apt_id; }
-    inline bool get_serviceable() { return serviceable; }
-    inline const char *get_trans_ident() { return trans_ident.c_str(); }
+    inline const char *get_ident() const { return ident.c_str(); }
+    inline const string& get_name() const { return name; }
+    inline const string& get_apt_id() const { return apt_id; }
+    inline bool get_serviceable() const { return serviceable; }
+    inline const char *get_trans_ident() const { return trans_ident.c_str(); }
 
     friend istream& operator>> ( istream&, FGNavRecord& );
 };
@@ -171,5 +172,36 @@ operator >> ( istream& in, FGNavRecord& n )
     return in;
 }
 
+class FGTACANRecord {
 
+    string channel;            
+    int freq;
+     
+public:
+    
+    inline FGTACANRecord(void);
+    inline ~FGTACANRecord(void) {}
+
+    inline const string& get_channel() const { return channel; }
+    inline int get_freq() const { return freq; }
+    friend istream& operator>> ( istream&, FGTACANRecord& );
+    };
+
+
+inline
+FGTACANRecord::FGTACANRecord(void) :
+    channel(""),
+    freq(0)
+    
+{
+}
+
+inline istream&
+operator >> ( istream& in, FGTACANRecord& n )
+{
+    in >> n.channel >> n.freq ;
+    //getline( in, n.name );
+
+    return in;
+}
 #endif // _FG_NAVRECORD_HXX