Debian Codegraph @

src/Airports/parking.hxx

raw symbols SCIP
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.
4 //
5 // Written by Durk Talsma, started December 2004.
6 //
7 // Copyright (C) 2004 Durk Talsma.
8 //
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.
13 //
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.
18 //
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.
22 //
23 // $Id$
24
25 #ifndef _PARKING_HXX_
26 #define _PARKING_HXX_
27
28 #include <simgear/compiler.h>
29 #include <simgear/sg_inlines.h>
30
31 #include <string>
32
33 #include "gnnode.hxx"
34 #include <Airports/airports_fwd.hxx>
35
36 class FGParking : public FGTaxiNode
37 {
38 private:
39 const double heading;
40 const double radius;
41 const std::string type;
42 const std::string airlineCodes;
43 FGTaxiNodeRef pushBackPoint;
44
45 SG_DISABLE_COPY(FGParking);
46 public:
47 static bool isType(FGPositioned::Type ty)
48 { return (ty == FGPositioned::PARKING); }
49
50 FGParking(int index,
51 const SGGeod& pos,
52 double heading, double radius,
53 const std::string& name, const std::string& type,
54 const std::string& codes);
55 virtual ~FGParking() = default;
56
57 double getHeading () const { return heading; };
58 double getRadius () const { return radius; };
59
60 std::string getType () const { return type; };
61 std::string getCodes () const { return airlineCodes;};
62 std::string getName () const { return ident(); };
63
64 void setPushBackPoint(const FGTaxiNodeRef& node);
65 FGTaxiNodeRef getPushBackPoint () { return pushBackPoint; };
66
67 bool operator< (const FGParking &other) const {
68 return radius < other.radius; };
69 };
70
71 #endif