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>
33 #include <simgear/sg_inlines.h>
36 #include <memory> // for std::auto_ptr
41 class FGParking : public FGTaxiNode
46 const std::string parkingName;
47 const std::string type;
48 const std::string airlineCodes;
49 const PositionedID pushBackPoint;
51 SG_DISABLE_COPY(FGParking);
53 FGParking(PositionedID aGuid, const SGGeod& pos,
54 double heading, double radius,
55 const std::string& name, const std::string& type,
56 const std::string& codes,
57 PositionedID pushBackNode);
60 void setHeading (double hdg) { heading = hdg; };
61 void setRadius (double rad) { radius = rad; };
63 void setName (const std::string& name) { parkingName = name; };
64 void setType (const std::string& tpe) { type = tpe; };
65 void setCodes (const std::string& codes){ airlineCodes= codes;};
68 double getHeading () const { return heading; };
69 double getRadius () const { return radius; };
71 std::string getType () const { return type; };
72 std::string getCodes () const { return airlineCodes;};
73 std::string getName () const { return parkingName; };
75 // TODO do parkings have different name and ident?
76 virtual const std::string& name() const { return parkingName; }
78 int getPushBackPoint () { return pushBackPoint; };
80 bool operator< (const FGParking &other) const {
81 return radius < other.radius; };