RESTinio
Public Types | Public Member Functions | Private Attributes | List of all members
restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler > Class Template Reference

An actual implementation of router_entry interface. More...

#include <easy_parser_router.hpp>

Inheritance diagram for restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >:
restinio::router::easy_parser_router::impl::router_entry_t< Extra_Data >

Public Types

using actual_request_handle_t = typename router_entry_t< Extra_Data >::actual_request_handle_t
 
- Public Types inherited from restinio::router::easy_parser_router::impl::router_entry_t< Extra_Data >
using actual_request_handle_t = generic_request_handle_t< Extra_Data >
 

Public Member Functions

template<typename Method_Matcher , typename Producer_Arg , typename Handler_Arg >
 actual_router_entry_t (Method_Matcher &&method_matcher, Producer_Arg &&producer, Handler_Arg &&handler)
 
RESTINIO_NODISCARD expected_t< request_handling_status_t, no_match_ttry_handle (const actual_request_handle_t &req, target_path_holder_t &target_path) const override
 An attempt to match a request against the route. More...
 
- Public Member Functions inherited from restinio::router::easy_parser_router::impl::router_entry_t< Extra_Data >
virtual ~router_entry_t ()=default
 
virtual RESTINIO_NODISCARD expected_t< request_handling_status_t, no_match_ttry_handle (const actual_request_handle_t &req, target_path_holder_t &target_path) const =0
 An attempt to match a request against the route. More...
 

Private Attributes

restinio::router::impl::buffered_matcher_holder_t m_method_matcher
 HTTP method to match. More...
 
Producer m_producer
 Parser of a route and producer of argument(s) for request handler. More...
 
Handler m_handler
 Request handler to be used. More...
 

Detailed Description

template<typename Extra_Data, typename Producer, typename Handler>
class restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >

An actual implementation of router_entry interface.

Template Parameters
ProducerA type of producer that parses a route and produces a value to be used as argument(s) for request handler.
Extra_DataThe type of extra-data incorporated into a request object. This type is added to actual_router_entry_t in v.0.6.13.
HandleA type of request handler.
Since
v.0.6.6

Definition at line 106 of file easy_parser_router.hpp.

Member Typedef Documentation

◆ actual_request_handle_t

template<typename Extra_Data , typename Producer , typename Handler >
using restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >::actual_request_handle_t = typename router_entry_t<Extra_Data>::actual_request_handle_t

Definition at line 121 of file easy_parser_router.hpp.

Constructor & Destructor Documentation

◆ actual_router_entry_t()

template<typename Extra_Data , typename Producer , typename Handler >
template<typename Method_Matcher , typename Producer_Arg , typename Handler_Arg >
restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >::actual_router_entry_t ( Method_Matcher &&  method_matcher,
Producer_Arg &&  producer,
Handler_Arg &&  handler 
)
inline

Definition at line 128 of file easy_parser_router.hpp.

Member Function Documentation

◆ try_handle()

template<typename Extra_Data , typename Producer , typename Handler >
RESTINIO_NODISCARD expected_t< request_handling_status_t, no_match_t > restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >::try_handle ( const actual_request_handle_t req,
target_path_holder_t target_path 
) const
inlineoverridevirtual

An attempt to match a request against the route.

If match successed the corresponding request handler is called and its return value is returned in form of request_handling_status_t value.

If match failed then an instance of no_match_t is returned.

Implements restinio::router::easy_parser_router::impl::router_entry_t< Extra_Data >.

Definition at line 140 of file easy_parser_router.hpp.

Member Data Documentation

◆ m_handler

template<typename Extra_Data , typename Producer , typename Handler >
Handler restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >::m_handler
private

Request handler to be used.

Definition at line 118 of file easy_parser_router.hpp.

◆ m_method_matcher

template<typename Extra_Data , typename Producer , typename Handler >
restinio::router::impl::buffered_matcher_holder_t restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >::m_method_matcher
private

HTTP method to match.

Definition at line 112 of file easy_parser_router.hpp.

◆ m_producer

template<typename Extra_Data , typename Producer , typename Handler >
Producer restinio::router::easy_parser_router::impl::actual_router_entry_t< Extra_Data, Producer, Handler >::m_producer
private

Parser of a route and producer of argument(s) for request handler.

Definition at line 115 of file easy_parser_router.hpp.


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