userver: formats::json::parser::MapParser< Map, ValueParser > Class Template Reference
Loading...
Searching...
No Matches
formats::json::parser::MapParser< Map, ValueParser > Class Template Referencefinal

Detailed Description

template<typename Map, typename ValueParser>
class formats::json::parser::MapParser< Map, ValueParser >

Definition at line 10 of file map_parser.hpp.

+ Inheritance diagram for formats::json::parser::MapParser< Map, ValueParser >:

Public Types

using Value = typename Map::mapped_type
 
using ResultType
 

Public Member Functions

 MapParser (ValueParser &value_parser)
 
void Reset () override
 
void StartObject () override
 
void Key (std::string_view key) override
 
void EndObject () override
 
std::string Expected () const override
 
void Subscribe (Subscriber< Map > &subscriber)
 
TypedParser< Map > & GetParser ()
 
virtual void Null ()
 
virtual void Bool (bool)
 
virtual void Int64 (int64_t)
 
virtual void Uint64 (uint64_t)
 
virtual void Double (double)
 
virtual void String (std::string_view)
 
virtual void EndObject (size_t)
 
virtual void StartArray ()
 
virtual void EndArray ()
 
virtual void EndArray (size_t)
 
void SetState (ParserState &state)
 

Protected Member Functions

void SetResult (Map &&value)
 
void Throw (const std::string &found)
 

Protected Attributes

ParserStateparser_state_ {nullptr}
 

Member Typedef Documentation

◆ ResultType

using formats::json::parser::TypedParser< Map >::ResultType
inherited

Definition at line 133 of file typed_parser.hpp.

◆ Value

template<typename Map , typename ValueParser >
using formats::json::parser::MapParser< Map, ValueParser >::Value = typename Map::mapped_type

Definition at line 12 of file map_parser.hpp.

Constructor & Destructor Documentation

◆ MapParser()

template<typename Map , typename ValueParser >
formats::json::parser::MapParser< Map, ValueParser >::MapParser ( ValueParser & value_parser)
inlineexplicit

Definition at line 14 of file map_parser.hpp.

Member Function Documentation

◆ Bool()

virtual void formats::json::parser::BaseParser::Bool ( bool )
inlinevirtualinherited

Definition at line 17 of file base_parser.hpp.

◆ Double()

virtual void formats::json::parser::BaseParser::Double ( double )
inlinevirtualinherited

Definition at line 20 of file base_parser.hpp.

◆ EndArray() [1/2]

virtual void formats::json::parser::BaseParser::EndArray ( )
inlinevirtualinherited

Definition at line 26 of file base_parser.hpp.

◆ EndArray() [2/2]

virtual void formats::json::parser::BaseParser::EndArray ( size_t )
inlinevirtualinherited

Definition at line 30 of file base_parser.hpp.

◆ EndObject() [1/2]

template<typename Map , typename ValueParser >
void formats::json::parser::MapParser< Map, ValueParser >::EndObject ( )
inlineoverridevirtual

Reimplemented from formats::json::parser::BaseParser.

Definition at line 38 of file map_parser.hpp.

◆ EndObject() [2/2]

virtual void formats::json::parser::BaseParser::EndObject ( size_t )
inlinevirtualinherited

Definition at line 29 of file base_parser.hpp.

◆ Expected()

template<typename Map , typename ValueParser >
std::string formats::json::parser::MapParser< Map, ValueParser >::Expected ( ) const
inlineoverridevirtual

Implements formats::json::parser::BaseParser.

Definition at line 47 of file map_parser.hpp.

◆ GetParser()

TypedParser< Map > & formats::json::parser::TypedParser< Map >::GetParser ( )
inlineinherited

Returns an actual parser. It is commonly used in PushParser() to identify typed parser of a proxy parser.

Definition at line 144 of file typed_parser.hpp.

◆ Int64()

virtual void formats::json::parser::BaseParser::Int64 ( int64_t )
inlinevirtualinherited

Definition at line 18 of file base_parser.hpp.

◆ Key()

template<typename Map , typename ValueParser >
void formats::json::parser::MapParser< Map, ValueParser >::Key ( std::string_view key)
inlineoverridevirtual

Reimplemented from formats::json::parser::BaseParser.

Definition at line 29 of file map_parser.hpp.

◆ Null()

virtual void formats::json::parser::BaseParser::Null ( )
inlinevirtualinherited

Definition at line 16 of file base_parser.hpp.

◆ Reset()

template<typename Map , typename ValueParser >
void formats::json::parser::MapParser< Map, ValueParser >::Reset ( )
inlineoverridevirtual

Resets parser's internal state. It should not call Reset() of subparsers (if any). Subparsers' Reset() should be called just before pushing it onto the stack.

Reimplemented from formats::json::parser::TypedParser< Map >.

Definition at line 16 of file map_parser.hpp.

◆ SetResult()

void formats::json::parser::TypedParser< Map >::SetResult ( Map && value)
inlineprotectedinherited

Definition at line 147 of file typed_parser.hpp.

◆ SetState()

void formats::json::parser::BaseParser::SetState ( ParserState & state)
inlineinherited

Definition at line 32 of file base_parser.hpp.

◆ StartArray()

virtual void formats::json::parser::BaseParser::StartArray ( )
inlinevirtualinherited

Definition at line 25 of file base_parser.hpp.

◆ StartObject()

template<typename Map , typename ValueParser >
void formats::json::parser::MapParser< Map, ValueParser >::StartObject ( )
inlineoverridevirtual

Reimplemented from formats::json::parser::BaseParser.

Definition at line 18 of file map_parser.hpp.

◆ String()

virtual void formats::json::parser::BaseParser::String ( std::string_view )
inlinevirtualinherited

Definition at line 21 of file base_parser.hpp.

◆ Subscribe()

void formats::json::parser::TypedParser< Map >::Subscribe ( Subscriber< Map > & subscriber)
inlineinherited

Definition at line 131 of file typed_parser.hpp.

◆ Throw()

void formats::json::parser::BaseParser::Throw ( const std::string & found)
inlineprotectedinherited

Definition at line 37 of file base_parser.hpp.

◆ Uint64()

virtual void formats::json::parser::BaseParser::Uint64 ( uint64_t )
inlinevirtualinherited

Definition at line 19 of file base_parser.hpp.

Member Data Documentation

◆ parser_state_

ParserState* formats::json::parser::BaseParser::parser_state_ {nullptr}
protectedinherited

Definition at line 44 of file base_parser.hpp.


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