libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Member Functions | Protected Member Functions | List of all members
donut::json::Parser< It >::PropertyVisitor Class Referenceabstract

Polymorphic interface for visitation-based parsing of JSON object properties. More...

#include <donut/json.hpp>

Inheritance diagram for donut::json::Parser< It >::PropertyVisitor:
donut::json::Parser< It >::ConcretePropertyVisitor< Visitor > donut::json::Parser< It >::SkipPropertyVisitor

Public Member Functions

virtual void visitProperty (const SourceLocation &source, String &&key, Parser &parser)=0
 Callback for each object property. More...
 

Protected Member Functions

 ~PropertyVisitor ()=default
 

Detailed Description

template<typename It>
class donut::json::Parser< It >::PropertyVisitor

Polymorphic interface for visitation-based parsing of JSON object properties.

Constructor & Destructor Documentation

◆ ~PropertyVisitor()

template<typename It >
donut::json::Parser< It >::PropertyVisitor::~PropertyVisitor ( )
protecteddefault

Member Function Documentation

◆ visitProperty()

template<typename It >
virtual void donut::json::Parser< It >::PropertyVisitor::visitProperty ( const SourceLocation source,
String &&  key,
Parser parser 
)
pure virtual

Callback for each object property.

Parameters
sourcelocation of the beginning of the property's value.
keythe property's name string.
parserparser that should be used to parse the property's value.
Warning
Implementations must advance the parser to the end of the encountered value.
Implementations must not advance the parser past the end of the property's value.
Exceptions
json::Erroron invalid input.
anyexception thrown by the concrete implementation.

Implemented in donut::json::Parser< It >::SkipPropertyVisitor, and donut::json::Parser< It >::ConcretePropertyVisitor< Visitor >.


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