cesium-native 0.63.0
Loading...
Searching...
No Matches
CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler > Class Reference

Special case of ArrayJsonHandler for handling arrays of arbitrary JSON values. More...

#include <CesiumJsonReader/ArrayJsonHandler.h>

Inheritance diagram for CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >:
CesiumJsonReader::JsonHandler CesiumJsonReader::JsonHandler CesiumJsonReader::IJsonHandler CesiumJsonReader::IJsonHandler

Public Types

using ValueType = std::vector<CesiumUtility::JsonValue>
 The destination type.
 
using ValueType
 The destination type.
 

Public Member Functions

void reset (IJsonHandler *pParent, std::vector< CesiumUtility::JsonValue > *pArray)
 Resets the parent and destination array of this ArrayJsonHandler.
 
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 IJsonHandlerreadObjectStart () override
 Called when the JSON parser encounters the beginning of an object.
 
virtual IJsonHandlerreadObjectKey (const std::string_view &str) override
 Called when the JSON parser encounters a key while reading an object.
 
virtual IJsonHandlerreadObjectEnd () override
 Called when the JSON parser encounters the end of 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.
 
virtual void reportWarning (const std::string &warning, std::vector< std::string > &&context=std::vector< std::string >()) override
 Report a warning while reading JSON.
 
 ArrayJsonHandler (Ts &&... args) noexcept
 Creates a new ArrayJsonHandler.
 
void reset (IJsonHandler *pParent, std::vector< CesiumUtility::JsonValue > *pArray)
 Resets the parent and destination array of this ArrayJsonHandler.
 
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 IJsonHandlerreadObjectStart () override
 Called when the JSON parser encounters the beginning of an object.
 
virtual IJsonHandlerreadObjectKey (const std::string_view &str) noexcept override
 Called when the JSON parser encounters a key while reading an object.
 
virtual IJsonHandlerreadObjectEnd () noexcept override
 Called when the JSON parser encounters the end of 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.
 
virtual void reportWarning (const std::string &warning, std::vector< std::string > &&context=std::vector< std::string >()) override
 Report a warning while reading JSON.
 

Additional Inherited Members

- 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

Special case of ArrayJsonHandler for handling arrays of arbitrary JSON values.

Definition at line 154 of file ArrayJsonHandler.h.

Member Typedef Documentation

◆ ValueType [1/2]

The destination type.

Definition at line 27 of file ArrayJsonHandler.h.

◆ ValueType [2/2]

The destination type.

Definition at line 159 of file ArrayJsonHandler.h.

Constructor & Destructor Documentation

◆ ArrayJsonHandler() [1/2]

Definition at line 161 of file ArrayJsonHandler.h.

◆ ArrayJsonHandler() [2/2]

CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::ArrayJsonHandler ( Ts &&... args)
inlinenoexcept

Creates a new ArrayJsonHandler.

Parameters
argsThe arguments that will be passed to the constructor of THandler when it's instantiated.

Definition at line 36 of file ArrayJsonHandler.h.

Member Function Documentation

◆ readArrayEnd() [1/2]

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

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 113 of file ArrayJsonHandler.h.

◆ readArrayEnd() [2/2]

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

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 287 of file ArrayJsonHandler.h.

◆ readArrayStart() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readArrayStart ( )
inlineoverridevirtual

Called when the JSON parser encounters the start of an array.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 103 of file ArrayJsonHandler.h.

◆ readArrayStart() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readArrayStart ( )
inlineoverridevirtual

Called when the JSON parser encounters the start of an array.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 273 of file ArrayJsonHandler.h.

◆ readBool() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readBool ( bool b)
inlineoverridevirtual

Called when the JSON parser encounters a boolean value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 57 of file ArrayJsonHandler.h.

◆ readBool() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readBool ( bool b)
inlineoverridevirtual

Called when the JSON parser encounters a boolean value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 184 of file ArrayJsonHandler.h.

◆ readDouble() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readDouble ( double d)
inlineoverridevirtual

Called when the JSON parser encounters a double value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 77 of file ArrayJsonHandler.h.

◆ readDouble() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readDouble ( double d)
inlineoverridevirtual

Called when the JSON parser encounters a double value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 234 of file ArrayJsonHandler.h.

