SPH
|
Helper objects allowing to iterate in reverse, iterate over multiple containeres, etc. More...
Go to the source code of this file.
Classes | |
class | ReverseIterator< TIterator > |
Generic reverse iterator over continuous array of objects of type T. More... | |
class | ReverseAdapter< TContainer > |
class | ComponentIterator< TIterator > |
struct | VectorComponentAdapter< TBuffer > |
Wraps a vector container, providing means to iterate over given component of vector elements. More... | |
class | TupleIterator< TElement, TIterator > |
Holds multiple iterators, advancing all of them at the same time. More... | |
class | TupleAdapter< TElement, TContainers > |
class | ElementWithIndex< TValue > |
class | IteratorWithIndex< TIterator > |
Wrapper of iterator keeping also an index of current element. More... | |
class | IndexAdapter< TContainer > |
struct | SubRange< TIterator > |
class | SubsetIterator< TIterator, TCondition > |
Allows to iterate over a given subset of a container, given by condition functor. More... | |
class | SubsetAdapter< TContainer, TCondition > |
Non-owning view to access and iterate over subset of container. More... | |
class | IndexIterator |
class | IndexSequence |
Functions | |
template<typename TIterator > | |
ReverseIterator< TIterator > | reverseIterator (const TIterator iter) |
Creates reverse iterator by wrapping forward iterator, utilizes type deduction. More... | |
template<typename TContainer > | |
ReverseAdapter< TContainer > | reverse (TContainer &&container) |
template<typename TBuffer > | |
auto | componentAdapter (TBuffer &&buffer, const Size component) |
template<typename TElement , typename... TIterators> | |
TupleIterator< TElement, TIterators... > | makeTupleIterator (const TIterators &... iterators) |
Creates TupleIterator from individual iterators, utilizing type deduction. More... | |
template<typename TElement , typename... TContainers> | |
TupleAdapter< TElement, TContainers... > | iterateTuple (TContainers &&... containers) |
template<typename TValue > | |
ElementWithIndex< TValue > | makeElementWithIndex (TValue &&value, const Size index) |
template<typename TIterator > | |
IteratorWithIndex< TIterator > | makeIteratorWithIndex (TIterator &&iterator, const Size index) |
template<typename TContainer > | |
IndexAdapter< TContainer > | iterateWithIndex (TContainer &&container) |
template<typename TContainer > | |
INLINE auto | subrange (const TContainer &container, const Size firstIdx, const Size lastIdx) |
template<typename TIterator , typename TCondition > | |
INLINE auto | makeSubsetIterator (const TIterator &iterator, const TIterator &end, TCondition &&condition) |
template<typename TContainer , typename TCondition > | |
auto | subset (TContainer &&container, TCondition &&condition) |
Helper objects allowing to iterate in reverse, iterate over multiple containeres, etc.
Definition in file IteratorAdapters.h.
auto componentAdapter | ( | TBuffer && | buffer, |
const Size | component | ||
) |
Returns the VectorComponentAdapter, utilizing type deduction. Indended usage is:
Definition at line 241 of file IteratorAdapters.h.
TupleAdapter<TElement, TContainers...> iterateTuple | ( | TContainers &&... | containers | ) |
Definition at line 353 of file IteratorAdapters.h.
IndexAdapter<TContainer> iterateWithIndex | ( | TContainer && | container | ) |
Definition at line 456 of file IteratorAdapters.h.
ElementWithIndex<TValue> makeElementWithIndex | ( | TValue && | value, |
const Size | index | ||
) |
Definition at line 394 of file IteratorAdapters.h.
IteratorWithIndex<TIterator> makeIteratorWithIndex | ( | TIterator && | iterator, |
const Size | index | ||
) |
Definition at line 432 of file IteratorAdapters.h.
INLINE auto makeSubsetIterator | ( | const TIterator & | iterator, |
const TIterator & | end, | ||
TCondition && | condition | ||
) |
Definition at line 543 of file IteratorAdapters.h.
TupleIterator<TElement, TIterators...> makeTupleIterator | ( | const TIterators &... | iterators | ) |
Creates TupleIterator from individual iterators, utilizing type deduction.
Definition at line 306 of file IteratorAdapters.h.
ReverseAdapter<TContainer> reverse | ( | TContainer && | container | ) |
Creates the ReverseAdapter over given container, utilizing type deduction. To iterate over elements of container in reverse order, use
Definition at line 115 of file IteratorAdapters.h.
ReverseIterator<TIterator> reverseIterator | ( | const TIterator | iter | ) |
Creates reverse iterator by wrapping forward iterator, utilizes type deduction.
Definition at line 63 of file IteratorAdapters.h.
INLINE auto subrange | ( | const TContainer & | container, |
const Size | firstIdx, | ||
const Size | lastIdx | ||
) |
Definition at line 488 of file IteratorAdapters.h.
auto subset | ( | TContainer && | container, |
TCondition && | condition | ||
) |
Definition at line 570 of file IteratorAdapters.h.