nlohmann::detail::iteration_proxy_value< IteratorType > Class Template Reference

`#include <json.hpp>`

Collaboration diagram for nlohmann::detail::iteration_proxy_value< IteratorType >:

## Public Types

using | difference_type = std::ptrdiff_t
using | value_type = iteration_proxy_value
using | pointer = value_type *
using | reference = value_type &
using | iterator_category = std::input_iterator_tag
using | string_type = typename std::remove_cv< typename std::remove_reference< decltype(std::declval< IteratorType >().key()) >::type >::type

## Public Member Functions

| iteration_proxy_value (IteratorType it) noexcept
iteration_proxy_value & | operator* ()
| dereference operator (needed for range-based for) More...
iteration_proxy_value & | operator++ ()
| increment operator (needed for range-based for) More...
bool | operator== (const iteration_proxy_value &o) const
| equality operator (needed for InputIterator) More...
bool | operator!= (const iteration_proxy_value &o) const
| inequality operator (needed for range-based for) More...
const string_type & | key () const
| return key of the iterator More...
IteratorType::reference | value () const
| return value of the iterator More...

## Private Attributes

IteratorType | anchor
| the iterator More...
std::size_t | array_index = 0
| an index for arrays (used to create key names) More...
std::size_t | array_index_last = 0
| last stringified array index More...
string_type | array_index_str = "0"
| a string representation of the array index More...
const string_type | empty_str {}
| an empty string (to return a reference for primitive values) More...

## Detailed Description

### template<typename IteratorType>
class nlohmann::detail::iteration_proxy_value< IteratorType >

Definition at line 4306 of file json.hpp.

## Member Typedef Documentation

## difference_type

template<typename IteratorType >

using nlohmann::detail::iteration_proxy_value< IteratorType >::difference_type = std::ptrdiff_t

Definition at line 4309 of file json.hpp.

## iterator_category

template<typename IteratorType >

using nlohmann::detail::iteration_proxy_value< IteratorType >::iterator_category = std::input_iterator_tag

Definition at line 4313 of file json.hpp.

## pointer

template<typename IteratorType >

using nlohmann::detail::iteration_proxy_value< IteratorType >::pointer = value_type *

Definition at line 4311 of file json.hpp.

## reference

template<typename IteratorType >

using nlohmann::detail::iteration_proxy_value< IteratorType >::reference = value_type &

Definition at line 4312 of file json.hpp.

## string_type

template<typename IteratorType >

using nlohmann::detail::iteration_proxy_value< IteratorType >::string_type = typename std::remove_cv< typename std::remove_reference<decltype( std::declval<IteratorType>().key() ) >::type >::type

Definition at line 4314 of file json.hpp.

## value_type

template<typename IteratorType >

using nlohmann::detail::iteration_proxy_value< IteratorType >::value_type = iteration_proxy_value

Definition at line 4310 of file json.hpp.

## Constructor & Destructor Documentation

## iteration_proxy_value()

template<typename IteratorType >

nlohmann::detail::iteration_proxy_value< IteratorType >::iteration_proxy_value | ( | IteratorType | it | ) |

inline explicit noexcept

Definition at line 4329 of file json.hpp.

## Member Function Documentation

## key()

template<typename IteratorType >

const string_type& nlohmann::detail::iteration_proxy_value< IteratorType >::key | ( |  | ) | const

inline

return key of the iterator

Definition at line 4361 of file json.hpp.

References nlohmann::detail::array, nlohmann::detail::int_to_string(), JSON_ASSERT, and nlohmann::detail::object.

Referenced by nlohmann::detail::get().

## operator!=()

template<typename IteratorType >

bool nlohmann::detail::iteration_proxy_value< IteratorType >::operator!= | ( | const iteration_proxy_value< IteratorType > & | o | ) | const

inline

inequality operator (needed for range-based for)

Definition at line 4355 of file json.hpp.

References nlohmann::detail::iteration_proxy_value< IteratorType >::anchor.

## operator*()

template<typename IteratorType >

iteration_proxy_value& nlohmann::detail::iteration_proxy_value< IteratorType >::operator* | ( |  | ) |

inline

dereference operator (needed for range-based for)

Definition at line 4334 of file json.hpp.

## operator++()

template<typename IteratorType >

iteration_proxy_value& nlohmann::detail::iteration_proxy_value< IteratorType >::operator++ | ( |  | ) |

inline

increment operator (needed for range-based for)

Definition at line 4340 of file json.hpp.

## operator==()

template<typename IteratorType >

bool nlohmann::detail::iteration_proxy_value< IteratorType >::operator== | ( | const iteration_proxy_value< IteratorType > & | o | ) | const

inline

equality operator (needed for InputIterator)

Definition at line 4349 of file json.hpp.

References nlohmann::detail::iteration_proxy_value< IteratorType >::anchor.

## value()

template<typename IteratorType >

IteratorType::reference nlohmann::detail::iteration_proxy_value< IteratorType >::value | ( |  | ) | const

inline

return value of the iterator

Definition at line 4389 of file json.hpp.

## Member Data Documentation

## anchor

template<typename IteratorType >

IteratorType nlohmann::detail::iteration_proxy_value< IteratorType >::anchor

private

the iterator

Definition at line 4318 of file json.hpp.

Referenced by nlohmann::detail::iteration_proxy_value< IteratorType >::operator!=(), and nlohmann::detail::iteration_proxy_value< IteratorType >::operator==().

## array_index

template<typename IteratorType >

std::size_t nlohmann::detail::iteration_proxy_value< IteratorType >::array_index = 0

private

an index for arrays (used to create key names)

Definition at line 4320 of file json.hpp.

## array_index_last

template<typename IteratorType >

std::size_t nlohmann::detail::iteration_proxy_value< IteratorType >::array_index_last = 0

mutable private

last stringified array index

Definition at line 4322 of file json.hpp.

## array_index_str

template<typename IteratorType >

string_type nlohmann::detail::iteration_proxy_value< IteratorType >::array_index_str = "0"

mutable private

a string representation of the array index

Definition at line 4324 of file json.hpp.

## empty_str

template<typename IteratorType >

const string_type nlohmann::detail::iteration_proxy_value< IteratorType >::empty_str {}

private

an empty string (to return a reference for primitive values)

Definition at line 4326 of file json.hpp.

The documentation for this class was generated from the following file:

- json.hpp