tlp::UniqueIterator< TYPE, TOCHECKFUNCTOR > Class Template Reference
[Iterator]
UniqueIterator enables to remove duplicated elements in an iterator.
More...
#include <uniqueiterator.h>
List of all members.
Public Member Functions
Detailed Description
template<typename TYPE, typename TOCHECKFUNCTOR = CheckAllFunctor<TYPE>>
class tlp::UniqueIterator< TYPE, TOCHECKFUNCTOR >
UniqueIterator enables to remove duplicated elements in an iterator.
- Parameters:
-
| it | the iterator in which we want to filter out duplicated elements |
| checkFuncor | a functor that enable to indicate wheter or not the element could be duplicated (default test all elements) |
The functor function shoul have the following form
class ACheckFunctor {
bool operator(TYPE a) {
return true if a could be duplicated else false;
}
};
checkFunctor are used for optimization purpose to prevent to log(n) test for all elements when not necessary.
Constructor & Destructor Documentation
template<typename TYPE , typename TOCHECKFUNCTOR = CheckAllFunctor<TYPE>>
template<typename TYPE , typename TOCHECKFUNCTOR = CheckAllFunctor<TYPE>>
Member Function Documentation
template<typename TYPE , typename TOCHECKFUNCTOR = CheckAllFunctor<TYPE>>
Tells if the sequence is at its end.
- Returns:
- bool Whether there are more elements to iterate on.
Implements tlp::Iterator< TYPE >.
template<typename TYPE , typename TOCHECKFUNCTOR = CheckAllFunctor<TYPE>>
template<typename TYPE , typename TOCHECKFUNCTOR = CheckAllFunctor<TYPE>>