cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumJsonReader::IJsonHandler Class Referenceabstract

Base interface for all JSON handlers. Types that need to be deserialized from JSON should implement IJsonHandler or a class that derives from it. As the JSON is parsed, the corresponding read... method to the token that was parsed will be called. These methods can return themselves or a different handler to handle the value. More...

#include <CesiumJsonReader/IJsonHandler.h>

Inheritance diagram for CesiumJsonReader::IJsonHandler:
CesiumJsonReader::IgnoreValueJsonHandler CesiumJsonReader::JsonHandler CesiumJsonReader::ArrayJsonHandler< T, THandler > CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > > CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler > CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler > CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > > CesiumJsonReader::BoolJsonHandler CesiumJsonReader::DoubleJsonHandler CesiumJsonReader::IntegerJsonHandler< T > CesiumJsonReader::JsonObjectJsonHandler CesiumJsonReader::ObjectJsonHandler CesiumJsonReader::StringJsonHandler

Public Member Functions

virtual IJsonHandlerreadNull ()=0
 Called when the JSON parser encounters a null.
 
virtual IJsonHandlerreadBool (bool b)=0
 Called when the JSON parser encounters a boolean value.
 
virtual IJsonHandlerreadInt32 (int32_t i)=0
 Called when the JSON parser encounters an int32 value.
 
virtual IJsonHandlerreadUint32 (uint32_t i)=0
 Called when the JSON parser encounters a uint32 value.
 
virtual IJsonHandlerreadInt64 (int64_t i)=0
 Called when the JSON parser encounters an int64 value.
 
virtual IJsonHandlerreadUint64 (uint64_t i)=0
 Called when the JSON parser encounters a uint64 value.
 
virtual IJsonHandlerreadDouble (double d)=0
 Called when the JSON parser encounters a double value.
 
virtual IJsonHandlerreadString (const std::string_view &str)=0
 Called when the JSON parser encounters a string value.
 
virtual IJsonHandlerreadObjectStart ()=0
 Called when the JSON parser encounters the beginning of an object.
 
virtual IJsonHandlerreadObjectKey (const std::string_view &str)=0
 Called when the JSON parser encounters a key while reading an object.
 
virtual IJsonHandlerreadObjectEnd ()=0
 Called when the JSON parser encounters the end of an object.
 
virtual IJsonHandlerreadArrayStart ()=0
 Called when the JSON parser encounters the start of an array.
 
virtual IJsonHandlerreadArrayEnd ()=0
 Called when the JSON parser encounters the end of an array.
 
virtual void reportWarning (const std::string &warning, std::vector< std::string > &&context=std::vector< std::string >())=0
 Report a warning while reading JSON.
 

Detailed Description

Base interface for all JSON handlers. Types that need to be deserialized from JSON should implement IJsonHandler or a class that derives from it. As the JSON is parsed, the corresponding read... method to the token that was parsed will be called. These methods can return themselves or a different handler to handle the value.

Definition at line 18 of file IJsonHandler.h.

Constructor & Destructor Documentation

◆ ~IJsonHandler()

virtual CesiumJsonReader::IJsonHandler::~IJsonHandler ( )
inlinevirtual

Definition at line 20 of file IJsonHandler.h.

Member Function Documentation

◆ readArrayEnd()

◆ readArrayStart()

◆ readBool()

◆ readDouble()

◆ readInt32()

◆ readInt64()

◆ readNull()

◆ readObjectEnd()

virtual IJsonHandler * CesiumJsonReader::IJsonHandler::readObjectEnd ( )
pure virtual

Called when the JSON parser encounters the end of an object.

Returns
A IJsonHandler that will handle the next read... call. This can be the same handler as the current one.

Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, CesiumJsonReader::JsonObjectJsonHandler, and CesiumJsonReader::ObjectJsonHandler.

◆ readObjectKey()

virtual IJsonHandler * CesiumJsonReader::IJsonHandler::readObjectKey ( const std::string_view & str)
pure virtual

◆ readObjectStart()

◆ readString()

◆ readUint32()

◆ readUint64()

◆ reportWarning()

virtual void CesiumJsonReader::IJsonHandler::reportWarning ( const std::string & warning,
std::vector< std::string > && context = std::vector< std::string >() )
pure virtual

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