restinio::router::dynamic_none_of_methods_matcher_t Class Reference

An implementation of method_matcher that allows a method if it isn't found in a dynamic list of disabled methods. More...

`#include <method_matcher.hpp>`

Inheritance diagram for restinio::router::dynamic_none_of_methods_matcher_t:

## Public Member Functions

| dynamic_none_of_methods_matcher_t ()=default
RESTINIO_NODISCARD bool | match (const http_method_id_t &method) const noexcept override
| Is the specified method can be applied to a route? More...
dynamic_none_of_methods_matcher_t & | add (http_method_id_t method)
RESTINIO_NODISCARD std::size_t | size () const noexcept
RESTINIO_NODISCARD bool | empty () const noexcept
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::vector< http_method_id_t > | m_methods

## Detailed Description

An implementation of method_matcher that allows a method if it isn't found in a dynamic list of disabled methods.

Usage example:

restinio::router::dynamic_none_of_methods_matcher_t matcher;
if(config.handle_get_method())
matcher.add(restinio::http_method_get());
if(config.handle_head_method())
matcher.add(restinio::http_method_head());
router->add_handler(matcher, // Or std::move(matcher) if matcher is no more needed.
"/users/:id",
[](const auto & req, auto & params) {...});
restinio::router::dynamic_none_of_methods_matcher_t
An implementation of method_matcher that allows a method if it isn't found in a dynamic list of disab...
Definition: method_matcher.hpp:537
restinio::router::dynamic_none_of_methods_matcher_t::add
dynamic_none_of_methods_matcher_t & add(http_method_id_t method)
Definition: method_matcher.hpp:555
config_s
Definition: deflate.c:120

Since
  v.0.6.6

Definition at line 536 of file method_matcher.hpp.

## Constructor & Destructor Documentation

## dynamic_none_of_methods_matcher_t()

restinio::router::dynamic_none_of_methods_matcher_t::dynamic_none_of_methods_matcher_t | ( |  | ) |

default

## Member Function Documentation

## add()

dynamic_none_of_methods_matcher_t & restinio::router::dynamic_none_of_methods_matcher_t::add | ( | http_method_id_t | method | ) |

inline

Definition at line 555 of file method_matcher.hpp.

## empty()

RESTINIO_NODISCARD bool restinio::router::dynamic_none_of_methods_matcher_t::empty | ( |  | ) | const

inline noexcept

Definition at line 570 of file method_matcher.hpp.

## match()

RESTINIO_NODISCARD bool restinio::router::dynamic_none_of_methods_matcher_t::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.

Definition at line 545 of file method_matcher.hpp.

## size()

RESTINIO_NODISCARD std::size_t restinio::router::dynamic_none_of_methods_matcher_t::size | ( |  | ) | const

inline noexcept

Definition at line 563 of file method_matcher.hpp.

## Member Data Documentation

## m_methods

std::vector< http_method_id_t > restinio::router::dynamic_none_of_methods_matcher_t::m_methods

private

Definition at line 538 of file method_matcher.hpp.

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

- restinio/router/method_matcher.hpp