proland::LazyGraph::LazyGraphIterator< T, U > Class Template Reference

LazyGraph implementation for the abstract class GraphIterator. More...

#include <LazyGraph.h>

Inheritance diagram for proland::LazyGraph::LazyGraphIterator< T, U >:
proland::Graph::GraphIterator< U >

List of all members.

Public Member Functions

bool hasNext ()
 Returns true if the iterator can still be incremented.
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

Graphowner
 The Graph containing the elements to iterate, and which will be used to fetch the data (via the LazyGraph::get() method).

Detailed Description

template<typename T, typename U>
class proland::LazyGraph::LazyGraphIterator< T, U >

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.


Constructor & Destructor Documentation

template<typename T , typename U >
proland::LazyGraph::LazyGraphIterator< T, U >::LazyGraphIterator ( const V &  set,
Graph g 
) [inline, private]

Creates a new LazyGraphIterator.

Parameters:
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).
template<typename T , typename U >
proland::LazyGraph::LazyGraphIterator< T, U >::~LazyGraphIterator (  )  [inline, private]

Deletes this LazyGraphIterator.


Member Function Documentation

template<typename T , typename U >
bool proland::LazyGraph::LazyGraphIterator< T, U >::hasNext (  )  [inline, virtual]

Returns true if the iterator can still be incremented.

Implements proland::Graph::GraphIterator< U >.

template<typename T , typename U >
U proland::LazyGraph::LazyGraphIterator< T, U >::next (  )  [inline, virtual]

Returns the next element from the list.

Implements proland::Graph::GraphIterator< U >.


Member Data Documentation

template<typename T , typename 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).


Generated on Sat May 12 09:42:48 2012 for proland by  doxygen 1.6.1