xrootd
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
nlohmann::detail::iteration_proxy_value< IteratorType > Class Template Reference

#include <XrdOucJson.hh>

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_valueoperator* ()
 dereference operator (needed for range-based for)
 
iteration_proxy_valueoperator++ ()
 increment operator (needed for range-based for)
 
bool operator== (const iteration_proxy_value &o) const
 equality operator (needed for InputIterator)
 
bool operator!= (const iteration_proxy_value &o) const
 inequality operator (needed for range-based for)
 
const string_typekey () const
 return key of the iterator
 
IteratorType::reference value () const
 return value of the iterator
 

Private Attributes

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

Member Typedef Documentation

◆ difference_type

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

◆ iterator_category

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

◆ pointer

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

◆ reference

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

◆ 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

◆ value_type

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

Constructor & Destructor Documentation

◆ iteration_proxy_value()

template<typename IteratorType >
nlohmann::detail::iteration_proxy_value< IteratorType >::iteration_proxy_value ( IteratorType  it)
inlineexplicitnoexcept

Member Function Documentation

◆ key()

template<typename IteratorType >
const string_type & nlohmann::detail::iteration_proxy_value< IteratorType >::key ( ) const
inline

◆ 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)

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)

◆ operator++()

template<typename IteratorType >
iteration_proxy_value & nlohmann::detail::iteration_proxy_value< IteratorType >::operator++ ( )
inline

◆ 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)

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

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

Member Data Documentation

◆ anchor

template<typename IteratorType >
IteratorType nlohmann::detail::iteration_proxy_value< IteratorType >::anchor
private

◆ array_index

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

◆ array_index_last

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

last stringified array index

Referenced by nlohmann::detail::iteration_proxy_value< IteratorType >::key().

◆ array_index_str

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

a string representation of the array index

Referenced by nlohmann::detail::iteration_proxy_value< IteratorType >::key().

◆ 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)

Referenced by nlohmann::detail::iteration_proxy_value< IteratorType >::key().


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