]> 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 c16038c5163c94fa4e7dd397066a0d01ab7cfc8f..9966553651229e2414bc8692dca4db87b0a3b8a4 100644 (file)
 #include <simgear/sg_inlines.h>
 
 #include <string>
-#include <vector>
 #include <memory> // for std::auto_ptr
 
 #include "gnnode.hxx"
-
-class FGTaxiRoute;
-
+#include <Airports/airports_fwd.hxx>
 
 class FGParking : public FGTaxiNode
 {
 private:
-  double heading;
-  double radius;
-  std::string parkingName;
-  std::string type;
-  std::string airlineCodes;
-  bool available;
-  int pushBackPoint;
-  std::auto_ptr<FGTaxiRoute> pushBackRoute;
+  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(PositionedID aGuid, int index, const SGGeod& pos,
+  FGParking(int index,
+            const SGGeod& pos,
             double heading, double radius,
             const std::string& name, const std::string& type,
             const std::string& codes);
   virtual ~FGParking();
-
-  void setHeading  (double hdg)  { heading     = hdg;  };
-  void setRadius   (double rad)  { radius      = rad;  };
-
-  void setName     (const std::string& name) { parkingName = name; };
-  void setType     (const std::string& tpe)  { type        = tpe;  };
-  void setCodes    (const std::string& codes){ airlineCodes= codes;};
-
-  void setPushBackRoute(std::auto_ptr<FGTaxiRoute> val) { pushBackRoute = val; };
-  void setPushBackPoint(int val)          { pushBackPoint = val; };
-
-  bool isAvailable ()   const { return available;};
-  void setAvailable(bool val) { available = val; };
   
   double getHeading  () const { return heading;     };
   double getRadius   () const { return radius;      };
@@ -82,16 +64,14 @@ public:
   std::string getCodes    () const { return airlineCodes;};
   std::string getName     () const { return parkingName; };
 
-  FGTaxiRoute * getPushBackRoute () { return pushBackRoute.get(); };
+  // TODO do parkings have different name and ident?
+  virtual const std::string& name() const { return parkingName; }
 
-  int getPushBackPoint () { return pushBackPoint; };
+  void setPushBackPoint(const FGTaxiNodeRef& node);
+  FGTaxiNodeRef getPushBackPoint () { return pushBackPoint; };
 
   bool operator< (const FGParking &other) const {
     return radius < other.radius; };
 };
 
-typedef std::vector<FGParking*> FGParkingVec;
-typedef FGParkingVec::iterator FGParkingVecIterator;
-typedef FGParkingVec::const_iterator FGParkingVecConstIterator;
-
 #endif