37template <
class ... Iterators >
52 template <
size_t ... I >
53 ext::tuple <
const typename Iterators::value_type & ... > callDerefOperator (
const std::index_sequence < I ... > & )
const {
54 return ext::tie ( * std::get < I > ( current ) ... );
61 template <
size_t ... I >
62 void callIncOperator (
const std::index_sequence < I ... > & ) {
63 ext::tie ( ++std::get < I > ( current ) ... );
70 template <
size_t ... I >
71 void callDecOperator (
const std::index_sequence < I ... > & ) {
72 ext::tie ( --std::get < I > ( current ) ... );
93 decltype ( std::get < I > ( current ) )
base ( )
const {
94 return std::get < I > ( current );
103 template <
size_t ... I >
105 return callDerefOperator ( std::index_sequence_for < Iterators ... > { } );
115 callIncOperator ( std::index_sequence_for < Iterators ... > { } );
126 callDecOperator ( std::index_sequence_for < Iterators ... > { } );
165 return this->current == other.current;
177 return !( *
this == other );
192template <
class ... Iterators >
203template <
class ... Types >
220 template <
size_t ... I >
233 template <
size_t ... I >
254 return callBegin ( std::index_sequence_for < Types ... > { } );
264 return callEnd ( std::index_sequence_for < Types ... > { } );
279template <
class ... Types >
290template <
class IntegralType >
385 return this->m_data == other.m_data;
397 return !( *
this == other );
407template <
class IntegralType >
413 IntegralType m_first;
429 sequence ( IntegralType first, IntegralType last ) : m_first ( first ), m_last ( last ) {
438 sequence ( IntegralType size ) : m_first ( 0 ), m_last ( size ) {
A class for packing a tuple of iterators and synchronizing them. All are incremented,...
Definition: foreach.hpp:38
bool operator!=(const const_tuple_foreach_iterator< Iterators ... > &other) const
Implementation of inequality comparison operator on tuple of iterators.
Definition: foreach.hpp:176
const_tuple_foreach_iterator(Iterators ... it)
Constructor of the iterator tuple from a pack of iterators.
Definition: foreach.hpp:83
const_tuple_foreach_iterator & operator--()
Prefix version of decrement operator that propagates the call to all underlying iterators.
Definition: foreach.hpp:125
decltype(std::get< I >(current)) base() const
Getter of an Ith iterator from the tuple of underlying iterators.
Definition: foreach.hpp:93
ext::tuple< const typename Iterators::value_type &... > operator*() const
Implementation of dereference operator on all iterators in the tuple.
Definition: foreach.hpp:104
bool operator==(const const_tuple_foreach_iterator< Iterators ... > &other) const
Implementation of equality comparison operator on tuple of iterators.
Definition: foreach.hpp:164
const_tuple_foreach_iterator & operator++()
Prefix version of increment operator that propagates the call to all underlying iterators.
Definition: foreach.hpp:114
Class providing begin and end methods to allow simple use of packed iterators in foreach variant of t...
Definition: foreach.hpp:204
const_tuple_foreach(const Types &... args)
Constructor of foreach tuple pack helper.
Definition: foreach.hpp:245
const_tuple_foreach_iterator< typename Types::const_iterator ... > end() const
Getter of pack of end iterators.
Definition: foreach.hpp:263
const_tuple_foreach_iterator< typename Types::const_iterator ... > begin() const
Getter of pack of begin iterators.
Definition: foreach.hpp:253
Representation of integer sequence usable in foreach form of for loop.
Definition: foreach.hpp:408
virtual_pointer_to_integer< IntegralType > begin()
Getter of the begin iterator into the sequence.
Definition: foreach.hpp:447
sequence(IntegralType size)
Constructor of the sequence class based on the size.
Definition: foreach.hpp:438
virtual_pointer_to_integer< IntegralType > end()
Getter of the end iterator into the sequence.
Definition: foreach.hpp:457
sequence(IntegralType first, IntegralType last)
The constructor of the sequence based on the range.
Definition: foreach.hpp:429
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
Class wrapping an integral type, but with pointer iterface.
Definition: foreach.hpp:291
bool operator==(const virtual_pointer_to_integer< IntegralType > &other) const
Equality operator. Two classes are equal if the data they hold is the same.
Definition: foreach.hpp:384
bool operator!=(const virtual_pointer_to_integer< IntegralType > &other) const
Inequality operator. Two classes are not equal if the data they hold is different.
Definition: foreach.hpp:396
std::bidirectional_iterator_tag iterator_category
Definition: foreach.hpp:307
std::ptrdiff_t difference_type
Definition: foreach.hpp:301
virtual_pointer_to_integer & operator++()
Prefix increment operator to increment the hold value.
Definition: foreach.hpp:334
virtual_pointer_to_integer & operator--()
Prefix decrement operator to decrement the hold value.
Definition: foreach.hpp:345
IntegralType operator*() const
Method to retrieve the integral value.
Definition: foreach.hpp:324
IntegralType value_type
Definition: foreach.hpp:299
IntegralType reference
Definition: foreach.hpp:305
virtual_pointer_to_integer(IntegralType data)
Constructor of the virtual pointer class.
Definition: foreach.hpp:315
IntegralType * pointer
Definition: foreach.hpp:303
Definition: sigHandler.cpp:20
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
const_tuple_foreach_iterator< Iterators ... > make_tuple_foreach_iterator(Iterators ... its)
Function construction of the tuple iterator.
Definition: foreach.hpp:193
const_tuple_foreach< Types ... > make_tuple_foreach(const Types &... args)
Function construction of foreach tuple pack helper.
Definition: foreach.hpp:280