LazyGraph implementation for the abstract class GraphIterator. More...
#include <LazyGraph.h>
Public Member Functions | |
bool | hasNext () |
Returns true if the iterator can still be incremented. | |
U | next () |
Returns the next element from the list. | |
Private Member Functions | |
LazyGraphIterator (const V &set, Graph *g) | |
Creates a new LazyGraphIterator. | |
~LazyGraphIterator () | |
Deletes this LazyGraphIterator. | |
Private Attributes | |
Graph * | owner |
The Graph containing the elements to iterate, and which will be used to fetch the data (via the LazyGraph::get() method). |
LazyGraph implementation for the abstract class GraphIterator.
Three specializations are defined : one for nodes, one for curves, and one for areas. See Graph::GraphIterator. LazyGraphIterators use the mapped ids/offsets from LazyGraph to fetch items. In this implementation, T corresponds to the elements' Ids, and U to a smart pointer (ptr) to the element.
proland::LazyGraph::LazyGraphIterator< T, U >::LazyGraphIterator | ( | const V & | set, | |
Graph * | g | |||
) | [inline, private] |
Creates a new LazyGraphIterator.
set | a <T, long int> map, which maps an Id to an offset in a file. | |
owner | the Graph containing the elements to iterate, and which will be used to fetch the data (via the LazyGraph::get() method). |
proland::LazyGraph::LazyGraphIterator< T, U >::~LazyGraphIterator | ( | ) | [inline, private] |
Deletes this LazyGraphIterator.
bool proland::LazyGraph::LazyGraphIterator< T, U >::hasNext | ( | ) | [inline, virtual] |
Returns true if the iterator can still be incremented.
Implements proland::Graph::GraphIterator< U >.
U proland::LazyGraph::LazyGraphIterator< T, U >::next | ( | ) | [inline, virtual] |
Returns the next element from the list.
Implements proland::Graph::GraphIterator< U >.
Graph* proland::LazyGraph::LazyGraphIterator< T, U >::owner [private] |
The Graph containing the elements to iterate, and which will be used to fetch the data (via the LazyGraph::get() method).