userver: formats::json::parser::ArrayParser< Item, ItemParser, Array > Class Template Reference
Loading...
Searching...
No Matches
formats::json::parser::ArrayParser< Item, ItemParser, Array > Class Template Referencefinal

Detailed Description

template<typename Item, typename ItemParser, typename Array = std::vector<Item>>
class formats::json::parser::ArrayParser< Item, ItemParser, Array >

Definition at line 14 of file array_parser.hpp.

+ Inheritance diagram for formats::json::parser::ArrayParser< Item, ItemParser, Array >:
+ Collaboration diagram for formats::json::parser::ArrayParser< Item, ItemParser, Array >:

Public Member Functions

 ArrayParser (ItemParser &item_parser)
 
void Reset () override
 
- Public Member Functions inherited from formats::json::parser::TypedParser< T >
void Subscribe (Subscriber< T > &subscriber)
 
TypedParser< T > & GetParser ()
 
- Public Member Functions inherited from formats::json::parser::BaseParser
virtual void Key (std::string_view key)
 
virtual void EndObject ()
 
virtual void EndObject (size_t)
 
virtual void EndArray (size_t)
 
void SetState (ParserState &state)
 

Protected Member Functions

void StartArray () override
 
void EndArray () override
 
void Int64 (int64_t i) override
 
void Uint64 (uint64_t i) override
 
void Null () override
 
void Bool (bool b) override
 
void Double (double d) override
 
void String (std::string_view sw) override
 
void StartObject () override
 
std::string Expected () const override
 
void PushParser (std::string_view what)
 
void OnSend (Item &&item) override
 
std::string GetPathItem () const override
 
BaseParserParser ()
 
- Protected Member Functions inherited from formats::json::parser::TypedParser< T >
void SetResult (T &&value)
 
- Protected Member Functions inherited from formats::json::parser::BaseParser
void Throw (const std::string &found)
 

Additional Inherited Members

- Public Types inherited from formats::json::parser::TypedParser< T >
using ResultType = T
 
- Protected Attributes inherited from formats::json::parser::BaseParser
ParserStateparser_state_ {nullptr}
 

Constructor & Destructor Documentation

◆ ArrayParser()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
formats::json::parser::ArrayParser< Item, ItemParser, Array >::ArrayParser ( ItemParser & item_parser)
inlineexplicit

Definition at line 16 of file array_parser.hpp.

Member Function Documentation

◆ Bool()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::Bool ( bool b)
inlineoverrideprotectedvirtual

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

Definition at line 67 of file array_parser.hpp.

◆ Double()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::Double ( double d)
inlineoverrideprotectedvirtual

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

Definition at line 71 of file array_parser.hpp.

◆ EndArray()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::EndArray ( )
inlineoverrideprotectedvirtual

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

Definition at line 46 of file array_parser.hpp.

◆ Expected()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
std::string formats::json::parser::ArrayParser< Item, ItemParser, Array >::Expected ( ) const
inlineoverrideprotectedvirtual

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

Definition at line 84 of file array_parser.hpp.

◆ GetPathItem()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
std::string formats::json::parser::ArrayParser< Item, ItemParser, Array >::GetPathItem ( ) const
inlineoverrideprotectedvirtual

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

Definition at line 107 of file array_parser.hpp.

◆ Int64()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::Int64 ( int64_t i)
inlineoverrideprotectedvirtual

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

Definition at line 55 of file array_parser.hpp.

◆ Null()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::Null ( )
inlineoverrideprotectedvirtual

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

Definition at line 63 of file array_parser.hpp.

◆ OnSend()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::OnSend ( Item && item)
inlineoverrideprotectedvirtual

Implements formats::json::parser::Subscriber< Item >.

Definition at line 99 of file array_parser.hpp.

◆ Parser()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
BaseParser & formats::json::parser::ArrayParser< Item, ItemParser, Array >::Parser ( )
inlineprotected

Definition at line 111 of file array_parser.hpp.

◆ PushParser()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::PushParser ( std::string_view what)
inlineprotected

Definition at line 86 of file array_parser.hpp.

◆ Reset()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::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< T >.

Definition at line 20 of file array_parser.hpp.

◆ StartArray()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::StartArray ( )
inlineoverrideprotectedvirtual

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

Definition at line 38 of file array_parser.hpp.

◆ StartObject()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::StartObject ( )
inlineoverrideprotectedvirtual

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

Definition at line 79 of file array_parser.hpp.

◆ String()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::String ( std::string_view sw)
inlineoverrideprotectedvirtual

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

Definition at line 75 of file array_parser.hpp.

◆ Uint64()

template<typename Item , typename ItemParser , typename Array = std::vector<Item>>
void formats::json::parser::ArrayParser< Item, ItemParser, Array >::Uint64 ( uint64_t i)
inlineoverrideprotectedvirtual

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

Definition at line 59 of file array_parser.hpp.


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