00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
00023 #define GEOS_GEOMGRAPH_DIRECTEDEDGE_H
00024
00025 #include <geos/export.h>
00026 #include <string>
00027
00028 #include <geos/geomgraph/EdgeEnd.h>
00029
00030 #include <geos/inline.h>
00031
00032
00033 namespace geos {
00034 namespace geomgraph {
00035 class Edge;
00036 class EdgeRing;
00037 }
00038 }
00039
00040 namespace geos {
00041 namespace geomgraph {
00042
00044 class GEOS_DLL DirectedEdge: public EdgeEnd {
00045
00046 public:
00047
00054 static int depthFactor(int currLocation, int nextLocation);
00055
00056
00057
00058
00059 DirectedEdge(Edge *newEdge, bool newIsForward);
00060
00061
00062
00063
00064 void setInResult(bool newIsInResult);
00065
00066 bool isInResult();
00067
00068 bool isVisited();
00069
00070 void setVisited(bool newIsVisited);
00071
00072 void setEdgeRing(EdgeRing *newEdgeRing);
00073
00074 EdgeRing* getEdgeRing();
00075
00076 void setMinEdgeRing(EdgeRing *newMinEdgeRing);
00077
00078 EdgeRing* getMinEdgeRing();
00079
00080 int getDepth(int position);
00081
00082 void setDepth(int position, int newDepth);
00083
00084 int getDepthDelta();
00085
00087
00091 void setVisitedEdge(bool newIsVisited);
00092
00093
00101 DirectedEdge* getSym();
00102
00103 bool isForward();
00104
00105 void setSym(DirectedEdge *de);
00106
00107 DirectedEdge* getNext();
00108
00109 void setNext(DirectedEdge *newNext);
00110
00111 DirectedEdge* getNextMin();
00112
00113 void setNextMin(DirectedEdge *newNextMin);
00114
00123 bool isLineEdge();
00124
00134 bool isInteriorAreaEdge();
00135
00143 void setEdgeDepths(int position, int newDepth);
00144
00145 std::string print();
00146
00147 std::string printEdge();
00148
00149 protected:
00150
00151 bool isForwardVar;
00152
00153 private:
00154
00155 bool isInResultVar;
00156
00157 bool isVisitedVar;
00158
00160 DirectedEdge *sym;
00161
00163 DirectedEdge *next;
00164
00166 DirectedEdge *nextMin;
00167
00169 EdgeRing *edgeRing;
00170
00172 EdgeRing *minEdgeRing;
00173
00178 int depth[3];
00179
00181 void computeDirectedLabel();
00182 };
00183
00184 }
00185 }
00186
00187 #ifdef GEOS_INLINE
00188 # include "geos/geomgraph/DirectedEdge.inl"
00189 #endif
00190
00191 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211