]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/parking.hxx
Replace the NOAA METAR URL with the new, updated one
[flightgear.git] / src / Airports / parking.hxx
index c96ab1d241248ae2a34c3d030da027dd1ee441c5..9966553651229e2414bc8692dca4db87b0a3b8a4 100644 (file)
 #endif
 
 #include <simgear/compiler.h>
+#include <simgear/sg_inlines.h>
 
-#include STL_STRING
-#include <vector>
+#include <string>
+#include <memory> // for std::auto_ptr
 
 #include "gnnode.hxx"
+#include <Airports/airports_fwd.hxx>
 
-SG_USING_STD(string);
-SG_USING_STD(vector);
-
-class FGParking : public FGTaxiNode {
+class FGParking : public FGTaxiNode
+{
 private:
-  double heading;
-  double radius;
-  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() { 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 setHeading  (double hdg)  { heading     = hdg;  };
-  void setRadius   (double rad)  { radius      = rad;  };
+  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;      };
 
-  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 getHeading  () { return heading;     };
-  double getRadius   () { return radius;      };
+  // TODO do parkings have different name and ident?
+  virtual const std::string& name() const { return parkingName; }
 
-  string getType     () { return type;        };
-  string getCodes    () { return airlineCodes;};
-  string getName     () { return parkingName; };
+  void setPushBackPoint(const FGTaxiNodeRef& node);
+  FGTaxiNodeRef getPushBackPoint () { return pushBackPoint; };
 
   bool operator< (const FGParking &other) const {
     return radius < other.radius; };
 };
 
-typedef vector<FGParking> FGParkingVec;
-typedef vector<FGParking>::iterator FGParkingVecIterator;
-typedef vector<FGParking>::const_iterator FGParkingVecConstIterator;
-
 #endif