userver: formats::json::parser::NumberParser< Number > Class Template Reference
Loading...
Searching...
No Matches
formats::json::parser::NumberParser< Number > Class Template Referencefinal

Detailed Description

template<typename Number>
class formats::json::parser::NumberParser< Number >

Definition at line 10 of file number_parser.hpp.

+ Inheritance diagram for formats::json::parser::NumberParser< Number >:

Public Types

using ResultType
 

Public Member Functions

void Subscribe (Subscriber< Number > &subscriber)
 
virtual void Reset ()
 
TypedParser< Number > & GetParser ()
 
virtual void Null ()
 
virtual void Bool (bool)
 
virtual void String (std::string_view)
 
virtual void StartObject ()
 
virtual void Key (std::string_view key)
 
virtual void EndObject ()
 
virtual void EndObject (size_t)
 
virtual void StartArray ()
 
virtual void EndArray ()
 
virtual void EndArray (size_t)
 
void SetState (ParserState &state)
 

Protected Member Functions

void Int64 (int64_t value) override
 
void Uint64 (uint64_t value) override
 
void Double (double value) override
 
std::string Expected () const override
 
std::string GetPathItem () const override
 
void SetResult (Number &&value)
 
void Throw (const std::string &found)
 

Protected Attributes

ParserStateparser_state_ {nullptr}
 

Member Typedef Documentation

◆ ResultType

Definition at line 134 of file typed_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()

template<typename Number >
void formats::json::parser::NumberParser< Number >::Double ( double value)
inlineoverrideprotectedvirtual

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

Definition at line 19 of file number_parser.hpp.

◆ EndArray() [1/2]

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

Definition at line 28 of file base_parser.hpp.

◆ EndArray() [2/2]

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

Definition at line 32 of file base_parser.hpp.

◆ EndObject() [1/2]

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

Definition at line 26 of file base_parser.hpp.

◆ EndObject() [2/2]

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

Definition at line 31 of file base_parser.hpp.

◆ Expected()

template<typename Number >
std::string formats::json::parser::NumberParser< Number >::Expected ( ) const
inlineoverrideprotectedvirtual

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

Definition at line 21 of file number_parser.hpp.

◆ GetParser()

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

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

Definition at line 145 of file typed_parser.hpp.

◆ GetPathItem()

template<typename Number >
std::string formats::json::parser::NumberParser< Number >::GetPathItem ( ) const
inlineoverrideprotectedvirtual

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

Definition at line 23 of file number_parser.hpp.

◆ Int64()

template<typename Number >
void formats::json::parser::NumberParser< Number >::Int64 ( int64_t value)
inlineoverrideprotectedvirtual

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

Definition at line 15 of file number_parser.hpp.

◆ Key()

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

Definition at line 23 of file base_parser.hpp.

◆ Null()

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

Definition at line 16 of file base_parser.hpp.

◆ Reset()

virtual void formats::json::parser::TypedParser< Number >::Reset ( )
inlinevirtualinherited

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.

Definition at line 140 of file typed_parser.hpp.

◆ SetResult()

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

Definition at line 148 of file typed_parser.hpp.

◆ SetState()

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

Definition at line 34 of file base_parser.hpp.

◆ StartArray()

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

Definition at line 27 of file base_parser.hpp.

◆ StartObject()

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

Definition at line 22 of file base_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< Number >::Subscribe ( Subscriber< Number > & subscriber)
inlineinherited

Definition at line 132 of file typed_parser.hpp.

◆ Throw()

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

Definition at line 39 of file base_parser.hpp.

◆ Uint64()

template<typename Number >
void formats::json::parser::NumberParser< Number >::Uint64 ( uint64_t value)
inlineoverrideprotectedvirtual

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

Definition at line 17 of file number_parser.hpp.

Member Data Documentation

◆ parser_state_

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

Definition at line 47 of file base_parser.hpp.


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