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