00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
00019 #define GEOS_GEOMGRAPH_DIRECTEDEDGE_H
00020
00021 #include <string>
00022
00023 #include <geos/geomgraph/EdgeEnd.h>
00024
00025 #include <geos/inline.h>
00026
00027
00028 namespace geos {
00029 namespace geomgraph {
00030 class Edge;
00031 class EdgeRing;
00032 }
00033 }
00034
00035 namespace geos {
00036 namespace geomgraph {
00037
00039 class DirectedEdge: public EdgeEnd {
00040
00041 public:
00042
00049 static int depthFactor(int currLocation, int nextLocation);
00050
00051
00052
00053
00054 DirectedEdge(Edge *newEdge, bool newIsForward);
00055
00056
00057
00058
00059 void setInResult(bool newIsInResult);
00060
00061 bool isInResult();
00062
00063 bool isVisited();
00064
00065 void setVisited(bool newIsVisited);
00066
00067 void setEdgeRing(EdgeRing *newEdgeRing);
00068
00069 EdgeRing* getEdgeRing();
00070
00071 void setMinEdgeRing(EdgeRing *newMinEdgeRing);
00072
00073 EdgeRing* getMinEdgeRing();
00074
00075 int getDepth(int position);
00076
00077 void setDepth(int position, int newDepth);
00078
00079 int getDepthDelta();
00080
00082
00086 void setVisitedEdge(bool newIsVisited);
00087
00088
00096 DirectedEdge* getSym();
00097
00098 bool isForward();
00099
00100 void setSym(DirectedEdge *de);
00101
00102 DirectedEdge* getNext();
00103
00104 void setNext(DirectedEdge *newNext);
00105
00106 DirectedEdge* getNextMin();
00107
00108 void setNextMin(DirectedEdge *newNextMin);
00109
00118 bool isLineEdge();
00119
00129 bool isInteriorAreaEdge();
00130
00138 void setEdgeDepths(int position, int newDepth);
00139
00140 std::string print();
00141
00142 std::string printEdge();
00143
00144 protected:
00145
00146 bool isForwardVar;
00147
00148 private:
00149
00150 bool isInResultVar;
00151
00152 bool isVisitedVar;
00153
00155 DirectedEdge *sym;
00156
00158 DirectedEdge *next;
00159
00161 DirectedEdge *nextMin;
00162
00164 EdgeRing *edgeRing;
00165
00167 EdgeRing *minEdgeRing;
00168
00173 int depth[3];
00174
00176 void computeDirectedLabel();
00177 };
00178
00179 }
00180 }
00181
00182 #ifdef GEOS_INLINE
00183 # include "geos/geomgraph/DirectedEdge.inl"
00184 #endif
00185
00186 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206