|
PCRE2 C++ Wrapper 1.3.0
pcre2cpp
|
Basic container to result data of match function. More...
#include <match_result.hpp>
Classes | |
| struct | _value_result_data |
| Result data container. More... | |
Public Member Functions | |
| _PCRE2CPP_CONSTEXPR17 | basic_match_result () noexcept=default |
| default constructor | |
| _PCRE2CPP_CONSTEXPR17 | basic_match_result (const match_error_codes error_code) noexcept |
| constructor with error code | |
| _PCRE2CPP_CONSTEXPR17 | basic_match_result (const size_t search_offset, const _named_sub_values_table_ptr &named_sub_values, const _code_ptr ®ex_compiled_code) noexcept |
| constructor with no value but also without error | |
| _PCRE2CPP_CONSTEXPR17 | basic_match_result (const size_t search_offset, const _match_value &result, const std::vector< std::optional< sub_match_value > > &sub_results, const _named_sub_values_table_ptr &named_sub_values, const _code_ptr ®ex_compiled_code) noexcept |
| constructor with good result | |
| _PCRE2CPP_CONSTEXPR17 | basic_match_result (const basic_match_result &other) noexcept=default |
| default copy constructor | |
| _PCRE2CPP_CONSTEXPR17 | basic_match_result (basic_match_result &&other) noexcept=default |
| default move constructor | |
| _PCRE2CPP_CONSTEXPR20 | ~basic_match_result () noexcept=default |
| default destructor | |
| _PCRE2CPP_CONSTEXPR17 basic_match_result & | operator= (const basic_match_result &other) noexcept=default |
| default copy assign operator | |
| _PCRE2CPP_CONSTEXPR17 basic_match_result & | operator= (basic_match_result &&other) noexcept=default |
| default move assign operator | |
| _PCRE2CPP_CONSTEXPR17 bool | has_error () const noexcept |
| returns true if result holds error | |
| _PCRE2CPP_CONSTEXPR17 match_error_codes | get_error_code () const noexcept |
| return error code | |
| _PCRE2CPP_CONSTEXPR17 _string_type | get_error_message () const noexcept |
| returns error message | |
| _PCRE2CPP_CONSTEXPR17 void | throw_error () const |
| throws error if result holds error with error message based on error code | |
| _PCRE2CPP_CONSTEXPR17 bool | has_result () const noexcept |
| returns true when result holds some result not error | |
| _PCRE2CPP_CONSTEXPR17 bool | has_value () const noexcept |
| returns true when result has value | |
| _PCRE2CPP_CONSTEXPR17 bool | has_sub_value (const size_t idx) const noexcept |
| returns true when result has sub value on given index | |
| _PCRE2CPP_CONSTEXPR17 bool | has_sub_value (const _string_view_type name) const noexcept |
| returns true when result has sub value with given name | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_search_offset () const noexcept |
| returns search offset | |
| _PCRE2CPP_CONSTEXPR17 _match_value | get_result () const noexcept |
| returns match result container | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_result_global_offset () const noexcept |
| returns offset of value from the beginning of searched string | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_result_relative_offset () const noexcept |
| return offset relative to search offset | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_result_size () const noexcept |
| returns size of match value | |
| _PCRE2CPP_CONSTEXPR17 _string_type | get_result_value () const noexcept |
| returns match string value | |
| _PCRE2CPP_CONSTEXPR20 std::vector< std::optional< sub_match_value > > | get_sub_results () const noexcept |
| returns all sub results | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_results_count () const noexcept |
| returns sub results count | |
| _PCRE2CPP_CONSTEXPR20 std::vector< size_t > | get_sub_results_global_offsets () const noexcept |
| returns sub results offsets from the beginning of search string | |
| _PCRE2CPP_CONSTEXPR20 std::vector< size_t > | get_sub_results_relative_offsets () const noexcept |
| returns sub results offsets relative to search offset | |
| _PCRE2CPP_CONSTEXPR20 std::vector< size_t > | get_sub_results_in_result_offsets () const noexcept |
| returns sub results offsets relative to result offset | |
| _PCRE2CPP_CONSTEXPR20 std::vector< size_t > | get_sub_results_sizes () const noexcept |
| returns sub results value sizes | |
| _PCRE2CPP_CONSTEXPR17 std::vector< _string_type > | get_sub_results_values () const noexcept |
| returns sub results string values | |
| _PCRE2CPP_CONSTEXPR17 sub_match_value | get_sub_result (const size_t idx) const _PCRE2CPP_NOEXCEPT |
| returns sub result container | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_global_offset (const size_t idx) const _PCRE2CPP_NOEXCEPT |
| returns sub result offset from the beginning of searched string | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_relative_offset (const size_t idx) const _PCRE2CPP_NOEXCEPT |
| returns sub result offset relative to search offset | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_in_result_offset (const size_t idx) const _PCRE2CPP_NOEXCEPT |
| returns sub result offset relative to result offset | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_size (const size_t idx) const _PCRE2CPP_NOEXCEPT |
| returns sub result value size | |
| _PCRE2CPP_CONSTEXPR17 _string_type | get_sub_result_value (const size_t idx) const _PCRE2CPP_NOEXCEPT |
| returns sub result string value | |
| _PCRE2CPP_CONSTEXPR17 sub_match_value | get_sub_result (const _string_view_type name) const _PCRE2CPP_NOEXCEPT |
| returns sub result container | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_global_offset (const _string_view_type name) const _PCRE2CPP_NOEXCEPT |
| returns sub result offset from the beginning of searched string | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_relative_offset (const _string_view_type name) const _PCRE2CPP_NOEXCEPT |
| returns sub result offset relative to search offset | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_in_result_offset (const _string_view_type name) const _PCRE2CPP_NOEXCEPT |
| returns sub result offset relative to result offset | |
| _PCRE2CPP_CONSTEXPR17 size_t | get_sub_result_size (const _string_view_type name) const _PCRE2CPP_NOEXCEPT |
| returns sub result value size | |
| _PCRE2CPP_CONSTEXPR17 _string_type | get_sub_result_value (const _string_view_type name) const _PCRE2CPP_NOEXCEPT |
| returns sub result string value | |
Static Public Attributes | |
| static _PCRE2CPP_CONSTEXPR17 size_t | bad_offset = std::numeric_limits<size_t>::max() |
| error offset (returned when value doesn't exist or when error has occurred) | |
Private Types | |
| using | _pcre2_data_t = utils::pcre2_data<utf> |
| using | _code_type = typename _pcre2_data_t::code_type |
| using | _code_ptr = std::shared_ptr<_code_type> |
| using | _string_type = typename _pcre2_data_t::string_type |
| using | _string_view_type = typename _pcre2_data_t::string_view_type |
| using | _match_value = basic_match_value<utf> |
| using | _match_result_exception = basic_match_result_exception<utf> |
| using | _named_sub_values_table = typename _pcre2_data_t::named_sub_values_table |
| using | _named_sub_values_table_ptr = std::shared_ptr<_named_sub_values_table> |
Private Member Functions | |
| _PCRE2CPP_CONSTEXPR17 bool | _has_named_sub_result (const _string_view_type name) const noexcept |
| returns true if sub result group with given name exists in named groups table | |
| _PCRE2CPP_CONSTEXPR17 bool | _has_sub_value (const size_t idx) const noexcept |
| returns true if sub result has value and idx wasn't out of bounds | |
| _PCRE2CPP_CONSTEXPR17 size_t | _get_named_sub_result_idx (const _string_view_type name) const _PCRE2CPP_NOEXCEPT |
| returns group index of group with given name | |
| _PCRE2CPP_CONSTEXPR17 const sub_match_value & | _get_sub_value (const size_t idx) const _PCRE2CPP_NOEXCEPT |
| returns sub value data of group with provided index | |
Static Private Member Functions | |
| static _PCRE2CPP_CONSTEXPR17 _string_view_type | _get_out_of_bounds_string () noexcept |
| returns out of bounds error in correct utf format | |
| static _PCRE2CPP_CONSTEXPR17 _string_type | _get_subexpression_not_found (const _string_view_type name) noexcept |
| returns subexpression not found error in correct utf format | |
Private Attributes | |
| std::variant< match_error_codes, _value_result_data > | _data = _value_result_data() |
| Result data. | |
Basic container to result data of match function.
| utf | UTF type |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
defaultnoexcept |
default constructor
|
inlineexplicitnoexcept |
constructor with error code
|
inlinenoexcept |
constructor with no value but also without error
|
inlinenoexcept |
constructor with good result
|
defaultnoexcept |
default copy constructor
|
defaultnoexcept |
default move constructor
|
defaultnoexcept |
default destructor
|
inlineprivate |
returns group index of group with given name
|
inlinestaticprivatenoexcept |
returns out of bounds error in correct utf format
|
inlineprivate |
returns sub value data of group with provided index
|
inlinestaticprivatenoexcept |
returns subexpression not found error in correct utf format
|
inlineprivatenoexcept |
returns true if sub result group with given name exists in named groups table
|
inlineprivatenoexcept |
returns true if sub result has value and idx wasn't out of bounds
|
inlinenoexcept |
return error code
|
inlinenoexcept |
returns error message
|
inlinenoexcept |
returns match result container
|
inlinenoexcept |
returns offset of value from the beginning of searched string
|
inlinenoexcept |
return offset relative to search offset
|
inlinenoexcept |
returns size of match value
|
inlinenoexcept |
returns match string value
|
inlinenoexcept |
returns search offset
|
inline |
returns sub result container
|
inline |
returns sub result container
|
inline |
returns sub result offset from the beginning of searched string
|
inline |
returns sub result offset from the beginning of searched string
|
inline |
returns sub result offset relative to result offset
|
inline |
returns sub result offset relative to result offset
|
inline |
returns sub result offset relative to search offset
|
inline |
returns sub result offset relative to search offset
|
inline |
returns sub result value size
|
inline |
returns sub result value size
|
inline |
returns sub result string value
|
inline |
returns sub result string value
|
inlinenoexcept |
returns all sub results
|
inlinenoexcept |
returns sub results count
|
inlinenoexcept |
returns sub results offsets from the beginning of search string
|
inlinenoexcept |
returns sub results offsets relative to result offset
|
inlinenoexcept |
returns sub results offsets relative to search offset
|
inlinenoexcept |
returns sub results value sizes
|
inlinenoexcept |
returns sub results string values
|
inlinenoexcept |
returns true if result holds error
|
inlinenoexcept |
returns true when result holds some result not error
|
inlinenoexcept |
returns true when result has sub value with given name
|
inlinenoexcept |
returns true when result has sub value on given index
|
inlinenoexcept |
returns true when result has value
|
defaultnoexcept |
default move assign operator
|
defaultnoexcept |
default copy assign operator
|
inline |
throws error if result holds error with error message based on error code
|
private |
Result data.
|
static |
error offset (returned when value doesn't exist or when error has occurred)