◆ readInt32() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readInt32 ( int32_t i)
inlineoverridevirtual

Called when the JSON parser encounters an int32 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 61 of file ArrayJsonHandler.h.

◆ readInt32() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readInt32 ( int32_t i)
inlineoverridevirtual

Called when the JSON parser encounters an int32 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 194 of file ArrayJsonHandler.h.

◆ readInt64() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readInt64 ( int64_t i)
inlineoverridevirtual

Called when the JSON parser encounters an int64 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 69 of file ArrayJsonHandler.h.

◆ readInt64() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readInt64 ( int64_t i)
inlineoverridevirtual

Called when the JSON parser encounters an int64 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 214 of file ArrayJsonHandler.h.

◆ readNull() [1/2]

Called when the JSON parser encounters a null.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 53 of file ArrayJsonHandler.h.

◆ readNull() [2/2]

Called when the JSON parser encounters a null.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 174 of file ArrayJsonHandler.h.

◆ readObjectEnd() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readObjectEnd ( )
inlineoverridevirtualnoexcept

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.

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 101 of file ArrayJsonHandler.h.

◆ readObjectEnd() [2/2]

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.

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 269 of file ArrayJsonHandler.h.

◆ readObjectKey() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readObjectKey ( const std::string_view & str)
inlineoverridevirtualnoexcept

Called when the JSON parser encounters a key while reading an object.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 96 of file ArrayJsonHandler.h.

◆ readObjectKey() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readObjectKey ( const std::string_view & str)
inlineoverridevirtual

Called when the JSON parser encounters a key while reading an object.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 265 of file ArrayJsonHandler.h.

◆ readObjectStart() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readObjectStart ( )
inlineoverridevirtual

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

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 85 of file ArrayJsonHandler.h.

◆ readObjectStart() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readObjectStart ( )
inlineoverridevirtual

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

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 254 of file ArrayJsonHandler.h.

◆ readString() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readString ( const std::string_view & str)
inlineoverridevirtual

Called when the JSON parser encounters a string value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 81 of file ArrayJsonHandler.h.

◆ readString() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readString ( const std::string_view & str)
inlineoverridevirtual

Called when the JSON parser encounters a string value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 244 of file ArrayJsonHandler.h.

◆ readUint32() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readUint32 ( uint32_t i)
inlineoverridevirtual

Called when the JSON parser encounters a uint32 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 65 of file ArrayJsonHandler.h.

◆ readUint32() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readUint32 ( uint32_t i)
inlineoverridevirtual

Called when the JSON parser encounters a uint32 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 204 of file ArrayJsonHandler.h.

◆ readUint64() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readUint64 ( uint64_t i)
inlineoverridevirtual

Called when the JSON parser encounters a uint64 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 73 of file ArrayJsonHandler.h.

◆ readUint64() [2/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::readUint64 ( uint64_t i)
inlineoverridevirtual

Called when the JSON parser encounters a uint64 value.

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

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 224 of file ArrayJsonHandler.h.

◆ reportWarning() [1/2]

virtual void CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::reportWarning ( const std::string & warning,
std::vector< std::string > && context = std::vector<std::string>() )
inlineoverridevirtual

Report a warning while reading JSON.

Parameters
warningThe warning to report.
contextContext information to include with this warning to help debugging.

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 115 of file ArrayJsonHandler.h.

◆ reportWarning() [2/2]

virtual void CesiumJsonReader::ArrayJsonHandler< CesiumUtility::JsonValue, JsonObjectJsonHandler >::reportWarning ( const std::string & warning,
std::vector< std::string > && context = std::vector< std::string >() )
inlineoverridevirtual

Report a warning while reading JSON.

Parameters
warningThe warning to report.
contextContext information to include with this warning to help debugging.

Reimplemented from CesiumJsonReader::JsonHandler.

Definition at line 289 of file ArrayJsonHandler.h.

◆ reset() [1/2]

Resets the parent and destination array of this ArrayJsonHandler.

Definition at line 46 of file ArrayJsonHandler.h.

◆ reset() [2/2]

Resets the parent and destination array of this ArrayJsonHandler.

Definition at line 168 of file ArrayJsonHandler.h.


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