00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_PLANARGRAPH_EDGE_H
00017 #define GEOS_PLANARGRAPH_EDGE_H
00018
00019 #include <geos/export.h>
00020
00021 #include <geos/planargraph/GraphComponent.h>
00022
00023 #include <vector>
00024 #include <set>
00025 #include <iosfwd>
00026
00027 #ifdef _MSC_VER
00028 #pragma warning(push)
00029 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00030 #endif
00031
00032
00033 namespace geos {
00034 namespace planargraph {
00035 class DirectedEdgeStar;
00036 class DirectedEdge;
00037 class Edge;
00038 class Node;
00039 }
00040 }
00041
00042 namespace geos {
00043 namespace planargraph {
00044
00054 class GEOS_DLL Edge: public GraphComponent {
00055
00056 public:
00057
00058 friend std::ostream& operator<< (std::ostream& os, const Node&);
00059
00061 typedef std::set<const Edge *> ConstSet;
00062
00064 typedef std::set<Edge *> NonConstSet;
00065
00067 typedef std::vector<Edge *> NonConstVect;
00068
00070 typedef std::vector<const Edge *> ConstVect;
00071
00072 protected:
00073
00075 std::vector<DirectedEdge*> dirEdge;
00076
00083 public:
00084
00092 Edge(): dirEdge() {}
00093
00100 Edge(DirectedEdge *de0, DirectedEdge *de1)
00101 :
00102 dirEdge()
00103 {
00104 setDirectedEdges(de0, de1);
00105 }
00106
00114 void setDirectedEdges(DirectedEdge *de0, DirectedEdge *de1);
00115
00120 DirectedEdge* getDirEdge(int i);
00121
00127 DirectedEdge* getDirEdge(Node *fromNode);
00128
00133 Node* getOppositeNode(Node *node);
00134 };
00135
00137 std::ostream& operator<<(std::ostream& os, const Edge& n);
00138
00140
00141
00142 }
00143 }
00144
00145 #ifdef _MSC_VER
00146 #pragma warning(pop)
00147 #endif
00148
00149 #endif // GEOS_PLANARGRAPH_EDGE_H