cesium-native 0.43.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::IJsonHandler

Public Types

using ValueType = std::vector<std::string>
 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 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 IJsonHandlerreadObjectStart () override
 Called when the JSON parser encounters the beginning 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 IJsonHandlerreadString (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.
 
- Public Member Functions inherited from CesiumJsonReader::JsonHandler
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.
 
- Public Member Functions inherited from CesiumJsonReader::IJsonHandler

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 reading arrays of string values. Attempting to read other values will cause a warning.

Definition at line 404 of file ArrayJsonHandler.h.

Member Typedef Documentation

◆ ValueType

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

The destination type.

Definition at line 408 of file ArrayJsonHandler.h.

Constructor & Destructor Documentation

◆ ArrayJsonHandler()

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

Definition at line 410 of file ArrayJsonHandler.h.

Member Function Documentation

◆ readArrayEnd()

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

◆ readArrayStart()

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

◆ readBool()

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

◆ readDouble()

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

◆ readInt32()

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

◆ readInt64()

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

◆ readNull()

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

◆ readObjectStart()

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

◆ readString()

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

◆ readUint32()

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

◆ readUint64()

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

◆ reportWarning()

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

◆ reset()

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


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