ADTF
ValueGetterSelect< DecoderType, ValueType, is_supported_leaf_type >

Value getter to retrieve the current value of the given element as a ValueType if supported. More...

Static Public Member Functions

static ValueType getValue (const DecoderType &decoder, const CodecIndex &codec_index)
 Returns the current value of the given element as a ValueType if supported. More...
 

Detailed Description

template<typename DecoderType, typename ValueType, bool is_supported_leaf_type = detail::SupportedLeafValueTypeExplicit<ValueType>::value>
struct ddl::codec::ValueGetterSelect< DecoderType, ValueType, is_supported_leaf_type >

Value getter to retrieve the current value of the given element as a ValueType if supported.

Template Parameters
DecoderTypeThe type of the decoder.
ValueTypeThe value type supported (by default bool, all int types, float, double and std::string are supported).
Remarks
If you want to support your own data type, then create a specialization of this ValueGetter.

Definition at line 160 of file value_access.h.

Member Function Documentation

◆ getValue()

static ValueType getValue ( const DecoderType &  decoder,
const CodecIndex codec_index 
)
inlinestatic

Returns the current value of the given element as a ValueType if supported.

Parameters
[in]codec_indexThe codec index of the element.
[in]decoderThe decoder to retrieve the value from.
Returns
ValueType Returns the current value as ValueType if supported.
Exceptions
throwsstd::runtime_error if not found by decoder.

Definition at line 168 of file value_access.h.

References ValueGetter< DecoderType, ValueType >::getValue().

Referenced by StaticDecoder::getElementValue().