Dev Essential
Loading...
Searching...
No Matches
ddl::mapping::PlainSourceValue Class Referenceabstract

Value getter to retrieve a value with plain type content. More...

#include <mapper_interfaces.h>

Inherits ddl::mapping::SourceValue.

Public Member Functions

virtual std::optional< ValueVariantgetValue () const =0
 Get the value as arithmetic type.
 
template<typename T>
void getValueRef (T &value_reference) const
 Get the value.
 
template<typename T>
void getValueOrDefaultRef (T &value_reference, T default_value) const
 Get the value or the default value if not set.
 
template<typename T>
getValueOrDefault (T default_value) const
 Get the value or the default value if not set.
 
template<typename T>
getValue () const
 Get the value.
 
- Public Member Functions inherited from ddl::mapping::SourceValue
virtual ~SourceValue ()
 DTOR.
 

Detailed Description

Value getter to retrieve a value with plain type content.

Member Function Documentation

◆ getValue() [1/2]

template<typename T>
T ddl::mapping::PlainSourceValue::getValue ( ) const
inline

Get the value.

Template Parameters
TThe type to convert the value to
Returns
T The value got

◆ getValue() [2/2]

virtual std::optional< ValueVariant > ddl::mapping::PlainSourceValue::getValue ( ) const
pure virtual

Get the value as arithmetic type.

Parameters
value_callbackcallback to retrieve the value

◆ getValueOrDefault()

template<typename T>
T ddl::mapping::PlainSourceValue::getValueOrDefault ( T default_value) const
inline

Get the value or the default value if not set.

Template Parameters
TThe type of the value to retrieve
Parameters
default_valuethe default value if value was not found
Returns
T the value retrieved or default value

◆ getValueOrDefaultRef()

template<typename T>
void ddl::mapping::PlainSourceValue::getValueOrDefaultRef ( T & value_reference,
T default_value ) const
inline

Get the value or the default value if not set.

Template Parameters
TThe type of the value to retrieve
Parameters
value_referenceThe reference to retrieve the value to
default_valuethe default value if value was not found

◆ getValueRef()

template<typename T>
void ddl::mapping::PlainSourceValue::getValueRef ( T & value_reference) const
inline

Get the value.

Template Parameters
Tthe arithmetic type to covert the value to
Parameters
value_referencethe target refernce of the value

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