]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/parking.hxx
NasalCanvas: Clean up and expose Element node ghost
[flightgear.git] / src / Airports / parking.hxx
index 1d009c03cacbad84996188ec4b8af12b2e1685a5..ff466d256f56d1951f27e79b897b50a7ccff211d 100644 (file)
 #endif
 
 #include <simgear/compiler.h>
+#include <simgear/sg_inlines.h>
 
 #include <string>
 #include <vector>
+#include <memory> // for std::auto_ptr
 
 #include "gnnode.hxx"
 
-class FGTaxiRoute;
 
-
-class FGParking : public FGTaxiNode {
+class FGParking : public FGTaxiNode
+{
 private:
-  double heading;
-  double radius;
-  std::string parkingName;
-  std::string type;
-  std::string airlineCodes;
-  bool available;
-  int pushBackPoint;
-  FGTaxiRoute *pushBackRoute;
-
+  const double heading;
+  const double radius;
+  const std::string parkingName;
+  const std::string type;
+  const std::string airlineCodes;
+  const PositionedID pushBackPoint;
+
+  SG_DISABLE_COPY(FGParking);
 public:
-  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(PositionedID aGuid, const SGGeod& pos,
+            double heading, double radius,
+            const std::string& name, const std::string& type,
+            const std::string& codes,
+            PositionedID pushBackNode);
+  virtual ~FGParking();
+#if 0
   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(FGTaxiRoute *val) { pushBackRoute = val; };
-  void setPushBackPoint(int val)          { pushBackPoint = val; };
-
-  bool isAvailable ()   const { return available;};
-  void setAvailable(bool val) { available = val; };
+#endif
   
   double getHeading  () const { return heading;     };
   double getRadius   () const { return radius;      };
@@ -110,16 +73,14 @@ public:
   std::string getCodes    () const { return airlineCodes;};
   std::string getName     () const { return parkingName; };
 
-  FGTaxiRoute * getPushBackRoute () { return pushBackRoute; };
-
   int getPushBackPoint () { return pushBackPoint; };
 
   bool operator< (const FGParking &other) const {
     return radius < other.radius; };
 };
 
-typedef std::vector<FGParking> FGParkingVec;
-typedef std::vector<FGParking>::iterator FGParkingVecIterator;
-typedef std::vector<FGParking>::const_iterator FGParkingVecConstIterator;
+typedef std::vector<FGParking*> FGParkingVec;
+typedef FGParkingVec::iterator FGParkingVecIterator;
+typedef FGParkingVec::const_iterator FGParkingVecConstIterator;
 
 #endif