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) // warning C4251: needs to have dll-interface to be used by clients of class 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;
81 const_iterator begin()
const {
return nodeMap.begin(); }
83 const_iterator end()
const {
return nodeMap.end(); }
85 iterator begin() {
return nodeMap.begin(); }
87 iterator end() {
return nodeMap.end(); }
89 void getBoundaryNodes(
int geomIndex,
90 std::vector<Node*>&bdyNodes)
const;
92 std::string print()
const;
98 for (iterator it=begin(), itEnd=end(); it != itEnd; ++it)
101 geomgraph::Node* n = p.second;
102 geom::Coordinate* c =
const_cast<geom::Coordinate*
>(
103 &(n->getCoordinate())
105 assert(p.first == c);
113 NodeMap(
const NodeMap& other);
114 NodeMap& operator=(
const NodeMap& rhs);
124 #endif // ifndef GEOS_GEOMGRAPH_NODEMAP_H Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25