19 #ifndef GEOS_OP_BUFFER_BUFFERSUBGRAPH_H
20 #define GEOS_OP_BUFFER_BUFFERSUBGRAPH_H
22 #include <geos/export.h>
24 #include <geos/operation/buffer/RightmostEdgeFinder.h>
31 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
61 class GEOS_DLL BufferSubgraph {
63 RightmostEdgeFinder finder;
65 std::vector<geomgraph::DirectedEdge*> dirEdgeList;
67 std::vector<geomgraph::Node*> nodes;
69 geom::Coordinate* rightMostCoord;
80 void addReachable(geomgraph::Node* startNode);
87 void add(geomgraph::Node* node, std::vector<geomgraph::Node*>* nodeStack);
89 void clearVisitedEdges();
98 void computeDepths(geomgraph::DirectedEdge* startEdge);
100 void computeNodeDepth(geomgraph::Node* n);
102 void copySymDepths(geomgraph::DirectedEdge* de);
104 bool contains(std::set<geomgraph::Node*>& nodes, geomgraph::Node* node);
108 friend std::ostream& operator<< (std::ostream& os,
const BufferSubgraph& bs);
114 std::vector<geomgraph::DirectedEdge*>* getDirectedEdges();
116 std::vector<geomgraph::Node*>* getNodes();
121 geom::Coordinate* getRightmostCoordinate();
131 void create(geomgraph::Node* node);
133 void computeDepth(
int outsideDepth);
146 void findResultEdges();
162 int compareTo(BufferSubgraph*);
170 geom::Envelope* getEnvelope();
173 std::ostream& operator<< (std::ostream& os,
const BufferSubgraph& bs);
179 return rightMostCoord;
182 inline std::vector<geomgraph::Node*>*
183 BufferSubgraph::getNodes()
188 inline std::vector<geomgraph::DirectedEdge*>*
189 BufferSubgraph::getDirectedEdges()
194 bool BufferSubgraphGT(BufferSubgraph* first, BufferSubgraph* second);
204 #endif // ndef GEOS_OP_BUFFER_BUFFERSUBGRAPH_H