Loading...
Searching...
No Matches
restinio::router::impl::route_matcher_t< Regex_Engine > Class Template Reference

A matcher for a given path. More...

`#include <express.hpp>`

## Public Types

using | regex_t = typename Regex_Engine::compiled_regex_t
using | match_results_t = typename Regex_Engine::match_results_t

## Public Member Functions

| route_matcher_t (http_method_id_t method, regex_t route_regex, std::shared_ptr< std::string > named_params_buffer, param_appender_sequence_t param_appender_sequence)
| Creates matcher with a given parameters.
template<typename Method_Matcher >
| route_matcher_t (Method_Matcher &&method_matcher, regex_t route_regex, std::shared_ptr< std::string > named_params_buffer, param_appender_sequence_t param_appender_sequence)
| route_matcher_t ()=default
| route_matcher_t (route_matcher_t &&)=default
bool | match_route (target_path_holder_t &target_path, route_params_t &parameters) const
| Try to match a given request target with this route.
bool | operator() (const http_request_header_t &h, target_path_holder_t &target_path, route_params_t &parameters) const

## Private Attributes

buffered_matcher_holder_t | m_method_matcher
| HTTP method to match.
regex_t | m_route_regex
| Regex of a given route.
std::shared_ptr< std::string > | m_named_params_buffer
| Buffer for named parameters names string views.
param_appender_sequence_t | m_param_appender_sequence
| Parameters values.

## Detailed Description

template<typename Regex_Engine = std_regex_engine_t>
class restinio::router::impl::route_matcher_t< Regex_Engine >

A matcher for a given path.

Definition at line 285 of file express.hpp.

## Member Typedef Documentation

## match_results_t

template<typename Regex_Engine = std_regex_engine_t>

using restinio::router::impl::route_matcher_t< Regex_Engine >::match_results_t = typename Regex_Engine::match_results_t

Definition at line 289 of file express.hpp.

## regex_t

template<typename Regex_Engine = std_regex_engine_t>

using restinio::router::impl::route_matcher_t< Regex_Engine >::regex_t = typename Regex_Engine::compiled_regex_t

Definition at line 288 of file express.hpp.

## Constructor & Destructor Documentation

## route_matcher_t() [1/4]

template<typename Regex_Engine = std_regex_engine_t>

restinio::router::impl::route_matcher_t< Regex_Engine >::route_matcher_t | ( | http_method_id_t | method,
|  | regex_t | route_regex,
|  | std::shared_ptr< std::string > | named_params_buffer,
|  | param_appender_sequence_t | param_appender_sequence
| ) |  |

inline

Creates matcher with a given parameters.

Definition at line 292 of file express.hpp.

## route_matcher_t() [2/4]

template<typename Regex_Engine = std_regex_engine_t>
template<typename Method_Matcher >

restinio::router::impl::route_matcher_t< Regex_Engine >::route_matcher_t | ( | Method_Matcher && | method_matcher,
|  | regex_t | route_regex,
|  | std::shared_ptr< std::string > | named_params_buffer,
|  | param_appender_sequence_t | param_appender_sequence
| ) |  |

inline

Creates matcher with a given parameters.

This constructor is intended for cases where method_matcher is specified as object of class derived from method_matcher_t.

Since
  v.0.6.6

Definition at line 313 of file express.hpp.

## route_matcher_t() [3/4]

template<typename Regex_Engine = std_regex_engine_t>

restinio::router::impl::route_matcher_t< Regex_Engine >::route_matcher_t | ( |  | ) |

default

## route_matcher_t() [4/4]

template<typename Regex_Engine = std_regex_engine_t>

restinio::router::impl::route_matcher_t< Regex_Engine >::route_matcher_t | ( | route_matcher_t< Regex_Engine > && |  | ) |

default

## Member Function Documentation

## match_route()

template<typename Regex_Engine = std_regex_engine_t>

bool restinio::router::impl::route_matcher_t< Regex_Engine >::match_route | ( | target_path_holder_t & | target_path,
|  | route_params_t & | parameters
| ) |  | const

inline

Try to match a given request target with this route.

Definition at line 332 of file express.hpp.

## operator()()

template<typename Regex_Engine = std_regex_engine_t>

bool restinio::router::impl::route_matcher_t< Regex_Engine >::operator() | ( | const http_request_header_t & | h,
|  | target_path_holder_t & | target_path,
|  | route_params_t & | parameters
| ) |  | const

inline

Definition at line 398 of file express.hpp.

## Member Data Documentation

## m_method_matcher

template<typename Regex_Engine = std_regex_engine_t>

buffered_matcher_holder_t restinio::router::impl::route_matcher_t< Regex_Engine >::m_method_matcher

private

HTTP method to match.

Definition at line 409 of file express.hpp.

## m_named_params_buffer

template<typename Regex_Engine = std_regex_engine_t>

std::shared_ptr< std::string > restinio::router::impl::route_matcher_t< Regex_Engine >::m_named_params_buffer

private

Buffer for named parameters names string views.

Definition at line 415 of file express.hpp.

## m_param_appender_sequence

template<typename Regex_Engine = std_regex_engine_t>

param_appender_sequence_t restinio::router::impl::route_matcher_t< Regex_Engine >::m_param_appender_sequence

private

Parameters values.

Definition at line 418 of file express.hpp.

## m_route_regex

template<typename Regex_Engine = std_regex_engine_t>

regex_t restinio::router::impl::route_matcher_t< Regex_Engine >::m_route_regex

private

Regex of a given route.

Definition at line 412 of file express.hpp.

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

- restinio/router/express.hpp