GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor > Struct Template Referencefinal

Implementation of ValueVisitor for freestanding classes that implement all or parts of its interface without directly inheriting from it. More...

#include <GREM/core/formats/json.hpp>

Inheritance diagram for grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >:

Public Member Functions

 ConcreteValueVisitor (Visitor visitor)
void visitNull (const SourceLocation &source, Null value) override
 Callback for values of type Null.
void visitBoolean (const SourceLocation &source, Boolean value) override
 Callback for values of type Boolean.
void visitString (const SourceLocation &source, StringBase< Allocator > &&value) override
 Callback for values of type String.
void visitNumber (const SourceLocation &source, Number value) override
 Callback for values of type Number.
void visitObject (const SourceLocation &source, Parser &parser) override
 Callback for objects.
void visitArray (const SourceLocation &source, Parser &parser) override
 Callback for arrays.

Public Attributes

Visitor visitor

Additional Inherited Members

Protected Member Functions inherited from grem::json::Parser< It, Allocator >::ValueVisitor
 ~ValueVisitor ()=default

Detailed Description

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
struct grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >

Implementation of ValueVisitor for freestanding classes that implement all or parts of its interface without directly inheriting from it.

Template Parameters
Visitorfreestanding value visitor type to adapt.

Constructor & Destructor Documentation

◆ ConcreteValueVisitor()

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::ConcreteValueVisitor ( Visitor visitor)
inline

Member Function Documentation

◆ visitNull()

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
void grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::visitNull ( const SourceLocation & source,
Null value )
inlineoverridevirtual

Callback for values of type Null.

Parameters
sourcelocation of the parsed value.
valueparsed value.
Exceptions
json::Erroron invalid input.
anyexception thrown by the concrete implementation.

Reimplemented from grem::json::Parser< It, Allocator >::ValueVisitor.

◆ visitBoolean()

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
void grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::visitBoolean ( const SourceLocation & source,
Boolean value )
inlineoverridevirtual

Callback for values of type Boolean.

Parameters
sourcelocation of the parsed value.
valueparsed value.
Exceptions
json::Erroron invalid input.
anyexception thrown by the concrete implementation.

Reimplemented from grem::json::Parser< It, Allocator >::ValueVisitor.

◆ visitString()

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
void grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::visitString ( const SourceLocation & source,
StringBase< Allocator > && value )
inlineoverridevirtual

Callback for values of type String.

Parameters
sourcelocation of the parsed value.
valueparsed value.
Exceptions
json::Erroron invalid input.
anyexception thrown by the concrete implementation.

Reimplemented from grem::json::Parser< It, Allocator >::ValueVisitor.

◆ visitNumber()

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
void grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::visitNumber ( const SourceLocation & source,
Number value )
inlineoverridevirtual

Callback for values of type Number.

Parameters
sourcelocation of the parsed value.
valueparsed value.
Exceptions
json::Erroron invalid input.
anyexception thrown by the concrete implementation.

Reimplemented from grem::json::Parser< It, Allocator >::ValueVisitor.

◆ visitObject()

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
void grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::visitObject ( const SourceLocation & source,
Parser & parser )
inlineoverridevirtual

Callback for objects.

Parameters
sourcelocation of the beginning of the encountered object.
parserparser that should be used to parse the object.
Warning
Implementations must advance the parser to the end of the encountered object, past the last closing curly brace.
Implementations must not advance the parser past the end of the encountered object.
Exceptions
json::Erroron invalid input.
anyexception thrown by the concrete implementation.

Reimplemented from grem::json::Parser< It, Allocator >::ValueVisitor.

◆ visitArray()

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
void grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::visitArray ( const SourceLocation & source,
Parser & parser )
inlineoverridevirtual

Callback for arrays.

Parameters
sourcelocation of the beginning of the encountered array.
parserparser that should be used to parse the array.
Warning
Implementations must advance the parser to the end of the encountered array, past the last closing square bracket.
Implementations must not advance the parser past the end of the encountered array.
Exceptions
json::Erroron invalid input.
anyexception thrown by the concrete implementation.

Reimplemented from grem::json::Parser< It, Allocator >::ValueVisitor.

Member Data Documentation

◆ visitor

template<typename It, template< typename > typename Allocator = std::allocator>
template<typename Visitor>
Visitor grem::json::Parser< It, Allocator >::ConcreteValueVisitor< Visitor >::visitor

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