ocssw
V2022
|
#include <FilterIterator.hpp>
Public Member Functions | |
FilterIterator (InputIterator first, InputIterator last, UnaryPredicate pred) | |
bool | operator!= (const FilterIterator &it) |
bool | operator== (const FilterIterator &it) |
InputIterator | operator* () |
FilterIterator | operator++ () |
FilterIterator | begin () const |
FilterIterator | end () const |
Detailed Description
template<class InputIterator, class UnaryPredicate>
class focs::FilterIterator< InputIterator, UnaryPredicate >
Iterator for filtering the results of other iterators.
This class shouldn't be used by external users. Its API is very odd and cumbersome and should/will probably be made better. As of writing this documentation, it's only used for focs::KvStore
for filtering values via group.
- Template Parameters
-
InputIterator The type of iterator to walk through. UnaryPredicate Function with which to filter values.
Example
Definition at line 27 of file FilterIterator.hpp.
Constructor & Destructor Documentation
◆ FilterIterator()
|
inline |
Sole and cumbersome constructor.
- Parameters
-
first Collection's begin()
iterator.last Collection's end()
iterator.pred Function with which to filter, generally a lambda. It should take a single value of the type stored in the collection and return a boolean.
Definition at line 37 of file FilterIterator.hpp.
Member Function Documentation
◆ begin()
|
inline |
Return a copy of the iterator reset back to the start.
Definition at line 73 of file FilterIterator.hpp.
◆ end()
|
inline |
Return an iterator with no values left to check.
Definition at line 75 of file FilterIterator.hpp.
◆ operator!=()
|
inline |
Check if the underlying iterators are not equal.
Definition at line 47 of file FilterIterator.hpp.
◆ operator*()
|
inline |
Return the underlying iterator.
Definition at line 57 of file FilterIterator.hpp.
◆ operator++()
|
inline |
Find the next value that fulfills the UnaryPredicate's condition, or return end().
Definition at line 62 of file FilterIterator.hpp.
◆ operator==()
|
inline |
Check if the underlying iterators are equal.
Definition at line 52 of file FilterIterator.hpp.
The documentation for this class was generated from the following file:
- /gfs-oceanweb/web/ocssw/ocssw_src/include/focs/FilterIterator.hpp