1 // parking.hxx - A class to handle airport startup locations in
2 // FlightGear. This code is intended to be used by AI code and
3 // initial user-startup location selection.
5 // Written by Durk Talsma, started December 2004.
7 // Copyright (C) 2004 Durk Talsma.
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License as
11 // published by the Free Software Foundation; either version 2 of the
12 // License, or (at your option) any later version.
14 // This program is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // General Public License for more details.
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 # error This library requires C++
32 #include <simgear/compiler.h>
45 class FGParking : public FGTaxiNode {
55 FGTaxiRoute *pushBackRoute;
70 FGParking(const FGParking &other) :
72 heading (other.heading),
73 radius (other.radius),
74 parkingName (other.parkingName),
76 airlineCodes (other.airlineCodes),
77 available (other.available),
78 pushBackPoint(other.pushBackPoint),
79 pushBackRoute(other.pushBackRoute)
84 FGParking& operator =(const FGParking &other)
86 FGTaxiNode::operator=(other);
87 heading = other.heading;
88 radius = other.radius;
89 parkingName = other.parkingName;
91 airlineCodes = other.airlineCodes;
92 available = other.available;
93 pushBackPoint= other.pushBackPoint;
94 pushBackRoute= other.pushBackRoute;
98 // FGParking(double lat,
103 // const string& name,
104 // const string& tpe,
105 // const string& codes);
107 void setHeading (double hdg) { heading = hdg; };
108 void setRadius (double rad) { radius = rad; };
110 void setName (const string& name) { parkingName = name; };
111 void setType (const string& tpe) { type = tpe; };
112 void setCodes (const string& codes){ airlineCodes= codes;};
114 void setPushBackRoute(FGTaxiRoute *val) { pushBackRoute = val; };
115 void setPushBackPoint(int val) { pushBackPoint = val; };
117 bool isAvailable () { return available;};
118 void setAvailable(bool val) { available = val; };
120 double getHeading () { return heading; };
121 double getRadius () { return radius; };
123 string getType () { return type; };
124 string getCodes () { return airlineCodes;};
125 string getName () { return parkingName; };
127 FGTaxiRoute * getPushBackRoute () { return pushBackRoute; };
129 int getPushBackPoint () { return pushBackPoint; };
131 bool operator< (const FGParking &other) const {
132 return radius < other.radius; };
135 typedef vector<FGParking> FGParkingVec;
136 typedef vector<FGParking>::iterator FGParkingVecIterator;
137 typedef vector<FGParking>::const_iterator FGParkingVecConstIterator;