]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/parking.hxx
commradio: improvements for atis speech
[flightgear.git] / src / Airports / parking.hxx
index 3b50d5d2a8a308daa4180ff96519f947b078c959..92b79008430d79282963aa8d619fb45a49c60475 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"
 
-SG_USING_STD(string);
-SG_USING_STD(vector);
 
-class FGTaxiRoute;
-
-
-class FGParking : public FGTaxiNode {
+class FGParking : public FGTaxiNode
+{
 private:
-  double heading;
-  double radius;
-  string parkingName;
-  string type;
-  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),
-      //parkingName(0),
-      //type(0),
-      //airlineCodes(0),
-      available(true),
-      pushBackPoint(-1),
-      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);
-
+  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 string& name) { parkingName = name; };
-  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; };
+  void setName     (const std::string& name) { parkingName = name; };
+  void setType     (const std::string& tpe)  { type        = tpe;  };
+  void setCodes    (const std::string& codes){ airlineCodes= codes;};
+#endif
   
-  double getHeading  () { return heading;     };
-  double getRadius   () { return radius;      };
+  double getHeading  () const { return heading;     };
+  double getRadius   () const { return radius;      };
 
-  string getType     () { return type;        };
-  string getCodes    () { return airlineCodes;};
-  string getName     () { return parkingName; };
+  std::string getType     () const { return type;        };
+  std::string getCodes    () const { return airlineCodes;};
+  std::string getName     () const { return parkingName; };
 
-  FGTaxiRoute * getPushBackRoute () { return pushBackRoute; };
+  // TODO do parkings have different name and ident?
+  virtual const std::string& name() const { return parkingName; }
 
   int getPushBackPoint () { return pushBackPoint; };
 
@@ -132,8 +81,4 @@ public:
     return radius < other.radius; };
 };
 
-typedef vector<FGParking> FGParkingVec;
-typedef vector<FGParking>::iterator FGParkingVecIterator;
-typedef vector<FGParking>::const_iterator FGParkingVecConstIterator;
-
 #endif