cesium-native 0.43.0
|
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>
Public Member Functions | |
virtual IJsonHandler * | readNull ()=0 |
Called when the JSON parser encounters a null . | |
virtual IJsonHandler * | readBool (bool b)=0 |
Called when the JSON parser encounters a boolean value. | |
virtual IJsonHandler * | readInt32 (int32_t i)=0 |
Called when the JSON parser encounters an int32 value. | |
virtual IJsonHandler * | readUint32 (uint32_t i)=0 |
Called when the JSON parser encounters a uint32 value. | |
virtual IJsonHandler * | readInt64 (int64_t i)=0 |
Called when the JSON parser encounters an int64 value. | |
virtual IJsonHandler * | readUint64 (uint64_t i)=0 |
Called when the JSON parser encounters a uint64 value. | |
virtual IJsonHandler * | readDouble (double d)=0 |
Called when the JSON parser encounters a double value. | |
virtual IJsonHandler * | readString (const std::string_view &str)=0 |
Called when the JSON parser encounters a string value. | |
virtual IJsonHandler * | readObjectStart ()=0 |
Called when the JSON parser encounters the beginning of an object. | |
virtual IJsonHandler * | readObjectKey (const std::string_view &str)=0 |
Called when the JSON parser encounters a key while reading an object. | |
virtual IJsonHandler * | readObjectEnd ()=0 |
Called when the JSON parser encounters the end of an object. | |
virtual IJsonHandler * | readArrayStart ()=0 |
Called when the JSON parser encounters the start of an array. | |
virtual IJsonHandler * | readArrayEnd ()=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. | |
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.
|
inlinevirtual |
Definition at line 20 of file IJsonHandler.h.
|
pure virtual |
Called when the JSON parser encounters the end of an array.
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters the start of an array.
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters a boolean value.
b | The boolean value. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::BoolJsonHandler, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters a double value.
d | The double value. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::DoubleJsonHandler, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::IntegerJsonHandler< T >, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters an int32 value.
i | The int32 value. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::DoubleJsonHandler, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::IntegerJsonHandler< T >, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters an int64 value.
i | The int64 value. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::DoubleJsonHandler, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::IntegerJsonHandler< T >, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters a null
.
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters the end of an object.
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.
|
pure virtual |
Called when the JSON parser encounters a key while reading an object.
str | The key. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::DictionaryJsonHandler< T, THandler >, CesiumJsonReader::DictionaryJsonHandler< CesiumUtility::JsonValue, CesiumJsonReader::JsonObjectJsonHandler >, CesiumJsonReader::ExtensionsJsonHandler, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters the beginning of an object.
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, CesiumJsonReader::JsonObjectJsonHandler, and CesiumJsonReader::ObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters a string value.
str | The string value. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::JsonHandler, CesiumJsonReader::JsonObjectJsonHandler, and CesiumJsonReader::StringJsonHandler.
|
pure virtual |
Called when the JSON parser encounters a uint32 value.
i | The uint32 value. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::DoubleJsonHandler, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::IntegerJsonHandler< T >, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Called when the JSON parser encounters a uint64 value.
i | The uint64 value. |
read...
call. This can be the same handler as the current one. Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::DoubleJsonHandler, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::IntegerJsonHandler< T >, CesiumJsonReader::JsonHandler, and CesiumJsonReader::JsonObjectJsonHandler.
|
pure virtual |
Report a warning while reading JSON.
warning | The warning to report. |
context | Context information to include with this warning to help debugging. |
Implemented in CesiumJsonReader::ArrayJsonHandler< T, THandler >, CesiumJsonReader::ArrayJsonHandler< double, DoubleJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >, CesiumJsonReader::ArrayJsonHandler< std::vector< T >, ArrayJsonHandler< T, THandler > >, CesiumJsonReader::ArrayJsonHandler< T, IntegerJsonHandler< T > >, CesiumJsonReader::IgnoreValueJsonHandler, CesiumJsonReader::IntegerJsonHandler< T >, CesiumJsonReader::JsonHandler, and CesiumJsonReader::ObjectJsonHandler.