DAW JSON Link
Public Member Functions | List of all members
daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState > Class Template Reference

#include <daw_json_value_state.h>

Public Member Functions

constexpr basic_stateful_json_value ()
 
constexpr basic_stateful_json_value (basic_json_value< ParseState > val)
 
constexpr basic_stateful_json_value (std::string_view json_data)
 
template<typename Integer , std::enable_if_t< std::is_integral< Integer >::value, std::nullptr_t > = nullptr>
constexpr std::optional< basic_json_value< ParseState > > at (Integer index)
 
constexpr basic_json_value< ParseState > at (std::string_view key)
 
constexpr bool contains (std::size_t index)
 
constexpr bool contains (std::string_view key)
 
constexpr basic_json_value< ParseState > get_json_value () const
 
std::size_t index_of (std::string_view key)
 
template<typename Integer , std::enable_if_t< std::is_integral< Integer >::value, std::nullptr_t > = nullptr>
std::optional< std::string_view > name_of (Integer index)
 
template<typename Integer , std::enable_if_t< std::is_integral< Integer >::value, std::nullptr_t > = nullptr>
constexpr basic_json_value< ParseState > operator[] (Integer index)
 
constexpr basic_json_value< ParseState > operator[] (json_member_name member)
 
constexpr basic_json_value< ParseState > operator[] (std::string_view key)
 
constexpr void reset (basic_json_value< ParseState > val)
 
std::size_t size ()
 

Detailed Description

template<typename ParseState>
class daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >

Maintains the parse positions of a json_value so that you pay the lookup costs once

Template Parameters
ParseStatesee IteratorRange

Constructor & Destructor Documentation

◆ basic_stateful_json_value() [1/3]

template<typename ParseState >
constexpr daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::basic_stateful_json_value ( basic_json_value< ParseState >  val)
inlineconstexpr

◆ basic_stateful_json_value() [2/3]

template<typename ParseState >
constexpr daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::basic_stateful_json_value ( )
inlineconstexpr

◆ basic_stateful_json_value() [3/3]

template<typename ParseState >
constexpr daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::basic_stateful_json_value ( std::string_view  json_data)
inlineconstexpr

Member Function Documentation

◆ at() [1/2]

template<typename ParseState >
template<typename Integer , std::enable_if_t< std::is_integral< Integer >::value, std::nullptr_t > = nullptr>
constexpr std::optional< basic_json_value< ParseState > > daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::at ( Integer  index)
inlineconstexpr

◆ at() [2/2]

template<typename ParseState >
constexpr basic_json_value< ParseState > daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::at ( std::string_view  key)
inlineconstexpr

◆ contains() [1/2]

template<typename ParseState >
constexpr bool daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::contains ( std::size_t  index)
inlineconstexpr

◆ contains() [2/2]

template<typename ParseState >
constexpr bool daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::contains ( std::string_view  key)
inlineconstexpr

◆ get_json_value()

template<typename ParseState >
constexpr basic_json_value< ParseState > daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::get_json_value ( ) const
inlineconstexpr

◆ index_of()

template<typename ParseState >
std::size_t daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::index_of ( std::string_view  key)
inline

◆ name_of()

template<typename ParseState >
template<typename Integer , std::enable_if_t< std::is_integral< Integer >::value, std::nullptr_t > = nullptr>
std::optional< std::string_view > daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::name_of ( Integer  index)
inline

◆ operator[]() [1/3]

template<typename ParseState >
template<typename Integer , std::enable_if_t< std::is_integral< Integer >::value, std::nullptr_t > = nullptr>
constexpr basic_json_value< ParseState > daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::operator[] ( Integer  index)
inlineconstexpr

◆ operator[]() [2/3]

template<typename ParseState >
constexpr basic_json_value< ParseState > daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::operator[] ( json_member_name  member)
inlineconstexpr

◆ operator[]() [3/3]

template<typename ParseState >
constexpr basic_json_value< ParseState > daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::operator[] ( std::string_view  key)
inlineconstexpr

◆ reset()

template<typename ParseState >
constexpr void daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::reset ( basic_json_value< ParseState >  val)
inlineconstexpr

Reuse state storage for another basic_json_value

Parameters
valValue to contain state for

◆ size()

template<typename ParseState >
std::size_t daw::json::DAW_JSON_VER::basic_stateful_json_value< ParseState >::size ( )
inline

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