X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FAirports%2Fparking.hxx;h=9966553651229e2414bc8692dca4db87b0a3b8a4;hb=46ec7a6ff78b0718c6eb09e5abb45c67c153d2f5;hp=a64d5509b40a5ef0a760df2a4f7b3921192c9d4d;hpb=2b2b4fa8a3ba6fe6ce42dd3063ab1fa744216d0a;p=flightgear.git diff --git a/src/Airports/parking.hxx b/src/Airports/parking.hxx index a64d5509b..996655365 100644 --- a/src/Airports/parking.hxx +++ b/src/Airports/parking.hxx @@ -30,68 +30,48 @@ #endif #include +#include -#include STL_STRING -#include +#include +#include // for std::auto_ptr +#include "gnnode.hxx" +#include -SG_USING_STD(string); -SG_USING_STD(vector); - -double processPosition(const string& pos); - -class FGParking { +class FGParking : public FGTaxiNode +{ private: - double latitude; - double longitude; - double heading; - double radius; - int index; - string parkingName; - string type; - string airlineCodes; - - bool available; + const double heading; + const double radius; + const std::string parkingName; + const std::string type; + const std::string airlineCodes; + FGTaxiNodeRef pushBackPoint; + SG_DISABLE_COPY(FGParking); +public: + FGParking(int index, + const SGGeod& pos, + double heading, double radius, + const std::string& name, const std::string& type, + const std::string& codes); + virtual ~FGParking(); + double getHeading () const { return heading; }; + double getRadius () const { return radius; }; -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); - void setLatitude (const string& lat) { latitude = processPosition(lat); }; - void setLongitude(const string& lon) { longitude = processPosition(lon); }; - void setHeading (double hdg) { heading = hdg; }; - void setRadius (double rad) { radius = rad; }; - void setIndex (int idx) { index = idx; }; - void setName (const string& name) { parkingName = name; }; - void setType (const string& tpe) { type = tpe; }; - void setCodes (const string& codes){ airlineCodes= codes;}; + std::string getType () const { return type; }; + std::string getCodes () const { return airlineCodes;}; + std::string getName () const { return parkingName; }; - bool isAvailable () { return available;}; - void setAvailable(bool val) { available = val; }; - - double getLatitude () { return latitude; }; - double getLongitude() { return longitude; }; - double getHeading () { return heading; }; - double getRadius () { return radius; }; - int getIndex () { return index; }; - string getType () { return type; }; - string getCodes () { return airlineCodes;}; - string getName () { return parkingName; }; + // TODO do parkings have different name and ident? + virtual const std::string& name() const { return parkingName; } - bool operator< (const FGParking &other) const {return radius < other.radius; }; -}; + void setPushBackPoint(const FGTaxiNodeRef& node); + FGTaxiNodeRef getPushBackPoint () { return pushBackPoint; }; -typedef vector FGParkingVec; -typedef vector::iterator FGParkingVecIterator; -typedef vector::const_iterator FGParkingVecConstIterator; + bool operator< (const FGParking &other) const { + return radius < other.radius; }; +}; #endif