#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;
-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