GEOS  3.9.1dev
Public Types | Public Member Functions | Private Attributes | List of all members
geos::planargraph::NodeMap Class Reference

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

#include <NodeMap.h>

Public Types

typedef std::map< geom::Coordinate, Node *, geom::CoordinateLessThencontainer
 

Public Member Functions

 NodeMap ()
 Constructs a NodeMap without any Nodes. More...
 
containergetNodeMap ()
 
virtual ~NodeMap ()=default
 
Nodeadd (Node *n)
 Adds a node to the std::map, replacing any that is already at that location. More...
 
Noderemove (geom::Coordinate &pt)
 Removes the Node at the given location, and returns it (or null if no Node was there). More...
 
Nodefind (const geom::Coordinate &coord)
 Returns the Node at the given location, or null if no Node was there. More...
 
container::iterator iterator ()
 Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis. More...
 
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. More...
 

Private Attributes

container nodeMap
 

Detailed Description

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

Definition at line 48 of file planargraph/NodeMap.h.

Member Typedef Documentation

Definition at line 50 of file planargraph/NodeMap.h.

Constructor & Destructor Documentation

geos::planargraph::NodeMap::NodeMap ( )

Constructs a NodeMap without any Nodes.

virtual geos::planargraph::NodeMap::~NodeMap ( )
virtualdefault

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

Referenced by geos::planargraph::PlanarGraph::add().

Here is the caller graph for this function:

container::iterator geos::planargraph::NodeMap::begin ( )
inline

Definition at line 98 of file planargraph/NodeMap.h.

Referenced by geos::planargraph::PlanarGraph::nodeBegin(), and geos::planargraph::PlanarGraph::nodeIterator().

Here is the caller graph for this function:

container::const_iterator geos::planargraph::NodeMap::begin ( ) const
inline

Definition at line 103 of file planargraph/NodeMap.h.

container::iterator geos::planargraph::NodeMap::end ( )
inline

Definition at line 109 of file planargraph/NodeMap.h.

Referenced by geos::planargraph::PlanarGraph::nodeEnd().

Here is the caller graph for this function:

container::const_iterator geos::planargraph::NodeMap::end ( ) const
inline

Definition at line 114 of file planargraph/NodeMap.h.

Node* geos::planargraph::NodeMap::find ( const geom::Coordinate coord)

Returns the Node at the given location, or null if no Node was there.

Referenced by geos::planargraph::PlanarGraph::findNode().

Here is the caller graph for this function:

container& geos::planargraph::NodeMap::getNodeMap ( )
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

Referenced by geos::planargraph::PlanarGraph::getNodes().

Here is the caller graph for this function:

container::iterator geos::planargraph::NodeMap::iterator ( )
inline

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

Definition at line 92 of file planargraph/NodeMap.h.

Node* geos::planargraph::NodeMap::remove ( geom::Coordinate pt)

Removes the Node at the given location, and returns it (or null if no Node was there).

Member Data Documentation

container geos::planargraph::NodeMap::nodeMap
private

Definition at line 52 of file planargraph/NodeMap.h.


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