~ubuntu-branches/debian/sid/flightgear/sid

« back to all changes in this revision

Viewing changes to src/Airports/runwayprefs.hxx

  • Committer: Package Import Robot
  • Author(s): Markus Wanner, Markus Wanner, Rebecca Palmer
  • Date: 2014-01-21 22:31:02 UTC
  • mfrom: (1.3.1) (15.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20140121223102-cjw7g9le25acd119
Tags: 3.0.0~git20140204+c99ea4-1
[ Markus Wanner ]
* Upload to unstable.
* Adjust B-D to allow building on kfreebsd-*. Closes: #724686.
* Add a lintian-overrides on autotools; we use cmake.
* Upstream corrected the fgfs manpage. Closes: #556362.
* Drop unnecessary man page for gl-info. Closes: #698308.
* Drop README.Linux: it's outdated to the point of uselessness.
  Closes: #574173.
* Add an upper limit of libsimgear-dev versions that flightgear can be
  built with. Closes: #738436.
* Drop the libsvn-dev dependency, neither flightgear nor simgear depend
  on libsvn, anymore. Closes: #682947.
* List icons in debian/install rather than copying around from rules.
* Update menu entry for flightgear, add one for fgcom; add .xpm icons.
  Closes: #713924.
* flightgear.desktop: add German translation
* Bump Standards-Version to 3.9.5; no changes needed.

[ Rebecca Palmer ]
* New upstream release.
* Install the icons (based on code by Saikrishna Arcot).  (Not a
  complete fix for LP908153 as it only sets the menu/Dash icon, not the
  running window's icon, but better than nothing).
* Disable screensaver while running. Closes: LP#793599. Add required
  libdbus-1-dev dependency.
* Remove outdated README.Debian.
* Terrasync now works after just ticking the box. Closes: #252899.
* Always set Terrasync directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#ifndef _RUNWAYPREFS_HXX_
25
25
#define _RUNWAYPREFS_HXX_
26
26
 
 
27
#include "airports_fwd.hxx"
 
28
 
 
29
#include <simgear/compiler.h>
27
30
#include <time.h>
28
 
#include <vector>
29
 
#include <string>
30
 
 
31
 
#include <simgear/compiler.h>
32
 
 
33
 
using std::vector;
34
 
using std::string;
35
 
 
36
 
typedef vector<time_t> timeVec;
37
 
typedef vector<time_t>::const_iterator timeVecConstIterator;
38
 
 
39
 
typedef vector<string> stringVec;
40
 
typedef vector<string>::iterator stringVecIterator;
41
 
typedef vector<string>::const_iterator stringVecConstIterator;
42
 
 
43
 
class FGAirport;
 
31
 
 
32
typedef std::vector<time_t> timeVec;
 
33
typedef std::vector<time_t>::const_iterator timeVecConstIterator;
 
34
 
 
35
typedef std::vector<std::string> stringVec;
 
36
typedef std::vector<std::string>::iterator stringVecIterator;
 
37
typedef std::vector<std::string>::const_iterator stringVecConstIterator;
 
38
 
44
39
 
45
40
/***************************************************************************/
46
41
class ScheduleTime {
54
49
  ScheduleTime() : tailWind(0), crssWind(0) {};
55
50
  ScheduleTime(const ScheduleTime &other);
56
51
  ScheduleTime &operator= (const ScheduleTime &other);
57
 
  string getName(time_t dayStart);
 
52
  std::string getName(time_t dayStart);
58
53
 
59
54
  void clear();
60
55
  void addStartTime(time_t time)     { start.push_back(time);            };
61
56
  void addEndTime  (time_t time)     { end.  push_back(time);            };
62
 
  void addScheduleName(const string& sched) { scheduleNames.push_back(sched);   };
 
57
  void addScheduleName(const std::string& sched) { scheduleNames.push_back(sched);   };
63
58
  void setTailWind(double wnd)  { tailWind = wnd;                        };
64
59
  void setCrossWind(double wnd) { tailWind = wnd;                        };
65
60
 
73
68
class RunwayList
74
69
{
75
70
private:
76
 
  string type;
 
71
  std::string type;
77
72
  stringVec preferredRunways;
78
73
public:
79
74
  RunwayList() {};
80
75
  RunwayList(const RunwayList &other);
81
76
  RunwayList& operator= (const RunwayList &other);
82
77
 
83
 
  void set(const string&, const string&);
 
78
  void set(const std::string&, const std::string&);
84
79
  void clear();
85
80
 
86
 
  string getType() { return type; };
 
81
  std::string getType() { return type; };
87
82
  stringVec *getRwyList() { return &preferredRunways;    };
88
 
  string getRwyList(int j) { return preferredRunways[j]; };
 
83
  std::string getRwyList(int j) { return preferredRunways[j]; };
89
84
};
90
85
 
91
 
typedef vector<RunwayList> RunwayListVec;
92
 
typedef vector<RunwayList>::iterator RunwayListVectorIterator;
93
 
typedef vector<RunwayList>::const_iterator RunwayListVecConstIterator;
94
 
 
95
 
 
96
86
/*****************************************************************************/
97
87
 
98
88
class RunwayGroup
99
89
{
100
90
private:
101
 
  string name;
 
91
  std::string name;
102
92
  RunwayListVec rwyList;
103
93
  int active;
104
94
  //stringVec runwayNames;
110
100
  RunwayGroup(const RunwayGroup &other);
111
101
  RunwayGroup &operator= (const RunwayGroup &other);
112
102
 
113
 
  void setName(const string& nm) { name = nm;                };
 
103
  void setName(const std::string& nm) { name = nm;                };
114
104
  void add(const RunwayList& list) { rwyList.push_back(list);};
115
105
  void setActive(const FGAirport* airport, double windSpeed, double windHeading, double maxTail, double maxCross, stringVec *curr);
116
106
 
117
107
  int getNrActiveRunways() { return nrActive;};
118
 
  void getActive(int i, string& name, string& type);
 
108
  void getActive(int i, std::string& name, std::string& type);
119
109
 
120
 
  string getName() { return name; };
 
110
  std::string getName() { return name; };
121
111
  void clear() { rwyList.clear(); }; 
122
112
  //void add(string, string);
123
113
};
124
114
 
125
 
typedef vector<RunwayGroup> PreferenceList;
126
 
typedef vector<RunwayGroup>::iterator PreferenceListIterator;
127
 
typedef vector<RunwayGroup>::const_iterator PreferenceListConstIterator;
128
 
 
129
115
/******************************************************************************/
130
116
 
131
117
class FGRunwayPreference {
148
134
  FGRunwayPreference & operator= (const FGRunwayPreference &other);
149
135
 
150
136
  ScheduleTime *getSchedule(const char *trafficType);
151
 
  RunwayGroup *getGroup(const string& groupName);
 
137
  RunwayGroup *getGroup(const std::string& groupName);
152
138
 
153
 
  string getId();
 
139
  std::string getId();
154
140
 
155
141
  bool available() { return initialized; };
156
142
  void setInitialized(bool state) { initialized = state; };