cesium-native 0.64.0
Loading...
Searching...
No Matches
CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler > Class Reference

Special case of ArrayJsonHandler for reading arrays of string values. Attempting to read other values will cause a warning. More...

#include <CesiumJsonReader/ArrayJsonHandler.h>

Inheritance diagram for CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >:
CesiumJsonReader::JsonHandler CesiumJsonReader::JsonHandler CesiumJsonReader::IJsonHandler CesiumJsonReader::IJsonHandler

Public Types

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

Public Member Functions

void reset (IJsonHandler *pParent, std::vector< std::string > *pArray)
 Resets the parent and destination array of this ArrayJsonHandler.
 
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 * readObjectStart () override
 Called when the JSON parser encounters the beginning of 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.
 
virtual IJsonHandler * readString (const std::string_view &str) override
 Called when the JSON parser encounters a string value.
 
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< std::string > *pArray)
 Resets the parent and destination array of this ArrayJsonHandler.
 
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 * readObjectStart () override
 Called when the JSON parser encounters the beginning of an object.
 
virtual IJsonHandler * readObjectKey (const std::string_view &str) noexcept override
 Called when the JSON parser encounters a key while reading an object.
 
virtual IJsonHandler * readObjectEnd () noexcept override
 Called when the JSON parser encounters the end of 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.
 
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.
 
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.
 

Detailed Description

Special case of ArrayJsonHandler for reading arrays of string values. Attempting to read other values will cause a warning.

Definition at line 574 of file ArrayJsonHandler.h.

Member Typedef Documentation

◆ ValueType [1/2]

using CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::ValueType

The destination type.

Definition at line 27 of file ArrayJsonHandler.h.

◆ ValueType [2/2]

using CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::ValueType = std::vector<std::string>

The destination type.

Definition at line 578 of file ArrayJsonHandler.h.

Constructor & Destructor Documentation

◆ ArrayJsonHandler() [1/2]

CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::ArrayJsonHandler ( )
inlinenoexcept

Definition at line 580 of file ArrayJsonHandler.h.

◆ ArrayJsonHandler() [2/2]

CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::readArrayEnd ( )
inlineoverridevirtual

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]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::readArrayEnd ( )
inlineoverridevirtual

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 634 of file ArrayJsonHandler.h.

◆ readArrayStart() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 624 of file ArrayJsonHandler.h.

◆ readBool() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 596 of file ArrayJsonHandler.h.

◆ readDouble() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 616 of file ArrayJsonHandler.h.

◆ readInt32() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 600 of file ArrayJsonHandler.h.

◆ readInt64() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 608 of file ArrayJsonHandler.h.

◆ readNull() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::readNull ( )
inlineoverridevirtual

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]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::readNull ( )
inlineoverridevirtual

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 592 of file ArrayJsonHandler.h.

◆ readObjectEnd()

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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.

◆ readObjectKey()

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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.

◆ readObjectStart() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 620 of file ArrayJsonHandler.h.

◆ readString() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 636 of file ArrayJsonHandler.h.

◆ readUint32() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 604 of file ArrayJsonHandler.h.

◆ readUint64() [1/2]

virtual IJsonHandler * CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 612 of file ArrayJsonHandler.h.

◆ reportWarning() [1/2]

virtual void CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::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< std::string, StringJsonHandler >::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 646 of file ArrayJsonHandler.h.

◆ reset() [1/2]

void CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::reset ( IJsonHandler * pParent,
std::vector< std::string > * pArray )
inline

Resets the parent and destination array of this ArrayJsonHandler.

Definition at line 46 of file ArrayJsonHandler.h.

◆ reset() [2/2]

void CesiumJsonReader::ArrayJsonHandler< std::string, StringJsonHandler >::reset ( IJsonHandler * pParent,
std::vector< std::string > * pArray )
inline

Resets the parent and destination array of this ArrayJsonHandler.

Definition at line 586 of file ArrayJsonHandler.h.


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