RESTinio
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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:
restinio::router::method_matcher_t

Public Member Functions

 dynamic_none_of_methods_matcher_t ()=default
 
bool match (const http_method_id_t &method) const noexcept override
 Is the specified method can be applied to a route?
 
dynamic_none_of_methods_matcher_tadd (http_method_id_t method)
 
std::size_t size () const noexcept
 
bool empty () const noexcept
 
- Public Member Functions inherited from restinio::router::method_matcher_t
 method_matcher_t (const method_matcher_t &)=default
 
method_matcher_toperator= (const method_matcher_t &)=default
 
 method_matcher_t (method_matcher_t &&)=default
 
method_matcher_toperator= (method_matcher_t &&)=default
 
 method_matcher_t ()=default
 
virtual ~method_matcher_t ()=default
 

Private Attributes

std::vector< http_method_id_tm_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:

if(config.handle_get_method())
if(config.handle_head_method())
router->add_handler(matcher, // Or std::move(matcher) if matcher is no more needed.
"/users/:id",
[](const auto & req, auto & params) {...});
An implementation of method_matcher that allows a method if it isn't found in a dynamic list of disab...
dynamic_none_of_methods_matcher_t & add(http_method_id_t method)
run_on_this_thread_settings_t< Traits > on_this_thread()
A special marker for the case when http_server must be run on the context of the current thread.
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()

bool restinio::router::dynamic_none_of_methods_matcher_t::empty ( ) const
inlinenoexcept

Definition at line 570 of file method_matcher.hpp.

◆ match()

bool restinio::router::dynamic_none_of_methods_matcher_t::match ( const http_method_id_t & method) const
inlineoverridevirtualnoexcept

Is the specified method can be applied to a route?

Return values
trueif method can be applied to a route.
falseif method can't be applied to a route.

Implements restinio::router::method_matcher_t.

Definition at line 545 of file method_matcher.hpp.

◆ size()

std::size_t restinio::router::dynamic_none_of_methods_matcher_t::size ( ) const
inlinenoexcept

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: