libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Member Functions | Public Attributes | List of all members
donut::json::Parser< It >::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 <donut/json.hpp>

Inheritance diagram for donut::json::Parser< It >::ConcreteValueVisitor< Visitor >:
donut::json::Parser< It >::ValueVisitor

Public Member Functions

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

Public Attributes

Visitor visitor
 

Additional Inherited Members

- Protected Member Functions inherited from donut::json::Parser< It >::ValueVisitor
 ~ValueVisitor ()=default
 

Detailed Description

template<typename It>
template<typename Visitor>
struct donut::json::Parser< It >::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 Visitor >
donut::json::Parser< It >::ConcreteValueVisitor< Visitor >::ConcreteValueVisitor ( Visitor  visitor)
inline

Member Function Documentation

◆ visitNull()

template<typename It >
template<typename Visitor >
void donut::json::Parser< It >::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 donut::json::Parser< It >::ValueVisitor.

◆ visitBoolean()

template<typename It >
template<typename Visitor >
void donut::json::Parser< It >::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 donut::json::Parser< It >::ValueVisitor.

◆ visitString()

template<typename It >
template<typename Visitor >
void donut::json::Parser< It >::ConcreteValueVisitor< Visitor >::visitString ( const SourceLocation source,
String &&  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 donut::json::Parser< It >::ValueVisitor.

◆ visitNumber()

template<typename It >
template<typename Visitor >
void donut::json::Parser< It >::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 donut::json::Parser< It >::ValueVisitor.

◆ visitObject()

template<typename It >
template<typename Visitor >
void donut::json::Parser< It >::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 donut::json::Parser< It >::ValueVisitor.

◆ visitArray()

template<typename It >
template<typename Visitor >
void donut::json::Parser< It >::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 donut::json::Parser< It >::ValueVisitor.

Member Data Documentation

◆ visitor

template<typename It >
template<typename Visitor >
Visitor donut::json::Parser< It >::ConcreteValueVisitor< Visitor >::visitor

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