gatb.core-API-1.4.2
CompoundIterator< T1, T2, Update > Class Template Reference

Iterator that gather two iterators in a single loop. More...

#include <IteratorHelpers.hpp>

Inheritance diagram for CompoundIterator< T1, T2, Update >:
Inheritance graph

Public Member Functions

 CompoundIterator (Iterator< T1 > &it1, Iterator< T2 > &it2, const Update &update)
 
void first ()
 
void next ()
 
bool isDone ()
 
T2 & item ()
 
- Public Member Functions inherited from Iterator< T2 >
T2 * operator-> ()
 
T2 & operator* ()
 
void iterate (const Functor &f)
 
virtual void setItem (T2 &i)
 
bool get (std::vector< T2 > &current)
 
virtual void reset ()
 
virtual void finalize ()
 
virtual std::vector< Iterator< T2 > * > getComposition ()
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

template<typename T1, typename T2, typename Update>
class gatb::core::tools::dp::impl::CompoundIterator< T1, T2, Update >

Iterator that gather two iterators in a single loop.

This iterator is equivalent to two iterators with one outer loop and one inner loop.

Constructor & Destructor Documentation

CompoundIterator ( Iterator< T1 > &  it1,
Iterator< T2 > &  it2,
const Update &  update 
)
inline

Constructor.

Parameters
[in]it1: iterator for the outer loop.
[in]it2: iterator for the inner loop.
[in]update: functor for updating inner loop with new item from outer loop

Member Function Documentation

void first ( )
inlinevirtual

Method that initializes the iteration.

Implements Iterator< T2 >.

bool isDone ( )
inlinevirtual

Method telling whether the iteration is finished or not.

Returns
true if iteration is finished, false otherwise.

Implements Iterator< T2 >.

T2& item ( )
inlinevirtual

Method that returns the current iterated item. Note that the returned type is the template type.

Returns
the current item in the iteration.

Implements Iterator< T2 >.

void next ( )
inlinevirtual

Method that goes to the next item in the iteration.

Returns
status of the iteration

Implements Iterator< T2 >.


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