cesium-native 0.43.0
|
IJsonHandler for handling JSON objects. More...
#include <CesiumJsonReader/ObjectJsonHandler.h>
Public Member Functions | |
virtual IJsonHandler * | readObjectStart () override |
Called when the JSON parser encounters the beginning of an object. | |
virtual IJsonHandler * | readObjectEnd () override |
Called when the JSON parser encounters the end of an object. | |
Public Member Functions inherited from CesiumJsonReader::JsonHandler | |
virtual IJsonHandler * | readNull () override |
Called when the JSON parser encounters a null . | |
virtual IJsonHandler * | readBool (bool b) override |
Called when the JSON parser encounters a boolean value. | |
virtual IJsonHandler * | readInt32 (int32_t i) override |
Called when the JSON parser encounters an int32 value. | |
virtual IJsonHandler * | readUint32 (uint32_t i) override |
Called when the JSON parser encounters a uint32 value. | |
virtual IJsonHandler * | readInt64 (int64_t i) override |
Called when the JSON parser encounters an int64 value. | |
virtual IJsonHandler * | readUint64 (uint64_t i) override |
Called when the JSON parser encounters a uint64 value. | |
virtual IJsonHandler * | readDouble (double d) override |
Called when the JSON parser encounters a double value. | |
virtual IJsonHandler * | readString (const std::string_view &str) override |
Called when the JSON parser encounters a string value. | |
virtual IJsonHandler * | readObjectKey (const std::string_view &str) override |
Called when the JSON parser encounters a key while reading an object. | |
virtual IJsonHandler * | readArrayStart () override |
Called when the JSON parser encounters the start of an array. | |
virtual IJsonHandler * | readArrayEnd () override |
Called when the JSON parser encounters the end of an array. | |
Public Member Functions inherited from CesiumJsonReader::IJsonHandler |
Protected Member Functions | |
virtual IJsonHandler * | StartSubObject () noexcept |
Called when readObjectStart is called when the depth of the ObjectJsonHandler is greater than 0. | |
virtual IJsonHandler * | EndSubObject () noexcept |
Called when readObjectEnd is called when the depth of the ObjectJsonHandler is greater than 0. | |
template<typename TAccessor , typename TProperty > | |
IJsonHandler * | property (const char *currentKey, TAccessor &accessor, TProperty &value) |
Called from IJsonHandler::readObjectKey to read a property into an object. | |
const char * | getCurrentKey () const noexcept |
Obtains the most recent key handled by this JsonHandler. | |
virtual void | reportWarning (const std::string &warning, std::vector< std::string > &&context=std::vector< std::string >()) override |
Report a warning while reading JSON. | |
void | setCurrentKey (const char *key) noexcept |
Sets the most recent key handled by this JsonHandler. | |
Protected Member Functions inherited from CesiumJsonReader::JsonHandler | |
void | reset (IJsonHandler *pParent) |
Resets the parent IJsonHandler of this handler. | |
IJsonHandler * | parent () |
Obtains the parent IJsonHandler of this handler. | |
IJsonHandler * | ignoreAndReturnToParent () |
Ignore a single value and then return to the parent handler. | |
IJsonHandler * | ignoreAndContinue () |
Ignore a single value and the continue processing more tokens with this handler. | |
IJsonHandler for handling JSON objects.
Definition at line 14 of file ObjectJsonHandler.h.
|
inlinenoexcept |
Definition at line 16 of file ObjectJsonHandler.h.
|
inlineprotected |
Called from IJsonHandler::readObjectKey to read a property into an object.
currentKey | The key that's currently being read. |
accessor | An IJsonHandler that can read the type of this property. |
value | A reference to the location to store the read value. |
accessor
IJsonHandler that will read the next token into value
. Definition at line 48 of file ObjectJsonHandler.h.
|
overridevirtual |
Called when the JSON parser encounters the end of an object.
read...
call. This can be the same handler as the current one. Reimplemented from CesiumJsonReader::JsonHandler.
|
overridevirtual |
Called when the JSON parser encounters the beginning of an object.
read...
call. This can be the same handler as the current one. Reimplemented from CesiumJsonReader::JsonHandler.
|
overrideprotectedvirtual |
Report a warning while reading JSON.
warning | The warning to report. |
context | Context information to include with this warning to help debugging. |
Reimplemented from CesiumJsonReader::JsonHandler.