RESTinio
|
Utilities for parsing values of http-fields. More...
#include <restinio/impl/string_caseless_compare.hpp>
#include <restinio/helpers/easy_parser.hpp>
#include <restinio/expected.hpp>
#include <algorithm>
Go to the source code of this file.
Classes | |
class | restinio::http_field_parsers::qvalue_details::trusted |
A helper wrapper to indicate that value is already checked and shouldn't be checked again. More... | |
class | restinio::http_field_parsers::qvalue_details::untrusted |
A helper wrapper to indicate that value hasn't been checked yet and should be checked in the constructor of qvalue. More... | |
class | restinio::http_field_parsers::qvalue_t |
A class for holding the parsed value of qvalue from RFC7231. More... | |
struct | restinio::http_field_parsers::impl::is_alpha_predicate_t |
A preducate for symbol_producer_template that checks that a symbol is an alpha. More... | |
struct | restinio::http_field_parsers::impl::is_alphanum_predicate_t |
A preducate for symbol_producer_template that checks that a symbol is an alpha or numeric. More... | |
struct | restinio::http_field_parsers::impl::is_vchar_predicate_t |
A preducate for symbol_producer_template that checks that a symbol is a VCHAR. More... | |
struct | restinio::http_field_parsers::impl::is_ctext_predicate_t |
A preducate for symbol_producer_template that checks that a symbol is a ctext. More... | |
struct | restinio::http_field_parsers::impl::is_token_char_predicate_t |
A predicate for symbol_producer_template that checks that a symbol can be used inside a token. More... | |
class | restinio::http_field_parsers::impl::ows_producer_t |
A producer for OWS. More... | |
class | restinio::http_field_parsers::impl::token_producer_t |
A producer for token. More... | |
class | restinio::http_field_parsers::impl::quoted_string_producer_t |
A producer for quoted_string. More... | |
class | restinio::http_field_parsers::impl::quoted_pair_producer_t |
A producer for quoted_pair. More... | |
class | restinio::http_field_parsers::impl::comment_producer_t |
A producer for comment. More... | |
class | restinio::http_field_parsers::impl::qvalue_producer_t |
An implementation of producer of qvalue. More... | |
struct | restinio::http_field_parsers::impl::qvalue_producer_t::zero_initialized_unit_t |
class | restinio::http_field_parsers::impl::qvalue_producer_t::digit_consumer_t |
A helper class to be used to accumulate actual integer while when the next digit is extracted from the input stream. More... | |
class | restinio::http_field_parsers::impl::non_empty_comma_separated_list_producer_t< Container, Element_Producer > |
A template for a producer that handles non-empty list of comma-separated values. More... | |
class | restinio::http_field_parsers::impl::maybe_empty_comma_separated_list_producer_t< Container, Element_Producer > |
A template for a producer that handles possibly empty list of comma-separated values. More... | |
struct | restinio::http_field_parsers::not_found_t |
An empty type to be used as indicator of negative search result. More... | |
class | restinio::http_field_parsers::impl::params_with_value_producer_t |
A type of producer that produces instances of parameter_with_mandatory_value_container. More... | |
class | restinio::http_field_parsers::impl::params_with_opt_value_producer_t |
A type of producer that produces instances of parameter_with_optional_value_container. More... |
Namespaces | |
namespace | restinio |
namespace | restinio::http_field_parsers |
namespace | restinio::http_field_parsers::qvalue_details |
namespace | restinio::http_field_parsers::impl |
namespace | restinio::http_field_parsers::impl::params_with_value_producer_details |
namespace | restinio::http_field_parsers::impl::params_with_opt_value_producer_details |
Typedefs | |
using | restinio::http_field_parsers::qvalue_details::underlying_uint_t = std::uint_least16_t |
A type to hold a qvalue. | |
using | restinio::http_field_parsers::parameter_with_mandatory_value_t = std::pair< std::string, std::string > |
A type that describes a parameter with mandatory value. | |
using | restinio::http_field_parsers::parameter_with_mandatory_value_container_t |
A type of container for parameters with mandatory values. | |
using | restinio::http_field_parsers::parameter_with_optional_value_t |
A type that describes a parameter with optional value. | |
using | restinio::http_field_parsers::parameter_with_optional_value_container_t |
A type of container for parameters with optional values. |
Functions | |
bool | restinio::http_field_parsers::operator== (const qvalue_t &a, const qvalue_t &b) noexcept |
bool | restinio::http_field_parsers::operator!= (const qvalue_t &a, const qvalue_t &b) noexcept |
bool | restinio::http_field_parsers::operator< (const qvalue_t &a, const qvalue_t &b) noexcept |
bool | restinio::http_field_parsers::operator<= (const qvalue_t &a, const qvalue_t &b) noexcept |
constexpr bool | restinio::http_field_parsers::impl::is_alpha (const char ch) noexcept |
Is a character an ALPHA? | |
constexpr bool | restinio::http_field_parsers::impl::is_vchar (const char ch) noexcept |
Is a character a VCHAR? | |
constexpr bool | restinio::http_field_parsers::impl::is_obs_text (const char ch) noexcept |
Is a character an obs_text? | |
constexpr bool | restinio::http_field_parsers::impl::is_qdtext (const char ch) noexcept |
Is a character a qdtext? | |
constexpr bool | restinio::http_field_parsers::impl::is_ctext (const char ch) noexcept |
Is a character a ctext? | |
auto | restinio::http_field_parsers::alpha_symbol_p () |
A factory for producer of ALPHA symbols. | |
auto | restinio::http_field_parsers::alphanum_symbol_p () |
A factory for producer of symbol that an ALPHA or DIGIT. | |
auto | restinio::http_field_parsers::vchar_symbol_p () |
A factory for producer of VCHAR symbols. | |
auto | restinio::http_field_parsers::ctext_symbol_p () |
A factory for producer of ctext symbols. | |
auto | restinio::http_field_parsers::comment_p () |
A factory for producer of comment token. | |
auto | restinio::http_field_parsers::ows_p () noexcept |
A factory function to create an ows_producer. | |
auto | restinio::http_field_parsers::ows () noexcept |
A factory function to create an OWS clause. | |
auto | restinio::http_field_parsers::token_symbol_p () noexcept |
A factory for producer of symbols than can be used in tokens. | |
auto | restinio::http_field_parsers::token_p () noexcept |
A factory function to create a token_producer. | |
auto | restinio::http_field_parsers::quoted_string_p () noexcept |
A factory function to create a quoted_string_producer. | |
auto | restinio::http_field_parsers::quoted_pair_p () noexcept |
A factory function to create a quoted_pair_producer. | |
auto | restinio::http_field_parsers::expected_token_p (string_view_t token) |
A factory function to create a producer that expect a token with specific value. | |
auto | restinio::http_field_parsers::expected_caseless_token_p (string_view_t token) |
A factory function to create a producer that expect a token with specific value. | |
auto | restinio::http_field_parsers::qvalue_p () noexcept |
A factory function to create a qvalue_producer. | |
auto | restinio::http_field_parsers::weight_p () noexcept |
A factory function to create a producer for weight parameter. | |
template<typename Container, typename Element_Producer> | |
auto | restinio::http_field_parsers::non_empty_comma_separated_list_p (Element_Producer element) |
A factory for a producer that handles non-empty list of comma-separated values. | |
template<typename Container, typename Element_Producer> | |
auto | restinio::http_field_parsers::maybe_empty_comma_separated_list_p (Element_Producer element) |
A factory for a producer that handles possibly empty list of comma-separated values. | |
expected_t< string_view_t, not_found_t > | restinio::http_field_parsers::find_first (const parameter_with_mandatory_value_container_t &where, string_view_t what) |
A helper function to find the first occurence of a parameter with the specified value. | |
auto | restinio::http_field_parsers::impl::params_with_value_producer_details::make_parser () |
Helper function that creates an instance of producer of parameter_with_mandatory_value_container. | |
impl::params_with_value_producer_t | restinio::http_field_parsers::params_with_value_p () |
A factory of producer of parameter_with_mandatory_value_container. | |
expected_t< std::optional< string_view_t >, not_found_t > | restinio::http_field_parsers::find_first (const parameter_with_optional_value_container_t &where, string_view_t what) |
A helper function to find the first occurence of a parameter with the specified value. | |
auto | restinio::http_field_parsers::impl::params_with_opt_value_producer_details::make_parser () |
Helper function that creates an instance of producer of parameter_with_optional_value_container. | |
impl::params_with_opt_value_producer_t | restinio::http_field_parsers::params_with_opt_value_p () |
A factory of producer of parameter_with_optional_value_container. |
Variables | |
constexpr underlying_uint_t | restinio::http_field_parsers::qvalue_details::maximum = 1000u |
The maximal allowed value for a qvalue. | |
constexpr underlying_uint_t | restinio::http_field_parsers::qvalue_details::zero = 0u |
The minimal allowed value for a qvalue. |