1 // This program is free software; you can redistribute it and/or
2 // modify it under the terms of the GNU General Public License as
3 // published by the Free Software Foundation; either version 2 of the
4 // License, or (at your option) any later version.
6 // This program is distributed in the hope that it will be useful, but
7 // WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 // General Public License for more details.
11 // You should have received a copy of the GNU General Public License
12 // along with this program; if not, write to the Free Software
13 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include <simgear/compiler.h>
27 typedef vector<FGTaxiSegment*> FGTaxiSegmentVector;
28 typedef FGTaxiSegmentVector::iterator FGTaxiSegmentVectorIterator;
30 double processPosition(const string& pos);
38 FGTaxiSegmentVector next; // a vector of pointers to all the segments leaving from this node
42 FGTaxiNode(double, double, int);
44 void setIndex(int idx) { index = idx;};
45 void setLatitude (double val) { lat = val;};
46 void setLongitude(double val) { lon = val;};
47 void setLatitude (const string& val) { lat = processPosition(val); };
48 void setLongitude(const string& val) { lon = processPosition(val); };
49 void addSegment(FGTaxiSegment *segment) { next.push_back(segment); };
51 double getLatitude() { return lat;};
52 double getLongitude(){ return lon;};
54 int getIndex() { return index; };
55 FGTaxiNode *getAddress() { return this;};
56 FGTaxiSegmentVectorIterator getBeginRoute() { return next.begin(); };
57 FGTaxiSegmentVectorIterator getEndRoute() { return next.end(); };
58 bool operator<(const FGTaxiNode &other) const { return index < other.index; };
60 void sortEndSegments(bool);
62 // used in way finding
64 FGTaxiNode* previousnode;
65 FGTaxiSegment* previousseg;
69 typedef vector<FGTaxiNode*> FGTaxiNodeVector;
70 typedef FGTaxiNodeVector::iterator FGTaxiNodeVectorIterator;