RESTinio
Loading...
Searching...
No Matches
restinio::easy_parser::impl::convert_transformer_t< Output_Type, Converter > Class Template Reference

A transformator that uses a user supplied function/functor for conversion a value from one type to another. More...

#include <easy_parser.hpp>

Inheritance diagram for restinio::easy_parser::impl::convert_transformer_t< Output_Type, Converter >:
restinio::easy_parser::impl::transformer_tag< Output_Type >

Public Member Functions

template<typename Convert_Arg>
 convert_transformer_t (Convert_Arg &&converter) noexcept(noexcept(Converter{std::forward< Convert_Arg >(converter)}))
template<typename Input>
auto transform (Input &&input) const noexcept(noexcept(m_converter(std::forward< Input >(input))))
 Performs the transformation by calling the converter.

Private Attributes

Converter m_converter

Additional Inherited Members

Public Types inherited from restinio::easy_parser::impl::transformer_tag< Output_Type >
using result_type
Static Public Attributes inherited from restinio::easy_parser::impl::transformer_tag< Output_Type >
static constexpr entity_type_t entity_type

Detailed Description

template<typename Output_Type, typename Converter>
class restinio::easy_parser::impl::convert_transformer_t< Output_Type, Converter >

A transformator that uses a user supplied function/functor for conversion a value from one type to another.

Since
v.0.6.6

Definition at line 3174 of file easy_parser.hpp.

Constructor & Destructor Documentation

◆ convert_transformer_t()

template<typename Output_Type, typename Converter>
template<typename Convert_Arg>
restinio::easy_parser::impl::convert_transformer_t< Output_Type, Converter >::convert_transformer_t ( Convert_Arg && converter)
inlinenoexcept

Definition at line 3180 of file easy_parser.hpp.

Member Function Documentation

◆ transform()

template<typename Output_Type, typename Converter>
template<typename Input>
auto restinio::easy_parser::impl::convert_transformer_t< Output_Type, Converter >::transform ( Input && input) const
inlinenodiscardnoexcept

Performs the transformation by calling the converter.

Note
Since v.0.6.11 the result type changed from Output_Type to auto. That allows to use converters that returns expected_t<Output_Type, error_reason_t>.

Definition at line 3196 of file easy_parser.hpp.

Member Data Documentation

◆ m_converter

template<typename Output_Type, typename Converter>
Converter restinio::easy_parser::impl::convert_transformer_t< Output_Type, Converter >::m_converter
private

Definition at line 3176 of file easy_parser.hpp.


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