GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::json::Parser< It, Allocator >::PropertyVisitor Class Referenceabstract

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

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

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

Public Member Functions

virtual void visitProperty (const SourceLocation &source, StringBase< Allocator > &&key, Parser &parser)=0
 Callback for each object property.

Protected Member Functions

 ~PropertyVisitor ()=default

Detailed Description

template<typename It, template< typename > typename Allocator = std::allocator>
class grem::json::Parser< It, Allocator >::PropertyVisitor

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

Constructor & Destructor Documentation

◆ ~PropertyVisitor()

template<typename It, template< typename > typename Allocator = std::allocator>
grem::json::Parser< It, Allocator >::PropertyVisitor::~PropertyVisitor ( )
protecteddefault

Member Function Documentation

◆ visitProperty()

template<typename It, template< typename > typename Allocator = std::allocator>
virtual void grem::json::Parser< It, Allocator >::PropertyVisitor::visitProperty ( const SourceLocation & source,
StringBase< Allocator > && 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 grem::json::Parser< It, Allocator >::ConcretePropertyVisitor< Visitor >, and grem::json::Parser< It, Allocator >::SkipPropertyVisitor.


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