swift
Loading...
Searching...
No Matches
swift::misc::Iterators Namespace Reference

Iterator classes for the containers. More...

Classes

class  OutputIterator
 Configurable output iterator using a provided functor to do the insertion. More...
class  TransformIterator
 Iterator wrapper which applies some transformation function to each element. More...
class  ConditionalIterator
 Iterator wrapper which skips over any elements which do not satisfy a given condition predicate. More...
class  ConcatIterator
 Iterator wrapper which concatenates zero or more pairs of begin and end iterators. More...

Functions

template<class F>
auto makeOutputIterator (F &&func)
 Return an output iterator of type deduced from the argument.
template<class T>
auto makeInsertIterator (T &container)
 Return an insert iterator appropriate to the container type (uses push_back or insert).
template<class I, class F>
auto makeTransformIterator (I iterator, F function) -> TransformIterator< I, F >
 Construct a TransformIterator of the appropriate type from deduced template function arguments.
template<class I, class F>
auto makeConditionalIterator (I iterator, I end, F predicate) -> ConditionalIterator< I, F >
 Construct a ConditionalIterator of the appropriate type from deduced template function arguments.
template<class I>
auto makeConcatIterator (QVector< I > iterators) -> ConcatIterator< I >
 Construct a ConcatIterator of the appropriate type from deduced template function arguments.

Detailed Description

Iterator classes for the containers.

Function Documentation

◆ makeConcatIterator()

template<class I>
auto swift::misc::Iterators::makeConcatIterator ( QVector< I > iterators) ->ConcatIterator< I >

Construct a ConcatIterator of the appropriate type from deduced template function arguments.

Definition at line 371 of file iterator.h.

◆ makeConditionalIterator()

template<class I, class F>
auto swift::misc::Iterators::makeConditionalIterator ( I iterator,
I end,
F predicate )->ConditionalIterator< I, F >

Construct a ConditionalIterator of the appropriate type from deduced template function arguments.

Definition at line 362 of file iterator.h.

◆ makeInsertIterator()

template<class T>
auto swift::misc::Iterators::makeInsertIterator ( T & container)

Return an insert iterator appropriate to the container type (uses push_back or insert).

Definition at line 88 of file iterator.h.

◆ makeOutputIterator()

template<class F>
auto swift::misc::Iterators::makeOutputIterator ( F && func)

Return an output iterator of type deduced from the argument.

Definition at line 79 of file iterator.h.

◆ makeTransformIterator()

template<class I, class F>
auto swift::misc::Iterators::makeTransformIterator ( I iterator,
F function )->TransformIterator< I, F >

Construct a TransformIterator of the appropriate type from deduced template function arguments.

Definition at line 353 of file iterator.h.