]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/gnnode.hxx
Interim windows build fix
[flightgear.git] / src / Airports / gnnode.hxx
index 5902badfbb7cf342df2bab035fa77583983ef6d0..437bc5a8611476f14d6c930d0fa0c27f7761e802 100644 (file)
 #ifndef _GN_NODE_HXX_
 #define _GN_NODE_HXX_
 
-#include <vector>
-#include <string>
-
 #include <simgear/compiler.h>
 #include <simgear/structure/SGSharedPtr.hxx>
 
 #include <Navaids/positioned.hxx>
 
-class FGTaxiSegment;
-
-typedef std::vector<FGTaxiSegment*>  FGTaxiSegmentVector;
-typedef FGTaxiSegmentVector::iterator FGTaxiSegmentVectorIterator;
-
-bool sortByHeadingDiff(FGTaxiSegment *a, FGTaxiSegment *b);
-bool sortByLength     (FGTaxiSegment *a, FGTaxiSegment *b);
-
 class FGTaxiNode : public FGPositioned
 {
 protected:
-  int index;
+    const int m_index;
 
   bool isOnRunway;
   int  holdType;
-  FGTaxiSegmentVector next; // a vector of pointers to all the segments leaving from this node
-
-  // used in way finding - should really move to a dynamic struct
-  double pathScore;
-  FGTaxiNode* previousNode;
-  FGTaxiSegment* previousSeg;
-
+  bool m_isPushback;
 
 public:    
-  FGTaxiNode(PositionedID aGuid, int index, const SGGeod& pos, bool aOnRunway, int aHoldType);
+  FGTaxiNode(int index, const SGGeod& pos, bool aOnRunway, int aHoldType);
   virtual ~FGTaxiNode();
   
   void setElevation(double val);
-  void addSegment(FGTaxiSegment *segment) { next.push_back(segment);     };
-
-  void setPathScore   (double val)         { pathScore    = val; };
-  void setPreviousNode(FGTaxiNode *val)    { previousNode = val; };
-  void setPreviousSeg (FGTaxiSegment *val) { previousSeg  = val; };
-
-  FGTaxiNode    *getPreviousNode()    { return previousNode; };
-  FGTaxiSegment *getPreviousSegment() { return previousSeg;  };
 
-  double getPathScore() { return pathScore; };
-
-  double getElevationM (double refelev);
-  double getElevationFt(double refelev);
+  double getElevationM ();
+  double getElevationFt();
   
-  int getIndex() const { return index; };
+  int getIndex() const;
+
   int getHoldPointType() const { return holdType; };
   bool getIsOnRunway() const { return isOnRunway; };
+  bool isPushback() const { return m_isPushback; }
 
-  const FGTaxiSegmentVector& arcs() const
-  { return next; }
-  
-  /// find the arg which leads from this node to another.
-  /// returns NULL if no such arc exists.
-  FGTaxiSegment* getArcTo(FGTaxiNode* aEnd) const;
-  
-  bool operator<(const FGTaxiNode &other) const { return index < other.index; };
-
-
+  void setIsPushback();
 };
 
-typedef SGSharedPtr<FGTaxiNode> FGTaxiNode_ptr;
-typedef std::vector<FGTaxiNode_ptr> FGTaxiNodeVector;
-typedef FGTaxiNodeVector::iterator FGTaxiNodeVectorIterator;
-
 #endif