Zserio C++ runtime library  1.2.0
Built for Zserio 2.16.0
zserio::BasicJsonDecoder< ALLOC >::DecoderResult Struct Reference

#include <JsonDecoder.h>

Collaboration diagram for zserio::BasicJsonDecoder< ALLOC >::DecoderResult:

Public Member Functions

 DecoderResult (size_t numRead, const ALLOC &allocator)
 
template<typename T >
 DecoderResult (size_t numRead, T &&decodedValue, const ALLOC &allocator)
 
template<typename T >
 DecoderResult (size_t numRead, T &&decodedValue, bool overflow, const ALLOC &allocator)
 

Public Attributes

size_t numReadChars
 
AnyHolder< ALLOC > value
 
bool integerOverflow
 

Detailed Description

template<typename ALLOC = std::allocator<uint8_t>>
struct zserio::BasicJsonDecoder< ALLOC >::DecoderResult

Decoder result value.

Definition at line 32 of file JsonDecoder.h.

Constructor & Destructor Documentation

◆ DecoderResult() [1/3]

template<typename ALLOC = std::allocator<uint8_t>>
zserio::BasicJsonDecoder< ALLOC >::DecoderResult::DecoderResult ( size_t  numRead,
const ALLOC &  allocator 
)
inline

Constructor used for decoder failure.

Parameters
numReadNumber of processed characters.
allocatorAllocator to use.

Definition at line 40 of file JsonDecoder.h.

◆ DecoderResult() [2/3]

template<typename ALLOC = std::allocator<uint8_t>>
template<typename T >
zserio::BasicJsonDecoder< ALLOC >::DecoderResult::DecoderResult ( size_t  numRead,
T &&  decodedValue,
const ALLOC &  allocator 
)
inline

Constructor for decoder success.

Parameters
numReadNumber of processed characters.
decodedValueValue decoded from JSON stream.
allocatorAllocator to use.

Definition at line 54 of file JsonDecoder.h.

◆ DecoderResult() [3/3]

template<typename ALLOC = std::allocator<uint8_t>>
template<typename T >
zserio::BasicJsonDecoder< ALLOC >::DecoderResult::DecoderResult ( size_t  numRead,
T &&  decodedValue,
bool  overflow,
const ALLOC &  allocator 
)
inline

Constructor used for integer decoder.

Parameters
numReadNumber of processed characters.
decodedValueValue decoded from JSON stream.
overflowTrue in case of integer overflow.
allocatorAllocator to use.

Definition at line 69 of file JsonDecoder.h.

Member Data Documentation

◆ integerOverflow

template<typename ALLOC = std::allocator<uint8_t>>
bool zserio::BasicJsonDecoder< ALLOC >::DecoderResult::integerOverflow

True if decoded value was bigger than UINT64_MAX or was not in interval <INT64_MIN, INT64_MAX>.

Definition at line 77 of file JsonDecoder.h.

◆ numReadChars

template<typename ALLOC = std::allocator<uint8_t>>
size_t zserio::BasicJsonDecoder< ALLOC >::DecoderResult::numReadChars

Number of processed characters.

Definition at line 75 of file JsonDecoder.h.

◆ value

template<typename ALLOC = std::allocator<uint8_t>>
AnyHolder<ALLOC> zserio::BasicJsonDecoder< ALLOC >::DecoderResult::value

Decoded value. Empty on failure.

Definition at line 76 of file JsonDecoder.h.


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