|
RESTinio
|
Parameters container for query strings parameters. More...
#include <uri_helpers.hpp>
Public Types | |
| using | parameters_container_t = std::vector< std::pair< string_view_t, string_view_t > > |
Public Member Functions | |
| query_string_params_t (std::unique_ptr< char[] > data_buffer, parameters_container_t parameters) | |
| Constructor for the case when query string empty of contains a set of key-value pairs. | |
| query_string_params_t (std::unique_ptr< char[] > data_buffer, std::optional< string_view_t > tag) | |
| Constructor for the case when query string contains only tag (web beacon). | |
| query_string_params_t (query_string_params_t &&)=default | |
| query_string_params_t & | operator= (query_string_params_t &&)=default |
| query_string_params_t (const query_string_params_t &)=delete | |
| query_string_params_t & | operator= (const query_string_params_t &)=delete |
| string_view_t | operator[] (string_view_t key) const |
| Get parameter. | |
| bool | has (string_view_t key) const noexcept |
| Check parameter. | |
| std::optional< string_view_t > | get_param (string_view_t key) const noexcept |
| Get the value of a parameter if it exists. | |
| auto | size () const noexcept |
| Get the size of parameters. | |
| bool | empty () const noexcept |
| Is there any parameters? | |
| auto | tag () const noexcept |
| Get the tag (web beacon) part. | |
Iterate parameters. | |
| parameters_container_t::const_iterator | begin () const noexcept |
| parameters_container_t::const_iterator | end () const noexcept |
Private Member Functions | |
| parameters_container_t::const_iterator | find_parameter (string_view_t key) const noexcept |
| parameters_container_t::const_reference | find_parameter_with_check (string_view_t key) const |
Private Attributes | |
| std::unique_ptr< char[] > | m_data_buffer |
| Shared buffer for string_view of named parameterts names. | |
| parameters_container_t | m_parameters |
| std::optional< string_view_t > | m_tag |
| Tag (or web beacon) part. | |
Parameters container for query strings parameters.
Definition at line 42 of file uri_helpers.hpp.
| using restinio::query_string_params_t::parameters_container_t = std::vector< std::pair< string_view_t, string_view_t > > |
Definition at line 45 of file uri_helpers.hpp.
|
inline |
Constructor for the case when query string empty of contains a set of key-value pairs.
Definition at line 49 of file uri_helpers.hpp.
|
inline |
Constructor for the case when query string contains only tag (web beacon).
Definition at line 58 of file uri_helpers.hpp.
|
default |
|
delete |
|
inlinenoexcept |
Definition at line 107 of file uri_helpers.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 113 of file uri_helpers.hpp.
|
inlineprivatenoexcept |
Definition at line 135 of file uri_helpers.hpp.
|
inlineprivate |
Definition at line 147 of file uri_helpers.hpp.
|
inlinenoexcept |
Get the value of a parameter if it exists.
Definition at line 88 of file uri_helpers.hpp.
|
inlinenoexcept |
Check parameter.
Definition at line 80 of file uri_helpers.hpp.
|
delete |
|
default |
|
inline |
Get parameter.
Definition at line 73 of file uri_helpers.hpp.
|
inlinenoexcept |
Get the size of parameters.
Definition at line 98 of file uri_helpers.hpp.
|
inlinenoexcept |
Get the tag (web beacon) part.
A value of "tag" (also known as web beacon) is available only if URI looks like that:
http://example.com/resource?value
In that case tag will contain value. For URI with different formats tag() will return empty optional.
Definition at line 131 of file uri_helpers.hpp.
|
private |
Shared buffer for string_view of named parameterts names.
Definition at line 164 of file uri_helpers.hpp.
|
private |
Definition at line 165 of file uri_helpers.hpp.
|
private |