MySQL 9.1.0
Source Code Documentation
|
Iterator that provides the elements of a nested map as a linear sequence. More...
#include <rpl_msr.h>
Public Types | |
using | value_type = decltype(mapped_value(Inner_iterator_t())) |
using | difference_type = std::ptrdiff_t |
Public Member Functions | |
Denested_map_iterator ()=default | |
Default constructor. More... | |
constexpr | Denested_map_iterator (const Outer_iterator_t &outer_begin, const Outer_iterator_t &outer_end, bool at_end) |
Constructor. More... | |
constexpr Self_t & | operator++ () |
Pre-increment. More... | |
constexpr Self_t | operator++ (int) |
Post-increment. More... | |
constexpr decltype(auto) | operator* () const |
Dereference. More... | |
constexpr bool | operator== (const Self_t &other) const |
Comparison. More... | |
Private Types | |
using | Self_t = Denested_map_iterator< Outer_iterator_t, outer_is_map, inner_is_map > |
using | Inner_map_t = decltype(mapped_value(Outer_iterator_t())) |
using | Inner_iterator_t = Iterator_for< Inner_map_t > |
Private Member Functions | |
constexpr void | skip_inner_end_positions () |
Maintain the invariant that either m_outer_it points to the end, or m_inner_it doesn't point to the end. More... | |
Static Private Member Functions | |
static auto & | mapped_value (const Outer_iterator_t &outer_iterator) |
static auto & | mapped_value (const Inner_iterator_t &inner_iterator) |
Private Attributes | |
Outer_iterator_t | m_outer_begin {} |
Beginning of outer map. More... | |
Outer_iterator_t | m_outer_end {} |
End of outer map. More... | |
Outer_iterator_t | m_outer_it {} |
Iterator to the outer map. More... | |
Inner_iterator_t | m_inner_it {} |
Iterator to the inner map, or undefined if the outer map points to the end. More... | |
Iterator that provides the elements of a nested map as a linear sequence.
This satisfies std::forward_iterator.
Outer_iterator_t | Forward iterator over the outer map. |
outer_is_map | If true, the outer map iterator yields pairs, and the second component of each pair contains the inner map. If false, the outer map iterator yields inner maps directly. |
inner_is_map | If true, the inner map iterator yields pairs, and the second component of each pair contains the value. If false, the inner map iterator yields values directly. |
using Denested_map_iterator< Outer_iterator_t, outer_is_map, inner_is_map >::difference_type = std::ptrdiff_t |
|
private |
|
private |
|
private |
using Denested_map_iterator< Outer_iterator_t, outer_is_map, inner_is_map >::value_type = decltype(mapped_value(Inner_iterator_t())) |
|
default |
Default constructor.
The result is an object that is useless in itself since all member functions are undefined. It can be assigned or moved to, and it is required for iterators to be default-constructible.
|
inlineexplicitconstexpr |
Constructor.
outer_begin | Iterator to the first element of the nested map. |
outer_end | Iterator to the one-past-the-last element of the nested map. |
at_end | If true, position at the end; if false, position at the beginning. |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlineconstexpr |
Dereference.
|
inlineconstexpr |
Pre-increment.
|
inlineconstexpr |
Post-increment.
|
inlineconstexpr |
Comparison.
|
inlineconstexprprivate |
Maintain the invariant that either m_outer_it points to the end, or m_inner_it doesn't point to the end.
This may moves the iterators forward until the condition is met.
|
private |
Iterator to the inner map, or undefined if the outer map points to the end.
|
private |
Beginning of outer map.
|
private |
End of outer map.
|
private |
Iterator to the outer map.