RESTinio

Public Types | Public Member Functions | List of all members
restinio::simple_extra_data_factory_t< Extra_Data > Struct Template Reference

A helper template class for cases when extra-data-factory is just a simple stateless object. More...

`#include <request_handler.hpp>`

## Public Types
using | data_t = Extra_Data

## Public Member Functions
void | make_within (extra_data_buffer_t< data_t > buffer) noexcept(noexcept(new(buffer.get()) data_t{}))

## Detailed Description

template<typename Extra_Data>
struct restinio::simple_extra_data_factory_t< Extra_Data >

A helper template class for cases when extra-data-factory is just a simple stateless object.

Usage example:

struct first_stage_data { ... };
struct second_stage_data { ... };
struct third_stage_data { ... };
using my_extra_data_factory = restinio::simple_extra_data_factory_t<
std::tuple<first_stage_data, second_stage_data, third_stage_data> >;
struct my_traits : public restinio::default_traits_t
{
using extra_data_factory_t = my_extra_data_factory;
};
restinio::simple_extra_data_factory_t
A helper template class for cases when extra-data-factory is just a simple stateless object.
Definition: request_handler.hpp:117
restinio::traits_t
Definition: traits.hpp:147

Template Parameters

  Extra_Data | Type of extra-data to be incorporated into request-objects.

Since
  v.0.6.13

Examples
  sample/extra_data_factory/main.cpp.

Definition at line 116 of file request_handler.hpp.

## Member Typedef Documentation

## ◆ data_t

template<typename Extra_Data >

using restinio::simple_extra_data_factory_t< Extra_Data >::data_t = Extra_Data

Definition at line 118 of file request_handler.hpp.

## Member Function Documentation

## ◆ make_within()

template<typename Extra_Data >

void restinio::simple_extra_data_factory_t< Extra_Data >::make_within | ( | extra_data_buffer_t< data_t > | buffer | ) |
| inline noexcept

Definition at line 121 of file request_handler.hpp.

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

- restinio/request_handler.hpp