libdonut
2.3.2
Application framework for cross-platform game development in C++20
|
Polymorphic interface for visitation-based parsing of JSON values. More...
#include <donut/json.hpp>
Public Member Functions | |
virtual void | visitNull (const SourceLocation &source, Null value) |
Callback for values of type Null. More... | |
virtual void | visitBoolean (const SourceLocation &source, Boolean value) |
Callback for values of type Boolean. More... | |
virtual void | visitString (const SourceLocation &source, String &&value) |
Callback for values of type String. More... | |
virtual void | visitNumber (const SourceLocation &source, Number value) |
Callback for values of type Number. More... | |
virtual void | visitObject (const SourceLocation &source, Parser &parser) |
Callback for objects. More... | |
virtual void | visitArray (const SourceLocation &source, Parser &parser) |
Callback for arrays. More... | |
Protected Member Functions | |
~ValueVisitor ()=default | |
Polymorphic interface for visitation-based parsing of JSON values.
|
protecteddefault |
|
inlinevirtual |
Callback for values of type Null.
source | location of the parsed value. |
value | parsed value. |
json::Error | on invalid input. |
any | exception thrown by the concrete implementation. |
Reimplemented in donut::json::Parser< It >::SkipValueVisitor, and donut::json::Parser< It >::ConcreteValueVisitor< Visitor >.
|
inlinevirtual |
Callback for values of type Boolean.
source | location of the parsed value. |
value | parsed value. |
json::Error | on invalid input. |
any | exception thrown by the concrete implementation. |
Reimplemented in donut::json::Parser< It >::SkipValueVisitor, and donut::json::Parser< It >::ConcreteValueVisitor< Visitor >.
|
inlinevirtual |
Callback for values of type String.
source | location of the parsed value. |
value | parsed value. |
json::Error | on invalid input. |
any | exception thrown by the concrete implementation. |
Reimplemented in donut::json::Parser< It >::SkipValueVisitor, and donut::json::Parser< It >::ConcreteValueVisitor< Visitor >.
|
inlinevirtual |
Callback for values of type Number.
source | location of the parsed value. |
value | parsed value. |
json::Error | on invalid input. |
any | exception thrown by the concrete implementation. |
Reimplemented in donut::json::Parser< It >::SkipValueVisitor, and donut::json::Parser< It >::ConcreteValueVisitor< Visitor >.
|
inlinevirtual |
Callback for objects.
source | location of the beginning of the encountered object. |
parser | parser that should be used to parse the object. |
json::Error | on invalid input. |
any | exception thrown by the concrete implementation. |
Reimplemented in donut::json::Parser< It >::SkipValueVisitor, and donut::json::Parser< It >::ConcreteValueVisitor< Visitor >.
|
inlinevirtual |
Callback for arrays.
source | location of the beginning of the encountered array. |
parser | parser that should be used to parse the array. |
json::Error | on invalid input. |
any | exception thrown by the concrete implementation. |
Reimplemented in donut::json::Parser< It >::SkipValueVisitor, and donut::json::Parser< It >::ConcreteValueVisitor< Visitor >.