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;
67 FGParking(const FGParking &other) :
69 heading (other.heading),
70 radius (other.radius),
71 parkingName (other.parkingName),
73 airlineCodes (other.airlineCodes),
74 available (other.available),
75 pushBackPoint(other.pushBackPoint),
76 pushBackRoute(other.pushBackRoute)
81 FGParking& operator =(const FGParking &other)
83 FGTaxiNode::operator=(other);
84 heading = other.heading;
85 radius = other.radius;
86 parkingName = other.parkingName;
88 airlineCodes = other.airlineCodes;
89 available = other.available;
90 pushBackPoint= other.pushBackPoint;
91 pushBackRoute= other.pushBackRoute;
95 // FGParking(double lat,
100 // const string& name,
101 // const string& tpe,
102 // const string& codes);
104 void setHeading (double hdg) { heading = hdg; };
105 void setRadius (double rad) { radius = rad; };
107 void setName (const string& name) { parkingName = name; };
108 void setType (const string& tpe) { type = tpe; };
109 void setCodes (const string& codes){ airlineCodes= codes;};
111 void setPushBackRoute(FGTaxiRoute *val) { pushBackRoute = val; };
112 void setPushBackPoint(int val) { pushBackPoint = val; };
114 bool isAvailable () { return available;};
115 void setAvailable(bool val) { available = val; };
117 double getHeading () { return heading; };
118 double getRadius () { return radius; };
120 string getType () { return type; };
121 string getCodes () { return airlineCodes;};
122 string getName () { return parkingName; };
124 FGTaxiRoute * getPushBackRoute () { return pushBackRoute; };
126 int getPushBackPoint () { return pushBackPoint; };
128 bool operator< (const FGParking &other) const {
129 return radius < other.radius; };
132 typedef vector<FGParking> FGParkingVec;
133 typedef vector<FGParking>::iterator FGParkingVecIterator;
134 typedef vector<FGParking>::const_iterator FGParkingVecConstIterator;