Dev Essential  1.6.3
Loading...
Searching...
No Matches
ddl::codec::detail::TargetValueConverter< ElementValueType, TargetValueType, conversion_allowed > Struct Template Reference

Converter to convert a value of ElementValueType to a value of TargetValueType. More...

#include <leaf_value_access.h>

Static Public Member Functions

static TargetValueType convert (const ElementValueType &element_value)
 Converts a element_value to as value of type TargetValueType.
 

Detailed Description

template<typename ElementValueType, typename TargetValueType, bool conversion_allowed = SupportTargetTypeConversion<ElementValueType, TargetValueType>::value>
struct ddl::codec::detail::TargetValueConverter< ElementValueType, TargetValueType, conversion_allowed >

Converter to convert a value of ElementValueType to a value of TargetValueType.

Template Parameters
ElementValueTypeThe source value type to convert from
TargetValueTypeThe target value type to convert to
conversion_allowedevaluates to a bool value if conversion is possible

Member Function Documentation

◆ convert()

template<typename ElementValueType, typename TargetValueType, bool conversion_allowed = SupportTargetTypeConversion<ElementValueType, TargetValueType>::value>
static TargetValueType ddl::codec::detail::TargetValueConverter< ElementValueType, TargetValueType, conversion_allowed >::convert ( const ElementValueType & element_value)
inlinestatic

Converts a element_value to as value of type TargetValueType.

Parameters
element_valueThe value to convert from
Returns
TargetValueType The result value to convert to

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