21 #ifndef GEOS_GEOMGRAPH_NODEMAP_H
22 #define GEOS_GEOMGRAPH_NODEMAP_H
24 #include <geos/export.h>
29 #include <geos/geom/Coordinate.h>
30 #include <geos/geomgraph/Node.h>
32 #include <geos/inline.h>
36 #pragma warning(disable: 4251)
51 class GEOS_DLL NodeMap {
54 typedef std::map<geom::Coordinate*, Node*, geom::CoordinateLessThen> container;
56 typedef container::iterator iterator;
58 typedef container::const_iterator const_iterator;
60 typedef std::pair<geom::Coordinate*, Node*> pair;
64 const NodeFactory& nodeFact;
69 NodeMap(
const NodeFactory& newNodeFact);
73 Node* addNode(
const geom::Coordinate& coord);
75 Node* addNode(Node* n);
79 Node* find(
const geom::Coordinate& coord)
const;
84 return nodeMap.begin();
96 return nodeMap.begin();
102 return nodeMap.end();
105 void getBoundaryNodes(
int geomIndex,
106 std::vector<Node*>& bdyNodes)
const;
108 std::string print()
const;
115 for(iterator it = begin(), itEnd = end(); it != itEnd; ++it) {
117 geomgraph::Node* n = p.second;
118 geom::Coordinate* c =
const_cast<geom::Coordinate*
>(
119 &(n->getCoordinate())
121 assert(p.first == c);
129 NodeMap(
const NodeMap& other) =
delete;
130 NodeMap& operator=(
const NodeMap& rhs) =
delete;
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26