MySQL 8.0.39
Source Code Documentation
|
Class that iterates over all members of a JSON object that is wrapped in a Json_wrapper instance. More...
#include <json_dom.h>
Public Types | |
using | value_type = std::pair< MYSQL_LEX_CSTRING, Json_wrapper > |
using | reference = const value_type & |
using | pointer = const value_type * |
using | difference_type = ptrdiff_t |
using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
Json_wrapper_object_iterator (const Json_wrapper &wrapper, bool begin) | |
Creates an iterator that iterates over all members of the given Json_wrapper, if it wraps a JSON object. More... | |
Json_wrapper_object_iterator ()=default | |
Forward iterators must be default constructible. More... | |
Json_wrapper_object_iterator & | operator++ () |
Advances the iterator to the next element. More... | |
const Json_wrapper_object_iterator | operator++ (int) |
Advances the iterator to the next element and returns an iterator that points to the current element (post-increment operator). More... | |
bool | operator== (const Json_wrapper_object_iterator &other) const |
Checks two iterators for equality. More... | |
bool | operator!= (const Json_wrapper_object_iterator &other) const |
Checks two iterators for inequality. More... | |
pointer | operator-> () |
reference | operator* () |
Private Member Functions | |
bool | is_dom () const |
Returns true if iterating over a DOM. More... | |
void | initialize_current_member () |
Fill m_current_member with the key and value of the current member. More... | |
Private Attributes | |
value_type | m_current_member |
Pair holding the key and value of the member pointed to by the iterator. More... | |
bool | m_current_member_initialized {false} |
True if m_current_member is initialized. More... | |
const json_binary::Value * | m_binary_value |
The binary JSON object being iterated over, or nullptr for DOMs. More... | |
size_t | m_current_element_index |
The index of the current member in the binary JSON object. More... | |
Json_object::const_iterator | m_iter |
Iterator pointing to the current member in the JSON DOM object. More... | |
Class that iterates over all members of a JSON object that is wrapped in a Json_wrapper instance.
using Json_wrapper_object_iterator::difference_type = ptrdiff_t |
using Json_wrapper_object_iterator::iterator_category = std::forward_iterator_tag |
using Json_wrapper_object_iterator::pointer = const value_type * |
using Json_wrapper_object_iterator::reference = const value_type & |
using Json_wrapper_object_iterator::value_type = std::pair<MYSQL_LEX_CSTRING, Json_wrapper> |
Json_wrapper_object_iterator::Json_wrapper_object_iterator | ( | const Json_wrapper & | wrapper, |
bool | begin | ||
) |
Creates an iterator that iterates over all members of the given Json_wrapper, if it wraps a JSON object.
If the wrapper does not wrap a JSON object, the result is undefined.
wrapper | the Json_wrapper to iterate over |
begin | true to construct an iterator that points to the first member of the object, false to construct a past-the-end iterator |
|
default |
Forward iterators must be default constructible.
|
private |
Fill m_current_member with the key and value of the current member.
|
inlineprivate |
Returns true if iterating over a DOM.
|
inline |
Checks two iterators for inequality.
|
inline |
|
inline |
Advances the iterator to the next element.
|
inline |
Advances the iterator to the next element and returns an iterator that points to the current element (post-increment operator).
|
inline |
|
inline |
Checks two iterators for equality.
|
private |
The binary JSON object being iterated over, or nullptr for DOMs.
|
private |
The index of the current member in the binary JSON object.
|
private |
Pair holding the key and value of the member pointed to by the iterator.
|
private |
True if m_current_member is initialized.
|
private |
Iterator pointing to the current member in the JSON DOM object.