ADTF
Loading...
Searching...
No Matches
ddl::codec::ValueGetter< DecoderType, ValueType > Struct Template Reference

#include <value_access.h>

Static Public Member Functions

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

Detailed Description

template<typename DecoderType, typename ValueType>
struct ddl::codec::ValueGetter< DecoderType, ValueType >

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 template.

Member Function Documentation

◆ getValue()

template<typename DecoderType, typename ValueType>
static void ddl::codec::ValueGetter< DecoderType, ValueType >::getValue ( const DecoderType & decoder,
const CodecIndex & codec_index,
ValueType & value )
inlinestatic

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

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

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