PCRE2 C++ Wrapper 1.2.4
pcre2cpp
Loading...
Searching...
No Matches
pcre2cpp::basic_match_result< utf > Class Template Reference

Basic container to result data of match function. More...

#include <pcre2cpp.hpp>

Inheritance diagram for pcre2cpp::basic_match_result< utf >:
[legend]
Collaboration diagram for pcre2cpp::basic_match_result< utf >:
[legend]

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) 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) 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_resultoperator= (const basic_match_result &other) noexcept=default
 default copy assign operator
_PCRE2CPP_CONSTEXPR17 basic_match_resultoperator= (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 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)

Detailed Description

template<utf_type utf>
class pcre2cpp::basic_match_result< utf >

Basic container to result data of match function.

Template Parameters
utfUTF type

Constructor & Destructor Documentation

◆ basic_match_result() [1/6]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 pcre2cpp::basic_match_result< utf >::basic_match_result ( )
defaultnoexcept

default constructor

◆ basic_match_result() [2/6]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 pcre2cpp::basic_match_result< utf >::basic_match_result ( const match_error_codes error_code)
inlineexplicitnoexcept

constructor with error code

◆ basic_match_result() [3/6]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 pcre2cpp::basic_match_result< utf >::basic_match_result ( const size_t search_offset,
const _named_sub_values_table_ptr & named_sub_values )
inlinenoexcept

constructor with no value but also without error

◆ basic_match_result() [4/6]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 pcre2cpp::basic_match_result< utf >::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 )
inlinenoexcept

constructor with good result

◆ basic_match_result() [5/6]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 pcre2cpp::basic_match_result< utf >::basic_match_result ( const basic_match_result< utf > & other)
defaultnoexcept

default copy constructor

◆ basic_match_result() [6/6]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 pcre2cpp::basic_match_result< utf >::basic_match_result ( basic_match_result< utf > && other)
defaultnoexcept

default move constructor

◆ ~basic_match_result()

default destructor

Member Function Documentation

◆ get_error_code()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 match_error_codes pcre2cpp::basic_match_result< utf >::get_error_code ( ) const
inlinenoexcept

return error code

◆ get_error_message()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 _string_type pcre2cpp::basic_match_result< utf >::get_error_message ( ) const
inlinenoexcept

returns error message

◆ get_result()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 _match_value pcre2cpp::basic_match_result< utf >::get_result ( ) const
inlinenoexcept

returns match result container

◆ get_result_global_offset()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_result_global_offset ( ) const
inlinenoexcept

returns offset of value from the beginning of searched string

◆ get_result_relative_offset()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_result_relative_offset ( ) const
inlinenoexcept

return offset relative to search offset

◆ get_result_size()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_result_size ( ) const
inlinenoexcept

returns size of match value

◆ get_result_value()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 _string_type pcre2cpp::basic_match_result< utf >::get_result_value ( ) const
inlinenoexcept

returns match string value

◆ get_search_offset()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_search_offset ( ) const
inlinenoexcept

returns search offset

◆ get_sub_result() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 sub_match_value pcre2cpp::basic_match_result< utf >::get_sub_result ( const _string_view_type name) const
inline

returns sub result container

◆ get_sub_result() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 sub_match_value pcre2cpp::basic_match_result< utf >::get_sub_result ( const size_t idx) const
inline

returns sub result container

◆ get_sub_result_global_offset() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_global_offset ( const _string_view_type name) const
inline

returns sub result offset from the beginning of searched string

◆ get_sub_result_global_offset() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_global_offset ( const size_t idx) const
inline

returns sub result offset from the beginning of searched string

◆ get_sub_result_in_result_offset() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_in_result_offset ( const _string_view_type name) const
inline

returns sub result offset relative to result offset

◆ get_sub_result_in_result_offset() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_in_result_offset ( const size_t idx) const
inline

returns sub result offset relative to result offset

◆ get_sub_result_relative_offset() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_relative_offset ( const _string_view_type name) const
inline

returns sub result offset relative to search offset

◆ get_sub_result_relative_offset() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_relative_offset ( const size_t idx) const
inline

returns sub result offset relative to search offset

◆ get_sub_result_size() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_size ( const _string_view_type name) const
inline

returns sub result value size

◆ get_sub_result_size() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_result_size ( const size_t idx) const
inline

returns sub result value size

◆ get_sub_result_value() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 _string_type pcre2cpp::basic_match_result< utf >::get_sub_result_value ( const _string_view_type name) const
inline

returns sub result string value

◆ get_sub_result_value() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 _string_type pcre2cpp::basic_match_result< utf >::get_sub_result_value ( const size_t idx) const
inline

returns sub result string value

◆ get_sub_results()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR20 std::vector< std::optional< sub_match_value > > pcre2cpp::basic_match_result< utf >::get_sub_results ( ) const
inlinenoexcept

returns all sub results

◆ get_sub_results_count()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::get_sub_results_count ( ) const
inlinenoexcept

returns sub results count

◆ get_sub_results_global_offsets()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > pcre2cpp::basic_match_result< utf >::get_sub_results_global_offsets ( ) const
inlinenoexcept

returns sub results offsets from the beginning of search string

◆ get_sub_results_in_result_offsets()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > pcre2cpp::basic_match_result< utf >::get_sub_results_in_result_offsets ( ) const
inlinenoexcept

returns sub results offsets relative to result offset

◆ get_sub_results_relative_offsets()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > pcre2cpp::basic_match_result< utf >::get_sub_results_relative_offsets ( ) const
inlinenoexcept

returns sub results offsets relative to search offset

◆ get_sub_results_sizes()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > pcre2cpp::basic_match_result< utf >::get_sub_results_sizes ( ) const
inlinenoexcept

returns sub results value sizes

◆ get_sub_results_values()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 std::vector< _string_type > pcre2cpp::basic_match_result< utf >::get_sub_results_values ( ) const
inlinenoexcept

returns sub results string values

◆ has_error()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 bool pcre2cpp::basic_match_result< utf >::has_error ( ) const
inlinenoexcept

returns true if result holds error

◆ has_result()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 bool pcre2cpp::basic_match_result< utf >::has_result ( ) const
inlinenoexcept

returns true when result holds some result not error

◆ has_sub_value() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 bool pcre2cpp::basic_match_result< utf >::has_sub_value ( const _string_view_type name) const
inlinenoexcept

returns true when result has sub value with given name

◆ has_sub_value() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 bool pcre2cpp::basic_match_result< utf >::has_sub_value ( const size_t idx) const
inlinenoexcept

returns true when result has sub value on given index

◆ has_value()

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 bool pcre2cpp::basic_match_result< utf >::has_value ( ) const
inlinenoexcept

returns true when result has value

◆ operator=() [1/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 basic_match_result & pcre2cpp::basic_match_result< utf >::operator= ( basic_match_result< utf > && other)
defaultnoexcept

default move assign operator

◆ operator=() [2/2]

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 basic_match_result & pcre2cpp::basic_match_result< utf >::operator= ( const basic_match_result< utf > & other)
defaultnoexcept

default copy assign operator

Member Data Documentation

◆ bad_offset

template<utf_type utf>
_PCRE2CPP_CONSTEXPR17 size_t pcre2cpp::basic_match_result< utf >::bad_offset = std::numeric_limits<size_t>::max()
static

error offset (returned when value doesn't exist or when error has occurred)


The documentation for this class was generated from the following file: