]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/gnnode.hxx
Interim windows build fix
[flightgear.git] / src / Airports / gnnode.hxx
index 54dd662841952afb6736758293ed97d37cc95628..437bc5a8611476f14d6c930d0fa0c27f7761e802 100644 (file)
 #ifndef _GN_NODE_HXX_
 #define _GN_NODE_HXX_
 
-#include <vector>
-#include <string>
 #include <simgear/compiler.h>
+#include <simgear/structure/SGSharedPtr.hxx>
 
-SG_USING_STD(string);
-SG_USING_STD(vector);
+#include <Navaids/positioned.hxx>
 
-class FGTaxiSegment;
-typedef vector<FGTaxiSegment*>  FGTaxiSegmentVector;
-typedef FGTaxiSegmentVector::iterator FGTaxiSegmentVectorIterator;
+class FGTaxiNode : public FGPositioned
+{
+protected:
+    const int m_index;
 
-bool sortByHeadingDiff(FGTaxiSegment *a, FGTaxiSegment *b);
-bool sortByLength     (FGTaxiSegment *a, FGTaxiSegment *b);
-double processPosition(const string& pos);
+  bool isOnRunway;
+  int  holdType;
+  bool m_isPushback;
 
-class FGTaxiNode 
-{
-private:
-  double lat;
-  double lon;
-  int index;
-  FGTaxiSegmentVector next; // a vector of pointers to all the segments leaving from this node
+public:    
+  FGTaxiNode(int index, const SGGeod& pos, bool aOnRunway, int aHoldType);
+  virtual ~FGTaxiNode();
   
-public:
-  FGTaxiNode();
-  FGTaxiNode(double, double, int);
+  void setElevation(double val);
 
-  void setIndex(int idx)                  { index = idx;};
-  void setLatitude (double val)           { lat = val;};
-  void setLongitude(double val)           { lon = val;};
-  void setLatitude (const string& val)           { lat = processPosition(val);  };
-  void setLongitude(const string& val)           { lon = processPosition(val);  };
-  void addSegment(FGTaxiSegment *segment) { next.push_back(segment); };
+  double getElevationM ();
+  double getElevationFt();
   
-  double getLatitude() { return lat;};
-  double getLongitude(){ return lon;};
-
-  int getIndex() { return index; };
-  FGTaxiNode *getAddress() { return this;};
-  FGTaxiSegmentVectorIterator getBeginRoute() { return next.begin(); };
-  FGTaxiSegmentVectorIterator getEndRoute()   { return next.end();   }; 
-  bool operator<(const FGTaxiNode &other) const { return index < other.index; };
+  int getIndex() const;
 
-  void sortEndSegments(bool);
+  int getHoldPointType() const { return holdType; };
+  bool getIsOnRunway() const { return isOnRunway; };
+  bool isPushback() const { return m_isPushback; }
 
-  // used in way finding
-  double pathscore;
-  FGTaxiNode* previousnode;
-  FGTaxiSegment* previousseg;
-  
+  void setIsPushback();
 };
 
-typedef vector<FGTaxiNode*> FGTaxiNodeVector;
-typedef FGTaxiNodeVector::iterator FGTaxiNodeVectorIterator;
-
 #endif