WPILibC++
2018.4.1-20180729133221-1141-g00c2cd7
|
An iterator adaptor that filters the elements of given inner iterators. More...
#include <STLExtras.h>
Public Member Functions | |
filter_iterator_base & | operator++ () |
![]() | |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > & | operator+= (difference_type n) |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > & | operator-= (difference_type n) |
difference_type | operator- (const filter_iterator_base< WrappedIteratorT, PredicateT, IterTag > &RHS) const |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > & | operator++ () |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > & | operator-- () |
bool | operator== (const filter_iterator_base< WrappedIteratorT, PredicateT, IterTag > &RHS) const |
bool | operator< (const filter_iterator_base< WrappedIteratorT, PredicateT, IterTag > &RHS) const |
ReferenceT | operator* () const |
![]() | |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > | operator+ (DifferenceTypeT n) const |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > | operator- (DifferenceTypeT n) const |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > & | operator++ () |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > | operator++ (int) |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > & | operator-- () |
filter_iterator_base < WrappedIteratorT, PredicateT, IterTag > | operator-- (int) |
bool | operator!= (const filter_iterator_base< WrappedIteratorT, PredicateT, IterTag > &RHS) const |
bool | operator> (const filter_iterator_base< WrappedIteratorT, PredicateT, IterTag > &RHS) const |
bool | operator<= (const filter_iterator_base< WrappedIteratorT, PredicateT, IterTag > &RHS) const |
bool | operator>= (const filter_iterator_base< WrappedIteratorT, PredicateT, IterTag > &RHS) const |
PointerT | operator-> () |
PointerT | operator-> () const |
ReferenceProxy | operator[] (DifferenceTypeT n) |
ReferenceProxy | operator[] (DifferenceTypeT n) const |
Protected Member Functions | |
void | findNextValid () |
filter_iterator_base (WrappedIteratorT Begin, WrappedIteratorT End, PredicateT Pred) | |
![]() | |
iterator_adaptor_base (WrappedIteratorT u) | |
const WrappedIteratorT & | wrapped () const |
Protected Attributes | |
WrappedIteratorT | End |
PredicateT | Pred |
![]() | |
WrappedIteratorT | I |
Additional Inherited Members | |
![]() | |
using | difference_type = DifferenceTypeT |
![]() | |
enum | |
An iterator adaptor that filters the elements of given inner iterators.
The predicate parameter should be a callable object that accepts the wrapped iterator's reference type and returns a bool. When incrementing or decrementing the iterator, it will call the predicate on each element and skip any where it returns false.
Note: filter_iterator_base implements support for forward iteration. filter_iterator_impl exists to provide support for bidirectional iteration, conditional on whether the wrapped iterator supports it.