|
RESTinio
|
Classes | |
| class | parameter_token_t |
| Token for paramater (named/indexed). More... | |
| class | plain_string_token_t |
| Plain str token. More... | |
| struct | route_regex_matcher_data_t |
| Resulting regex and param extraction for a specific route. More... | |
| class | string_view_buffer_storage_appender_t |
| Appender for names to a given buffered string. More... | |
| class | token_t |
| Base class for token variants. More... | |
Typedefs | |
| using | names_buffer_appender_t = string_view_buffer_storage_appender_t< std::string > |
| template<typename Route_Param_Appender > | |
| using | token_unique_ptr_t = std::unique_ptr< token_t< Route_Param_Appender > > |
| template<typename Route_Param_Appender > | |
| using | token_list_t = std::vector< token_unique_ptr_t< Route_Param_Appender > > |
Enumerations | |
| enum class | token_type_t : std::uint8_t { plain_string , capturing_token } |
Functions | |
| auto | escape_group (const std::string &group) |
| Escapes not allowed symbols in a sub-match group assigned to a parameter. More... | |
| auto | escape_string (const std::string &group) |
| Excape regex control chars. More... | |
| template<typename Route_Param_Appender > | |
| token_unique_ptr_t< Route_Param_Appender > | create_token (std::string path) |
| template<typename Route_Param_Appender , typename Name > | |
| token_unique_ptr_t< Route_Param_Appender > | create_token (Name name, std::string prefix, std::string delimiter, bool optional, bool repeat, bool partial, std::string pattern) |
| Creates tokent for specific parameter. More... | |
| std::string | check_no_unescaped_brackets (string_view_t strv, std::size_t base_pos) |
| Checks that string doesn't contain non-excaped brackets. More... | |
| template<typename Route_Param_Appender , typename MATCH > | |
| void | handle_param_token (const options_t &options, const MATCH &match, std::string &path, bool &path_escaped, token_list_t< Route_Param_Appender > &result) |
| Handling of a parameterized token. More... | |
| template<typename Route_Param_Appender > | |
| token_list_t< Route_Param_Appender > | parse (string_view_t route_sv, const options_t &options) |
| Parse a string for the raw tokens. More... | |
| template<typename Route_Param_Appender , typename Regex_Engine > | |
| auto | tokens2regexp (string_view_t path, const token_list_t< Route_Param_Appender > &tokens, const options_t &options) |
| Makes route regex matcher out of path tokens. More... | |
Variables | |
| constexpr auto | path_regex_str |
| The main path matching expression. More... | |
| constexpr std::size_t | group_escaped_idx = 1 |
| Indexes for different groups in matched result (used when extracting tokens from initial route). More... | |
| constexpr std::size_t | group_name_idx = 2 |
| constexpr std::size_t | group_capture_idx = 3 |
| constexpr std::size_t | group_group_idx = 4 |
| constexpr std::size_t | group_modifier_idx = 5 |
| using restinio::path2regex::impl::names_buffer_appender_t = typedef string_view_buffer_storage_appender_t< std::string > |
Definition at line 353 of file path2regex.hpp.
| using restinio::path2regex::impl::token_list_t = typedef std::vector< token_unique_ptr_t< Route_Param_Appender > > |
Definition at line 396 of file path2regex.hpp.
| using restinio::path2regex::impl::token_unique_ptr_t = typedef std::unique_ptr< token_t< Route_Param_Appender > > |
Definition at line 393 of file path2regex.hpp.
|
strong |
| Enumerator | |
|---|---|
| plain_string | |
| capturing_token | |
Definition at line 359 of file path2regex.hpp.
|
inline |
Checks that string doesn't contain non-excaped brackets.
Definition at line 562 of file path2regex.hpp.
|
inline |
Creates tokent for specific parameter.
Definition at line 531 of file path2regex.hpp.
| token_unique_ptr_t< Route_Param_Appender > restinio::path2regex::impl::create_token | ( | std::string | path | ) |
Definition at line 437 of file path2regex.hpp.
|
inline |
Escapes not allowed symbols in a sub-match group assigned to a parameter.
Definition at line 40 of file path2regex.hpp.
|
inline |
Excape regex control chars.
Definition at line 63 of file path2regex.hpp.
|
inline |
Handling of a parameterized token.
Definition at line 592 of file path2regex.hpp.
| token_list_t< Route_Param_Appender > restinio::path2regex::impl::parse | ( | string_view_t | route_sv, |
| const options_t & | options | ||
| ) |
Parse a string for the raw tokens.
Definition at line 676 of file path2regex.hpp.
| auto restinio::path2regex::impl::tokens2regexp | ( | string_view_t | path, |
| const token_list_t< Route_Param_Appender > & | tokens, | ||
| const options_t & | options | ||
| ) |
Makes route regex matcher out of path tokens.
Definition at line 780 of file path2regex.hpp.
|
constexpr |
Definition at line 555 of file path2regex.hpp.
|
constexpr |
Indexes for different groups in matched result (used when extracting tokens from initial route).
Definition at line 553 of file path2regex.hpp.
|
constexpr |
Definition at line 556 of file path2regex.hpp.
|
constexpr |
Definition at line 557 of file path2regex.hpp.
|
constexpr |
Definition at line 554 of file path2regex.hpp.
|
constexpr |
The main path matching expression.
Definition at line 356 of file path2regex.hpp.