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 >::ConcretePropertyVisitor< Visitor > Struct Template Referencefinal

Implementation of PropertyVisitor 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 >::ConcretePropertyVisitor< Visitor >:
donut::json::Parser< It >::PropertyVisitor

Public Member Functions

 ConcretePropertyVisitor (Visitor visitor)
 
void visitProperty (const SourceLocation &source, String &&key, Parser &parser) override
 Callback for each object property. More...
 

Public Attributes

Visitor visitor
 

Additional Inherited Members

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

Detailed Description

template<typename It>
template<typename Visitor>
struct donut::json::Parser< It >::ConcretePropertyVisitor< Visitor >

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

Template Parameters
Visitorfreestanding property visitor type to adapt.

Constructor & Destructor Documentation

◆ ConcretePropertyVisitor()

template<typename It >
template<typename Visitor >
donut::json::Parser< It >::ConcretePropertyVisitor< Visitor >::ConcretePropertyVisitor ( Visitor  visitor)
inline

Member Function Documentation

◆ visitProperty()

template<typename It >
template<typename Visitor >
void donut::json::Parser< It >::ConcretePropertyVisitor< Visitor >::visitProperty ( const SourceLocation source,
String &&  key,
Parser parser 
)
inlineoverridevirtual

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.

Implements donut::json::Parser< It >::PropertyVisitor.

Member Data Documentation

◆ visitor

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

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