]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runwayprefs.hxx
commradio: improvements for atis speech
[flightgear.git] / src / Airports / runwayprefs.hxx
index 9b0c7485f3a8a3f37e438e7766a4b8be407115b4..7e2eced2f39ead331c71b76cc060f2ef73e298e1 100644 (file)
 #ifndef _RUNWAYPREFS_HXX_
 #define _RUNWAYPREFS_HXX_
 
-#include <time.h>
-#include <vector>
-#include <string>
+#include "airports_fwd.hxx"
 
 #include <simgear/compiler.h>
+#include <time.h>
 
-SG_USING_STD(vector);
-SG_USING_STD(string);
-
-typedef vector<time_t> timeVec;
-typedef vector<time_t>::const_iterator timeVecConstIterator;
+typedef std::vector<time_t> timeVec;
+typedef std::vector<time_t>::const_iterator timeVecConstIterator;
 
-typedef vector<string> stringVec;
-typedef vector<string>::iterator stringVecIterator;
-typedef vector<string>::const_iterator stringVecConstIterator;
+typedef std::vector<std::string> stringVec;
+typedef std::vector<std::string>::iterator stringVecIterator;
+typedef std::vector<std::string>::const_iterator stringVecConstIterator;
 
-class FGAirport;
 
 /***************************************************************************/
 class ScheduleTime {
@@ -54,12 +49,12 @@ public:
   ScheduleTime() : tailWind(0), crssWind(0) {};
   ScheduleTime(const ScheduleTime &other);
   ScheduleTime &operator= (const ScheduleTime &other);
-  string getName(time_t dayStart);
+  std::string getName(time_t dayStart);
 
   void clear();
   void addStartTime(time_t time)     { start.push_back(time);            };
   void addEndTime  (time_t time)     { end.  push_back(time);            };
-  void addScheduleName(const string& sched) { scheduleNames.push_back(sched);   };
+  void addScheduleName(const std::string& sched) { scheduleNames.push_back(sched);   };
   void setTailWind(double wnd)  { tailWind = wnd;                        };
   void setCrossWind(double wnd) { tailWind = wnd;                        };
 
@@ -73,32 +68,27 @@ public:
 class RunwayList
 {
 private:
-  string type;
+  std::string type;
   stringVec preferredRunways;
 public:
   RunwayList() {};
   RunwayList(const RunwayList &other);
   RunwayList& operator= (const RunwayList &other);
 
-  void set(const string&, const string&);
+  void set(const std::string&, const std::string&);
   void clear();
 
-  string getType() { return type; };
+  std::string getType() { return type; };
   stringVec *getRwyList() { return &preferredRunways;    };
-  string getRwyList(int j) { return preferredRunways[j]; };
+  std::string getRwyList(int j) { return preferredRunways[j]; };
 };
 
-typedef vector<RunwayList> RunwayListVec;
-typedef vector<RunwayList>::iterator RunwayListVectorIterator;
-typedef vector<RunwayList>::const_iterator RunwayListVecConstIterator;
-
-
 /*****************************************************************************/
 
 class RunwayGroup
 {
 private:
-  string name;
+  std::string name;
   RunwayListVec rwyList;
   int active;
   //stringVec runwayNames;
@@ -110,22 +100,18 @@ public:
   RunwayGroup(const RunwayGroup &other);
   RunwayGroup &operator= (const RunwayGroup &other);
 
-  void setName(const string& nm) { name = nm;                };
+  void setName(const std::string& nm) { name = nm;                };
   void add(const RunwayList& list) { rwyList.push_back(list);};
-  void setActive(const string& aptId, double windSpeed, double windHeading, double maxTail, double maxCross, stringVec *curr);
+  void setActive(const FGAirport* airport, double windSpeed, double windHeading, double maxTail, double maxCross, stringVec *curr);
 
   int getNrActiveRunways() { return nrActive;};
-  void getActive(int i, string& name, string& type);
+  void getActive(int i, std::string& name, std::string& type);
 
-  string getName() { return name; };
+  std::string getName() { return name; };
   void clear() { rwyList.clear(); }; 
   //void add(string, string);
 };
 
-typedef vector<RunwayGroup> PreferenceList;
-typedef vector<RunwayGroup>::iterator PreferenceListIterator;
-typedef vector<RunwayGroup>::const_iterator PreferenceListConstIterator;
-
 /******************************************************************************/
 
 class FGRunwayPreference {
@@ -148,9 +134,9 @@ public:
   FGRunwayPreference & operator= (const FGRunwayPreference &other);
 
   ScheduleTime *getSchedule(const char *trafficType);
-  RunwayGroup *getGroup(const string& groupName);
+  RunwayGroup *getGroup(const std::string& groupName);
 
-  string getId();
+  std::string getId();
 
   bool available() { return initialized; };
   void setInitialized(bool state) { initialized = state; };