RESTinio

Public Member Functions | Private Attributes | List of all members
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 >:

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

## Private Attributes
Converter | m_converter

## Additional Inherited Members
Public Types inherited from restinio::easy_parser::impl::transformer_tag< Output_Type >
using | result_type = Output_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 3173 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 | ) |
| inline noexcept

Definition at line 3179 of file easy_parser.hpp.

## Member Function Documentation

## ◆ transform()

template<typename Output_Type , typename Converter >
template<typename Input >

RESTINIO_NODISCARD auto restinio::easy_parser::impl::convert_transformer_t< Output_Type, Converter >::transform | ( | Input && | input | ) | const
| inline noexcept

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 3195 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 3175 of file easy_parser.hpp.

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

- restinio/helpers/easy_parser.hpp