14 #include <restinio/http_headers.hpp> 16 #include <initializer_list> 79 template<
typename Matcher >
85 template<
typename... Args >
138 template< std::size_t Size >
152 std::initializer_list< http_method_id_t > values )
182 template< std::size_t Size >
189 using base_type_t::base_type_t;
274 m_matcher = other.m_mover( other.m_matcher, m_buffer.data() );
327 template<
typename Target_Type,
typename... Args >
332 "Target_Type should have appropriate alignment" );
376 template<
typename Arg >
384 "Arg should be derived from method_matcher_t" );
414 template<
typename...
Args >
419 return { std::initializer_list<http_method_id_t>{ std::forward<Args>(args)... } };
446 template<
typename...
Args >
451 return { std::initializer_list<http_method_id_t>{ std::forward<Args>(args)... } };
method_matcher_t & operator=(method_matcher_t &&)=default
std::array< char, buffer_size > m_buffer
The internal buffer.
RESTINIO_NODISCARD bool match(const http_method_id_t &method) const noexcept override
Is the specified method can be applied to a route?
method_matcher_t(const method_matcher_t &)=default
void assign(Args &&... args)
Creates an instance of Target_Type and initializes it with arguments Args.
std::unique_ptr< Matcher > m_matcher
buffered_matcher_holder_t & operator=(const buffered_matcher_holder_t &)=delete
buffered_matcher_holder_t & operator=(buffered_matcher_holder_t &&other) noexcept
fixed_size_any_of_matcher_t(std::initializer_list< http_method_id_t > values)
Initializing constructor.
RESTINIO_NODISCARD bool empty() const noexcept
simple_matcher_t(http_method_id_t method)
friend void assign(buffered_matcher_holder_t &holder, Arg &&method_matcher)
RESTINIO_NODISCARD bool match(const http_method_id_t &method) const noexcept override
Is the specified method can be applied to a route?
std::array< http_method_id_t, Size > m_methods
RESTINIO_NODISCARD impl::fixed_size_any_of_matcher_t< sizeof...(Args) > any_of_methods(Args &&...args)
A factory function that creates a method_matcher that allows a method if it's found in the list of al...
static constexpr std::size_t buffer_size
The size of the internal buffer.
allocated_matcher_proxy_t(Args &&...args)
std::vector< http_method_id_t > m_methods
~buffered_matcher_holder_t() noexcept
virtual ~method_matcher_t()=default
RESTINIO_NODISCARD bool empty() const noexcept
void move_from(buffered_matcher_holder_t &other)
dynamic_none_of_methods_matcher_t()=default
std::vector< http_method_id_t > m_methods
method_matcher_t & operator=(const 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?
pfn_move_t m_mover
An actual move-function.
buffered_matcher_holder_t(buffered_matcher_holder_t &&other) noexcept
RESTINIO_NODISCARD bool match(const http_method_id_t &method) const noexcept override
Is the specified method can be applied to a route?
method_matcher_t(method_matcher_t &&)=default
dynamic_any_of_methods_matcher_t()=default
buffered_matcher_holder_t()=default
method_matcher_t * m_matcher
A pointer to actual matcher allocated inside the internall buffer.
static constexpr std::size_t alignment
Alignment to be used by the internal buffer.
buffered_matcher_holder_t(const buffered_matcher_holder_t &)=delete
http_method_id_t m_method
RESTINIO_NODISCARD impl::fixed_size_none_of_matcher_t< sizeof...(Args) > none_of_methods(Args &&...args)
A factory function that creates a method_matcher that allows a method if it isn't found in the list o...
method_matcher_t()=default
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
RESTINIO_NODISCARD bool match(const http_method_id_t &method) const noexcept override
Is the specified method can be applied to a route?