]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/parking.hxx
Merge branch 'ehofman/normal'
[flightgear.git] / src / Airports / parking.hxx
index 278d9072c8ad1d746568113cfebe7538dfb119ba..0cac08bbcdc9069bc2b0f97c50a3776a3e9a1e7c 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 #ifndef _PARKING_HXX_
 #define _PARKING_HXX_
 
-#ifndef __cplusplus                                                          
+#ifndef __cplusplus
 # error This library requires C++
-#endif     
+#endif
 
-#include STL_STRING
-#include <vector>
+#include <simgear/compiler.h>
 
+#include <string>
+#include <vector>
 
+#include "gnnode.hxx"
 
+using std::string;
+using std::vector;
 
-SG_USING_STD(string);
-SG_USING_STD(vector);
+class FGTaxiRoute;
 
-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;
-
-  
+  int pushBackPoint;
+  FGTaxiRoute *pushBackRoute;
 
 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);  };
+  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(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;  };
-  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;};
 
+  void setPushBackRoute(FGTaxiRoute *val) { pushBackRoute = val; };
+  void setPushBackPoint(int val)          { pushBackPoint = val; };
+
   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; };
 
-  bool operator< (const FGParking &other) const {return radius < other.radius; };
+  FGTaxiRoute * getPushBackRoute () { return pushBackRoute; };
+
+  int getPushBackPoint () { return pushBackPoint; };
+
+  bool operator< (const FGParking &other) const {
+    return radius < other.radius; };
 };
 
 typedef vector<FGParking> FGParkingVec;