Public Types | Public Member Functions

geos::planargraph::NodeMap Class Reference

A map of Node, indexed by the coordinate of the node. More...

#include <NodeMap.h>

List of all members.

Public Types

typedef std::map
< geom::Coordinate, Node
*, geom::CoordinateLessThen
container

Public Member Functions

 NodeMap ()
 Constructs a NodeMap without any Nodes.
container & getNodeMap ()
Nodeadd (Node *n)
 Adds a node to the std::map, replacing any that is already at that location.
Noderemove (geom::Coordinate &pt)
 Removes the Node at the given location, and returns it (or null if no Node was there).
Nodefind (const geom::Coordinate &coord)
 Returns the Node at the given location, or null if no Node was there.
container::iterator iterator ()
 Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
container::iterator begin ()
container::const_iterator begin () const
container::iterator end ()
container::const_iterator end () const
void getNodes (std::vector< Node * > &nodes)
 Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.

Detailed Description

A map of Node, indexed by the coordinate of the node.


Member Function Documentation

Node* geos::planargraph::NodeMap::add ( Node n  ) 

Adds a node to the std::map, replacing any that is already at that location.

Returns:
the added node
void geos::planargraph::NodeMap::getNodes ( std::vector< Node * > &  nodes  ) 

Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.

Parameters:
nodes : the nodes are push_back'ed here

The documentation for this class was generated from the following file: