|
swift
|
Iterator wrapper which skips over any elements which do not satisfy a given condition predicate. More...
#include <iterator.h>
Public Types | |
| using | iterator_category = std::forward_iterator_tag |
| Types. | |
| using | value_type = typename std::iterator_traits<I>::value_type |
| Types. | |
| using | difference_type = typename std::iterator_traits<I>::difference_type |
| Types. | |
| using | pointer = typename std::iterator_traits<I>::pointer |
| Types. | |
| using | reference = typename std::iterator_traits<I>::reference |
| Types. | |
Public Member Functions | |
| ConditionalIterator (I iterator, I end, F predicate) | |
| Constructor. | |
| ConditionalIterator (I end) | |
| Implicit conversion from an end iterator. | |
| I | operator-> () |
| Indirection operator, returns the underlying iterator. Undefined if iterator is at the end. | |
| std::iterator_traits< I >::reference | operator* () |
| Dereference operator, returns the object referenced by the iterator. Undefined if iterator is at the end. | |
| ConditionalIterator & | operator++ () |
| Advance the iterator to the next element which matches the predicate, or the end if there are none remaining. Undefined if the iterator is already at the end. | |
| ConditionalIterator | operator++ (int) |
| Advance the iterator to the next element which matches the predicate, or the end if there are none remaining. Undefined if the iterator is already at the end. | |
| bool | operator== (const ConditionalIterator &other) const |
| Comparison operators. | |
| bool | operator!= (const ConditionalIterator &other) const |
| Comparison operators. | |
| bool | operator< (const ConditionalIterator &other) const |
| Comparison operators. | |
| bool | operator<= (const ConditionalIterator &other) const |
| Comparison operators. | |
| bool | operator> (const ConditionalIterator &other) const |
| Comparison operators. | |
| bool | operator>= (const ConditionalIterator &other) const |
| Comparison operators. | |
Iterator wrapper which skips over any elements which do not satisfy a given condition predicate.
By creating a CRange from such iterators, it is possible to return the results of predicate methods without copying elements.
Definition at line 202 of file iterator.h.
| using swift::misc::Iterators::ConditionalIterator< I, F >::difference_type = typename std::iterator_traits<I>::difference_type |
Types.
Definition at line 209 of file iterator.h.
| using swift::misc::Iterators::ConditionalIterator< I, F >::iterator_category = std::forward_iterator_tag |
Types.
Definition at line 207 of file iterator.h.
| using swift::misc::Iterators::ConditionalIterator< I, F >::pointer = typename std::iterator_traits<I>::pointer |
Types.
Definition at line 210 of file iterator.h.
| using swift::misc::Iterators::ConditionalIterator< I, F >::reference = typename std::iterator_traits<I>::reference |
Types.
Definition at line 211 of file iterator.h.
| using swift::misc::Iterators::ConditionalIterator< I, F >::value_type = typename std::iterator_traits<I>::value_type |
Types.
Definition at line 208 of file iterator.h.
|
inline |
Constructor.
Definition at line 215 of file iterator.h.
|
inline |
Implicit conversion from an end iterator.
Definition at line 224 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 258 of file iterator.h.
|
inline |
Dereference operator, returns the object referenced by the iterator. Undefined if iterator is at the end.
Definition at line 253 of file iterator.h.
|
inline |
Advance the iterator to the next element which matches the predicate, or the end if there are none remaining. Undefined if the iterator is already at the end.
Definition at line 229 of file iterator.h.
|
inline |
Advance the iterator to the next element which matches the predicate, or the end if there are none remaining. Undefined if the iterator is already at the end.
Definition at line 239 of file iterator.h.
|
inline |
Indirection operator, returns the underlying iterator. Undefined if iterator is at the end.
Definition at line 249 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 259 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 260 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 257 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 261 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 262 of file iterator.h.