Overview | Modules | Class Hierarchy | Classes | Members

Public Member Functions
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 >:
[legend]
Collaboration diagram for tlp::ConversionIterator< TYPEIN, TYPEOUT, CONVERSIONFUNCTOR >:
[legend]

List of all members.

## Public Member Functions

- ConversionIterator (Iterator< TYPEIN > *it, CONVERSIONFUNCTOR convFunctor)
- ~ConversionIterator ()
- bool hasNext ()
    Tells if the sequence is at its end.
- TYPEOUT next ()
    Moves the Iterator on the next element.

## 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 - 2012