cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumJsonReader::ExtensibleObjectJsonHandler Class Reference

An IJsonHandler for reading ExtensibleObject types. More...

#include <CesiumJsonReader/ExtensibleObjectJsonHandler.h>

Inheritance diagram for CesiumJsonReader::ExtensibleObjectJsonHandler:
CesiumJsonReader::ObjectJsonHandler CesiumJsonReader::JsonHandler CesiumJsonReader::IJsonHandler CesiumJsonReader::SharedAssetJsonHandler

Public Member Functions

 ExtensibleObjectJsonHandler (const JsonReaderOptions &context) noexcept
 Creates an ExtensibleObjectJsonHandler with the specified options.
 
- Public Member Functions inherited from CesiumJsonReader::ObjectJsonHandler
virtual IJsonHandlerreadObjectStart () override
 Called when the JSON parser encounters the beginning of an object.
 
virtual IJsonHandlerreadObjectEnd () override
 Called when the JSON parser encounters the end of an object.
 
- Public Member Functions inherited from CesiumJsonReader::JsonHandler
virtual IJsonHandlerreadNull () override
 Called when the JSON parser encounters a null.
 
virtual IJsonHandlerreadBool (bool b) override
 Called when the JSON parser encounters a boolean value.
 
virtual IJsonHandlerreadInt32 (int32_t i) override
 Called when the JSON parser encounters an int32 value.
 
virtual IJsonHandlerreadUint32 (uint32_t i) override
 Called when the JSON parser encounters a uint32 value.
 
virtual IJsonHandlerreadInt64 (int64_t i) override
 Called when the JSON parser encounters an int64 value.
 
virtual IJsonHandlerreadUint64 (uint64_t i) override
 Called when the JSON parser encounters a uint64 value.
 
virtual IJsonHandlerreadDouble (double d) override
 Called when the JSON parser encounters a double value.
 
virtual IJsonHandlerreadString (const std::string_view &str) override
 Called when the JSON parser encounters a string value.
 
virtual IJsonHandlerreadObjectKey (const std::string_view &str) override
 Called when the JSON parser encounters a key while reading an object.
 
virtual IJsonHandlerreadArrayStart () override
 Called when the JSON parser encounters the start of an array.
 
virtual IJsonHandlerreadArrayEnd () override
 Called when the JSON parser encounters the end of an array.
 
- Public Member Functions inherited from CesiumJsonReader::IJsonHandler

Protected Member Functions

void reset (IJsonHandler *pParent, CesiumUtility::ExtensibleObject *pObject)
 Resets the current parent of this handler, and the current object being handled.
 
IJsonHandlerreadObjectKeyExtensibleObject (const std::string &objectType, const std::string_view &str, CesiumUtility::ExtensibleObject &o)
 Reads a property of an ExtensibleObject from the JSON.
 
- Protected Member Functions inherited from CesiumJsonReader::ObjectJsonHandler
virtual IJsonHandlerStartSubObject () noexcept
 Called when readObjectStart is called when the depth of the ObjectJsonHandler is greater than 0.
 
virtual IJsonHandlerEndSubObject () noexcept
 Called when readObjectEnd is called when the depth of the ObjectJsonHandler is greater than 0.
 
template<typename TAccessor , typename TProperty >
IJsonHandlerproperty (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.
 
IJsonHandlerparent ()
 Obtains the parent IJsonHandler of this handler.
 
IJsonHandlerignoreAndReturnToParent ()
 Ignore a single value and then return to the parent handler.
 
IJsonHandlerignoreAndContinue ()
 Ignore a single value and the continue processing more tokens with this handler.
 

Detailed Description

An IJsonHandler for reading ExtensibleObject types.

Definition at line 18 of file ExtensibleObjectJsonHandler.h.

Constructor & Destructor Documentation

◆ ExtensibleObjectJsonHandler()

CesiumJsonReader::ExtensibleObjectJsonHandler::ExtensibleObjectJsonHandler ( const JsonReaderOptions & context)
explicitnoexcept

Creates an ExtensibleObjectJsonHandler with the specified options.

Parameters
contextOptions to configure how the JSON is parsed.

Member Function Documentation

◆ readObjectKeyExtensibleObject()

IJsonHandler * CesiumJsonReader::ExtensibleObjectJsonHandler::readObjectKeyExtensibleObject ( const std::string & objectType,
const std::string_view & str,
CesiumUtility::ExtensibleObject & o )
protected

Reads a property of an ExtensibleObject from the JSON.

Parameters
objectTypeThe name of the ExtensibleObject's type.
strThe object key being read.
oThe ExtensibleObject we're currently reading into.

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