Overview     Modules     Class Hierarchy     Classes     Members  

tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR > Class Template Reference
[Iterator]

Iterator that enables to convert an Iterator of type TYPEIN to an Iterator if type TYPEOUT. More...

#include <conversioniterator.h>

Inheritance diagram for tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >:
Collaboration diagram for tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >:

List of all members.

Public Member Functions


Detailed Description

template<typename TYPEIN, typename TYPEOUT, typename CONVERSIONFUNCTOR>
class tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >

Iterator that enables to convert an Iterator of type TYPEIN to an Iterator if type TYPEOUT.

Parameters:
it,the iterator that should be converted
convFunctor,the functor that enable to convert TYPEIN in TYPEOUT

The functor function shoul have the following form

 class AConversionFunctor {
  TYPEOUT operator()(TYPEIN a) {
    return a converted in TYPEOUT;
  }
 };

Constructor & Destructor Documentation

template<typename TYPEIN , typename TYPEOUT , typename CONVERSIONFUNCTOR >
tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >::ConversionIterator ( Iterator< TYPEIN > *  it,
CONVERSIONFUNCTOR  convFunctor 
) [inline]
template<typename TYPEIN , typename TYPEOUT , typename CONVERSIONFUNCTOR >
tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >::~ConversionIterator (  )  [inline]

Member Function Documentation

template<typename TYPEIN , typename TYPEOUT , typename CONVERSIONFUNCTOR >
bool tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >::hasNext (  )  [inline, virtual]

Tells if the sequence is at its end.

Returns:
bool Whether there are more elements to iterate on.

Implements tlp::Iterator< TYPEOUT >.

template<typename TYPEIN , typename TYPEOUT , typename CONVERSIONFUNCTOR >
TYPEOUT tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >::next (  )  [inline, virtual]

Moves the Iterator on the next element.

Returns:
The current element pointed by the Iterator.

Implements tlp::Iterator< TYPEOUT >.



Tulip Software by LaBRI Visualization Team    2001 - 2011