X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Fparking.hxx;h=0cac08bbcdc9069bc2b0f97c50a3776a3e9a1e7c;hb=386aefe69358ce41a11c9afeb8f56e26758fe56b;hp=c96ab1d241248ae2a34c3d030da027dd1ee441c5;hpb=4238a46faa8fc8e9ac9174fe960eb7c5df188a4c;p=flightgear.git diff --git a/src/Airports/parking.hxx b/src/Airports/parking.hxx index c96ab1d24..0cac08bbc 100644 --- a/src/Airports/parking.hxx +++ b/src/Airports/parking.hxx @@ -31,13 +31,16 @@ #include -#include STL_STRING +#include #include #include "gnnode.hxx" -SG_USING_STD(string); -SG_USING_STD(vector); +using std::string; +using std::vector; + +class FGTaxiRoute; + class FGParking : public FGTaxiNode { private: @@ -48,20 +51,55 @@ private: string airlineCodes; bool available; - - + int pushBackPoint; + FGTaxiRoute *pushBackRoute; public: - FGParking() { available = true;}; - //FGParking(FGParking &other); - FGParking(double lat, - double lon, - double hdg, - double rad, - int idx, - const string& name, - const string& tpe, - const string& codes); + FGParking() : + heading(0), + radius(0), + available(true), + pushBackPoint(0), + pushBackRoute(0) + { + }; + + FGParking(const FGParking &other) : + FGTaxiNode (other), + heading (other.heading), + radius (other.radius), + parkingName (other.parkingName), + type (other.type), + airlineCodes (other.airlineCodes), + available (other.available), + pushBackPoint(other.pushBackPoint), + pushBackRoute(other.pushBackRoute) + { + }; + + + FGParking& operator =(const FGParking &other) + { + FGTaxiNode::operator=(other); + heading = other.heading; + radius = other.radius; + parkingName = other.parkingName; + type = other.type; + airlineCodes = other.airlineCodes; + available = other.available; + pushBackPoint= other.pushBackPoint; + pushBackRoute= other.pushBackRoute; + return *this; + }; + ~FGParking(); +// FGParking(double lat, +// double lon, +// double hdg, +// double rad, +// int idx, +// const string& name, +// const string& tpe, +// const string& codes); void setHeading (double hdg) { heading = hdg; }; void setRadius (double rad) { radius = rad; }; @@ -70,6 +108,9 @@ public: void setType (const string& tpe) { type = tpe; }; void setCodes (const string& codes){ airlineCodes= codes;}; + void setPushBackRoute(FGTaxiRoute *val) { pushBackRoute = val; }; + void setPushBackPoint(int val) { pushBackPoint = val; }; + bool isAvailable () { return available;}; void setAvailable(bool val) { available = val; }; @@ -80,6 +121,10 @@ public: string getCodes () { return airlineCodes;}; string getName () { return parkingName; }; + FGTaxiRoute * getPushBackRoute () { return pushBackRoute; }; + + int getPushBackPoint () { return pushBackPoint; }; + bool operator< (const FGParking &other) const { return radius < other.radius; }; };