RESTinio
Loading...
Searching...
No Matches
restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t Class Referencefinal

Actual implementation of the controller interface. More...

Inheritance diagram for restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t:
restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >

Public Member Functions

 actual_controller_t (actual_request_handle_t request, const schedulers_vector_t &schedulers)
 Initializing constructor.
const actual_request_handle_trequest_handle () const noexcept override
 Get reference to the source request.
Public Member Functions inherited from restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >
virtual ~async_handling_controller_t ()=default

Private Member Functions

actual_on_next_result_t on_next () override
 Command to try find a next scheduler to be invoked.

Private Attributes

const actual_request_handle_t m_request
 The source request.
schedulers_vector_t m_schedulers
 Request schedulers.
std::size_t m_current {}
 Index of the current scheduler to be used.

Additional Inherited Members

Public Types inherited from restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >
using actual_request_handle_t
 Short alias for request_handle type.
using actual_async_request_scheduler_t
 Short alias for async_request_scheduler type.
using actual_on_next_result_t
 Short alias for the result type of on_next method.

Detailed Description

template<typename Extra_Data_Factory = no_extra_data_factory_t>
class restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t

Actual implementation of the controller interface.

Note
Object of this type holds a copy of the source vector of schedulers.

Definition at line 209 of file growable_size.hpp.

Constructor & Destructor Documentation

◆ actual_controller_t()

template<typename Extra_Data_Factory = no_extra_data_factory_t>
restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t::actual_controller_t ( actual_request_handle_t request,
const schedulers_vector_t & schedulers )
inlineexplicit

Initializing constructor.

Definition at line 226 of file growable_size.hpp.

Member Function Documentation

◆ on_next()

template<typename Extra_Data_Factory = no_extra_data_factory_t>
actual_on_next_result_t restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t::on_next ( )
inlinenodiscardoverrideprivatevirtual

Command to try find a next scheduler to be invoked.

Implementation of async_handling_controller_t should switch to the next scheduler in the chain and return the scheduler to be called next. If there are no such schedulers, no_more_schedulers_t must be returned.

Note
This method is intended to be called by next() function.

Implements restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >.

Definition at line 240 of file growable_size.hpp.

◆ request_handle()

template<typename Extra_Data_Factory = no_extra_data_factory_t>
const actual_request_handle_t & restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t::request_handle ( ) const
inlinenodiscardoverridevirtualnoexcept

Get reference to the source request.

Usage example:

{
// Get access to the source request.
const auto req = controller->request_handle();
if( restinio::http_method_get() == req->header().method() )
{
...
}
}
constexpr schedule_result_t ok() noexcept
Helper function to be used if scheduling was successful.
Definition common.hpp:49
schedule_result_t
Type for return value of a scheduler in a chain.
Definition common.hpp:25
std::unique_ptr< async_handling_controller_t< Extra_Data_Factory > > unique_async_handling_controller_t
Short alias for unique_ptr to async_handling_controller.
Definition common.hpp:84

Implements restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >.

Definition at line 235 of file growable_size.hpp.

Member Data Documentation

◆ m_current

template<typename Extra_Data_Factory = no_extra_data_factory_t>
std::size_t restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t::m_current {}
private

Index of the current scheduler to be used.

Note
May be equal to or greater than m_schedulers.size() in the case when all schedulers are already processed.

Definition at line 222 of file growable_size.hpp.

◆ m_request

template<typename Extra_Data_Factory = no_extra_data_factory_t>
const actual_request_handle_t restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t::m_request
private

The source request.

Definition at line 213 of file growable_size.hpp.

◆ m_schedulers

template<typename Extra_Data_Factory = no_extra_data_factory_t>
schedulers_vector_t restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t::m_schedulers
private

Request schedulers.

Definition at line 215 of file growable_size.hpp.


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