LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "zip.h"
Public Types | |
Data types | |
using | difference_type = std::ptrdiff_t |
using | reference = std::tuple< typename std::iterator_traits< Iters >::reference... > |
using | value_type = std::remove_cv_t< reference > |
using | pointer = std::add_pointer_t< std::remove_reference_t< reference >> |
using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
Constructors | |
zip_iterator ()=default | |
Constructor: all iterators are default-constructed. More... | |
zip_iterator (Iters &&...iterators) | |
Constructor: copies all iterator values. More... | |
Access | |
auto | operator* () const |
Returns a tuple with values from all dereferenced iterators. More... | |
template<std::size_t Index> | |
decltype(auto) | get () const |
Returns the iterator at the specified Index . More... | |
Modification | |
this_iterator_t & | operator++ () |
Increments all the iterators. More... | |
this_iterator_t | operator++ (int) |
Comparisons | |
template<std::size_t OtherLead, typename... OtherIter> | |
bool | operator!= (zip_iterator< OtherLead, OtherIter... > const &other) const |
Comparison (based on the Lead iterator only). More... | |
template<std::size_t OtherLead, typename... OtherIter> | |
bool | operator== (zip_iterator< OtherLead, OtherIter... > const &other) const |
Comparison (based on the Lead iterator only). More... | |
Private Types | |
using | this_iterator_t = zip_iterator< Lead, Iters... > |
Type of this object. More... | |
Private Member Functions | |
template<std::size_t... Indices> | |
void | increment_impl (std::index_sequence< Indices... >) |
template<std::size_t... Indices> | |
auto | dereference_impl (std::index_sequence< Indices... >) const |
Static Private Member Functions | |
template<typename... Args> | |
static void | expandStatements (Args &...args) |
Helper to trigger parameter pack expansion in expressions. More... | |
Private Attributes | |
std::tuple< Iters... > | fIterators |
Tuple of all zipped iterators. More... | |
using util::details::zip_iterator< Lead, Iters >::difference_type = std::ptrdiff_t |
using util::details::zip_iterator< Lead, Iters >::iterator_category = std::forward_iterator_tag |
using util::details::zip_iterator< Lead, Iters >::pointer = std::add_pointer_t<std::remove_reference_t<reference>> |
using util::details::zip_iterator< Lead, Iters >::reference = std::tuple<typename std::iterator_traits<Iters>::reference...> |
|
private |
using util::details::zip_iterator< Lead, Iters >::value_type = std::remove_cv_t<reference> |
|
default |
Constructor: all iterators are default-constructed.
|
inline |
|
inlineprivate |
Definition at line 208 of file zip.h.
References util::details::zip_iterator< Lead, Iters >::fIterators.
Referenced by util::details::zip_iterator< Lead, Iters >::operator*().
|
inlinestaticprivate |
Helper to trigger parameter pack expansion in expressions.
Definition at line 198 of file zip.h.
Referenced by util::details::zip_iterator< Lead, Iters >::increment_impl().
|
inline |
Returns the iterator at the specified Index
.
Definition at line 141 of file zip.h.
References util::details::zip_iterator< Lead, Iters >::fIterators.
|
inlineprivate |
Definition at line 202 of file zip.h.
References util::details::zip_iterator< Lead, Iters >::expandStatements(), and util::details::zip_iterator< Lead, Iters >::fIterators.
Referenced by util::details::zip_iterator< Lead, Iters >::operator++().
|
inline |
Comparison (based on the Lead
iterator only).
Definition at line 178 of file zip.h.
|
inline |
Returns a tuple with values from all dereferenced iterators.
Definition at line 137 of file zip.h.
References util::details::zip_iterator< Lead, Iters >::dereference_impl().
|
inline |
Increments all the iterators.
Definition at line 154 of file zip.h.
References util::details::zip_iterator< Lead, Iters >::increment_impl().
Referenced by util::details::zip_iterator< Lead, Iters >::operator++(), and util::details::zip_iterator< Lead >::operator++().
|
inline |
Returns a copy of the current iterators, then increments all of the iterators in this object.
Definition at line 162 of file zip.h.
References util::details::zip_iterator< Lead, Iters >::operator++().
|
inline |
Comparison (based on the Lead
iterator only).
Definition at line 185 of file zip.h.
|
private |
Tuple of all zipped iterators.
Definition at line 194 of file zip.h.
Referenced by util::details::zip_iterator< Lead, Iters >::dereference_impl(), util::details::zip_iterator< Lead, Iters >::get(), and util::details::zip_iterator< Lead, Iters >::increment_impl().