Dev Essential  1.6.3
Loading...
Searching...
No Matches
ddl::codec::LeafValueSetter< ValueType > Struct Template Reference

#include <leaf_value_access.h>

Static Public Member Functions

static void setValue (void *data, const size_t data_size, const LeafLayout &leaf_layout, const ValueType &value)
 

Detailed Description

template<typename ValueType>
struct ddl::codec::LeafValueSetter< ValueType >

Value setter to set the current value of the given element from a type ValueType if supported

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

Member Function Documentation

◆ setValue()

template<typename ValueType>
static void ddl::codec::LeafValueSetter< ValueType >::setValue ( void * data,
const size_t data_size,
const LeafLayout & leaf_layout,
const ValueType & value )
inlinestatic

Sets the current value if the given element as a ValueType if supported.

Parameters
leaf_layoutThe small leaf layout of the element to get.
dataThe data area to set the value to
data_sizeThe data area size in bytes
[in]valueThe value to set as ValueType, if supported.
Exceptions
std::runtime_errorif there is no valid conversion or the given layout is invalid

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