Static Public Member Functions | List of all members
cras::DefaultToResultFn< ResultType, ParamServerType > Struct Template Reference

Default function for converting param server types to result types. More...

#include <get_param_options.hpp>

Static Public Member Functions

static ResultType toResult (const ParamServerType &value)
 Function converting ParamServerType values to ResultType. More...
 

Detailed Description

template<typename ResultType, typename ParamServerType>
struct cras::DefaultToResultFn< ResultType, ParamServerType >

Default function for converting param server types to result types.

Template Parameters
ResultTypeType of getParam() result.
ParamServerTypeType of the intermediate value to which the XmlRpcValue param is converted.
Note
Create a specialization of this struct in case you need a different implementation of the conversion.

Definition at line 30 of file get_param_options.hpp.

Member Function Documentation

◆ toResult()

template<typename ResultType , typename ParamServerType >
static ResultType cras::DefaultToResultFn< ResultType, ParamServerType >::toResult ( const ParamServerType &  value)
inlinestatic

Function converting ParamServerType values to ResultType.

Parameters
[in]valueThe value to convert.
Returns
The converted value.
Exceptions
std::runtime_errorIf the conversion failed.

Definition at line 38 of file get_param_options.hpp.


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


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Jun 17 2023 02:32:53