gatb.core-API-0.0.0
|
Iterator that filters out some iterated items. More...
#include <IteratorHelpers.hpp>
Inherits ISmartIterator< T >.
Public Member Functions | |
FilterIterator (Iterator< Item > *ref, Filter filter) | |
~FilterIterator () | |
void | first () |
void | next () |
bool | isDone () |
Item & | item () |
void | setItem (Item &i) |
Iterator that filters out some iterated items.
This iterator iterates a referred iterator and will filter out some items according to a functor provided at construction.
Example:
|
inline |
Constructor.
[in] | ref | : the referred iterator |
[in] | filter | : the filter on items. Returns true if item is kept, false otherwise. |
|
inline |
Destructor.
|
inlinevirtual |
Method that initializes the iteration.
Implements Iterator< T >.
|
inlinevirtual |
Method telling whether the iteration is finished or not.
Implements Iterator< T >.
|
inlinevirtual |
Method that returns the current iterated item. Note that the returned type is the template type.
Implements Iterator< T >.
|
inlinevirtual |
Method that goes to the next item in the iteration.
Implements Iterator< T >.
|
inline |
Get a reference on the object to be configured as the currently iterated item.
[in] | i | : object to be referred. |