RESTinio

Public Member Functions | Private Attributes | List of all members
restinio::router::impl::fixed_size_any_of_matcher_t< Size > Class Template Reference

A matcher that finds a value in the vector of allowed values of fixed size. More...

`#include <method_matcher.hpp>`

Inheritance diagram for restinio::router::impl::fixed_size_any_of_matcher_t< Size >:

## Public Member Functions
| fixed_size_any_of_matcher_t (std::initializer_list< http_method_id_t > values)
| Initializing constructor. More...
RESTINIO_NODISCARD bool | match (const http_method_id_t &method) const noexcept override
| Is the specified method can be applied to a route? More...
Public Member Functions inherited from restinio::router::method_matcher_t
| method_matcher_t (const method_matcher_t &)=default
method_matcher_t & | operator= (const method_matcher_t &)=default
| method_matcher_t (method_matcher_t &&)=default
method_matcher_t & | operator= (method_matcher_t &&)=default
| method_matcher_t ()=default
virtual | ~method_matcher_t ()=default
virtual RESTINIO_NODISCARD bool | match (const http_method_id_t &method) const noexcept=0
| Is the specified method can be applied to a route? More...

## Private Attributes
std::array< http_method_id_t, Size > | m_methods

## Detailed Description

template<std::size_t Size>
class restinio::router::impl::fixed_size_any_of_matcher_t< Size >

A matcher that finds a value in the vector of allowed values of fixed size.

A method is allowed if it's found in the vector of allowed values.

Since
  v.0.6.6

Definition at line 139 of file method_matcher.hpp.

## Constructor & Destructor Documentation

## ◆ fixed_size_any_of_matcher_t()

template<std::size_t Size>

restinio::router::impl::fixed_size_any_of_matcher_t< Size >::fixed_size_any_of_matcher_t | ( | std::initializer_list< http_method_id_t > | values | ) |
| inline

Initializing constructor.

Attention
  The values.size() is expected to be equal to Size. The behavior is undefined otherwise.

Definition at line 151 of file method_matcher.hpp.

## Member Function Documentation

## ◆ match()

template<std::size_t Size>

RESTINIO_NODISCARD bool restinio::router::impl::fixed_size_any_of_matcher_t< Size >::match | ( | const http_method_id_t & | method | ) | const
| inline override virtual noexcept

Is the specified method can be applied to a route?

Return values

  true | if method can be applied to a route.
  false | if method can't be applied to a route.

Implements restinio::router::method_matcher_t.

Reimplemented in restinio::router::impl::fixed_size_none_of_matcher_t< Size >.

Definition at line 161 of file method_matcher.hpp.

## Member Data Documentation

## ◆ m_methods

template<std::size_t Size>

std::array< http_method_id_t, Size > restinio::router::impl::fixed_size_any_of_matcher_t< Size >::m_methods
| private

Definition at line 141 of file method_matcher.hpp.

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

- restinio/router/method_matcher.hpp