libstdc++
|
Public Member Functions | |
template<typename _Out_iter > | |
_Out_iter | format (_Out_iter __out, const match_results< _Bi_iter, _Alloc >::char_type *__fmt_first, const match_results< _Bi_iter, _Alloc >::char_type *__fmt_last, match_flag_type __flags) const |
bool | ready () const |
Private Types | |
typedef _Alloc_traits::const_pointer | const_pointer |
typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
typedef _Base::pointer | pointer |
typedef std::reverse_iterator < iterator > | reverse_iterator |
Private Member Functions | |
pointer | _M_allocate (size_t __n) |
pointer | _M_allocate_and_copy (size_type __n, _ForwardIterator __first, _ForwardIterator __last) |
void | _M_assign_aux (_InputIterator __first, _InputIterator __last, std::input_iterator_tag) |
void | _M_assign_aux (_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) |
void | _M_assign_dispatch (_Integer __n, _Integer __val, __true_type) |
void | _M_assign_dispatch (_InputIterator __first, _InputIterator __last, __false_type) |
size_type | _M_check_len (size_type __n, const char *__s) const |
void | _M_deallocate (pointer __p, size_t __n) |
void | _M_default_append (size_type __n) |
void | _M_default_initialize (size_type __n) |
void | _M_emplace_back_aux (_Args &&...__args) |
iterator | _M_erase (iterator __position) |
iterator | _M_erase (iterator __first, iterator __last) |
void | _M_erase_at_end (pointer __pos) noexcept |
void | _M_fill_assign (size_type __n, const value_type &__val) |
void | _M_fill_initialize (size_type __n, const value_type &__value) |
void | _M_fill_insert (iterator __pos, size_type __n, const value_type &__x) |
_Tp_alloc_type & | _M_get_Tp_allocator () noexcept |
const _Tp_alloc_type & | _M_get_Tp_allocator () const noexcept |
void | _M_initialize_dispatch (_Integer __n, _Integer __value, __true_type) |
void | _M_initialize_dispatch (_InputIterator __first, _InputIterator __last, __false_type) |
void | _M_insert_aux (iterator __position, _Args &&...__args) |
void | _M_insert_dispatch (iterator __pos, _Integer __n, _Integer __val, __true_type) |
void | _M_insert_dispatch (iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) |
void | _M_range_check (size_type __n) const |
void | _M_range_initialize (_InputIterator __first, _InputIterator __last, std::input_iterator_tag) |
void | _M_range_initialize (_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) |
void | _M_range_insert (iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) |
void | _M_range_insert (iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) |
bool | _M_shrink_to_fit () |
void | assign (size_type __n, const value_type &__val) |
void | assign (_InputIterator __first, _InputIterator __last) |
void | assign (initializer_list< value_type > __l) |
reference | at (size_type __n) |
const_reference | at (size_type __n) const |
reference | back () noexcept |
const_reference | back () const noexcept |
iterator | begin () noexcept |
size_type | capacity () const noexcept |
void | clear () noexcept |
const_reverse_iterator | crbegin () const noexcept |
const_reverse_iterator | crend () const noexcept |
sub_match< _Bi_iter > * | data () noexcept |
const sub_match< _Bi_iter > * | data () const noexcept |
iterator | emplace (const_iterator __position, _Args &&...__args) |
void | emplace_back (_Args &&...__args) |
iterator | end () noexcept |
iterator | erase (const_iterator __position) |
iterator | erase (const_iterator __first, const_iterator __last) |
reference | front () noexcept |
const_reference | front () const noexcept |
iterator | insert (const_iterator __position, const value_type &__x) |
iterator | insert (const_iterator __position, value_type &&__x) |
iterator | insert (const_iterator __position, initializer_list< value_type > __l) |
iterator | insert (const_iterator __position, size_type __n, const value_type &__x) |
iterator | insert (const_iterator __position, _InputIterator __first, _InputIterator __last) |
reference | operator[] (size_type __n) noexcept |
const_reference | operator[] (size_type __n) const noexcept |
void | pop_back () noexcept |
void | push_back (const value_type &__x) |
void | push_back (value_type &&__x) |
reverse_iterator | rbegin () noexcept |
const_reverse_iterator | rbegin () const noexcept |
reverse_iterator | rend () noexcept |
const_reverse_iterator | rend () const noexcept |
void | reserve (size_type __n) |
void | resize (size_type __new_size) |
void | resize (size_type __new_size, const value_type &__x) |
void | shrink_to_fit () |
void | swap (vector &__x) noexcept(_Alloc_traits |
Private Attributes | |
_Vector_impl | _M_impl |
Friends | |
template<typename _Bp , typename _Ap , typename _Cp , typename _Rp , __detail::_RegexExecutorPolicy , bool > | |
bool | __detail::__regex_algo_impl (_Bp, _Bp, match_results< _Bp, _Ap > &, const basic_regex< _Cp, _Rp > &, regex_constants::match_flag_type) |
class | __detail::_Executor |
class | regex_iterator |
10.? Public Types | |
typedef sub_match< _Bi_iter > | value_type |
typedef const value_type & | const_reference |
typedef const_reference | reference |
typedef _Base_type::const_iterator | const_iterator |
typedef const_iterator | iterator |
typedef __iter_traits::difference_type | difference_type |
typedef allocator_traits < _Alloc >::size_type | size_type |
typedef _Alloc | allocator_type |
typedef __iter_traits::value_type | char_type |
typedef std::basic_string < char_type > | string_type |
28.10.1 Construction, Copying, and Destruction | |
match_results (const _Alloc &__a=_Alloc()) | |
match_results (const match_results &__rhs) | |
match_results (match_results &&__rhs) noexcept | |
match_results & | operator= (const match_results &__rhs) |
match_results & | operator= (match_results &&__rhs) |
~match_results () | |
28.10.2 Size | |
size_type | size () const |
size_type | max_size () const |
bool | empty () const |
10.3 Element Access | |
difference_type | length (size_type __sub=0) const |
difference_type | position (size_type __sub=0) const |
string_type | str (size_type __sub=0) const |
const_reference | operator[] (size_type __sub) const |
const_reference | prefix () const |
const_reference | suffix () const |
const_iterator | begin () const |
const_iterator | cbegin () const |
const_iterator | end () const |
const_iterator | cend () const |
10.4 Formatting | |
These functions perform formatted substitution of the matched character sequences into their target. The format specifiers and escape sequences accepted by these functions are determined by their | |
template<typename _Out_iter > | |
_Out_iter | format (_Out_iter __out, const char_type *__fmt_first, const char_type *__fmt_last, match_flag_type __flags=regex_constants::format_default) const |
template<typename _Out_iter , typename _St , typename _Sa > | |
_Out_iter | format (_Out_iter __out, const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const |
template<typename _St , typename _Sa > | |
basic_string< char_type, _St, _Sa > | format (const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const |
string_type | format (const char_type *__fmt, match_flag_type __flags=regex_constants::format_default) const |
10.5 Allocator | |
allocator_type | get_allocator () const |
10.6 Swap | |
void | swap (match_results &__that) |
The results of a match or search operation.
A collection of character sequences representing the result of a regular expression match. Storage for the collection is allocated and freed as necessary by the member functions of class template match_results.
This class satisfies the Sequence requirements, with the exception that only the operations defined for a const-qualified Sequence are supported.
The sub_match object stored at index 0 represents sub-expression 0, i.e. the whole match. In this case the sub_match member matched is always true. The sub_match object stored at index n denotes what matched the marked sub-expression n within the matched expression. If the sub-expression n participated in a regular expression match then the sub_match member matched evaluates to true, and members first and second denote the range of characters [first, second) which formed that match. Otherwise matched is false, and members first and second point to the end of the sequence that was searched.
std::match_results< _Bi_iter, _Alloc >::match_results | ( | const _Alloc & | __a = _Alloc() | ) | [inline, explicit] |
std::match_results< _Bi_iter, _Alloc >::match_results | ( | const match_results< _Bi_iter, _Alloc > & | __rhs | ) |
Copy constructs a match_results.
std::match_results< _Bi_iter, _Alloc >::match_results | ( | match_results< _Bi_iter, _Alloc > && | __rhs | ) |
Move constructs a match_results.
std::match_results< _Bi_iter, _Alloc >::~match_results | ( | ) | [inline] |
const_iterator std::match_results< _Bi_iter, _Alloc >::begin | ( | ) | const [inline] |
Gets an iterator to the start of the sub_match collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Alloc >.
Definition at line 1736 of file regex.h.
Referenced by std::match_results< _Bi_iter >::cbegin(), and std::operator==().
const_iterator std::match_results< _Bi_iter, _Alloc >::cbegin | ( | ) | const [inline] |
Gets an iterator to the start of the sub_match collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Alloc >.
const_iterator std::match_results< _Bi_iter, _Alloc >::cend | ( | ) | const [inline] |
Gets an iterator to one-past-the-end of the collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Alloc >.
bool std::match_results< _Bi_iter, _Alloc >::empty | ( | ) | const [inline] |
Indicates if the match_results contains no results.
true | The match_results object is empty. |
false | The match_results object is not empty. |
Reimplemented from std::vector< sub_match< _Bi_iter >, _Alloc >.
Definition at line 1632 of file regex.h.
Referenced by std::operator==(), std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator==(), std::match_results< _Bi_iter >::prefix(), and std::match_results< _Bi_iter >::suffix().
const_iterator std::match_results< _Bi_iter, _Alloc >::end | ( | ) | const [inline] |
Gets an iterator to one-past-the-end of the collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Alloc >.
Definition at line 1750 of file regex.h.
Referenced by std::match_results< _Bi_iter >::cend(), and std::operator==().
_Out_iter std::match_results< _Bi_iter, _Alloc >::format | ( | _Out_iter | __out, |
const char_type * | __fmt_first, | ||
const char_type * | __fmt_last, | ||
match_flag_type | __flags = regex_constants::format_default |
||
) | const |
Referenced by std::match_results< _Bi_iter >::format().
_Out_iter std::match_results< _Bi_iter, _Alloc >::format | ( | _Out_iter | __out, |
const basic_string< char_type, _St, _Sa > & | __fmt, | ||
match_flag_type | __flags = regex_constants::format_default |
||
) | const [inline] |
basic_string<char_type, _St, _Sa> std::match_results< _Bi_iter, _Alloc >::format | ( | const basic_string< char_type, _St, _Sa > & | __fmt, |
match_flag_type | __flags = regex_constants::format_default |
||
) | const [inline] |
string_type std::match_results< _Bi_iter, _Alloc >::format | ( | const char_type * | __fmt, |
match_flag_type | __flags = regex_constants::format_default |
||
) | const [inline] |
allocator_type std::match_results< _Bi_iter, _Alloc >::get_allocator | ( | ) | const [inline] |
Gets a copy of the allocator.
Reimplemented from std::_Vector_base< sub_match< _Bi_iter >, _Alloc >.
difference_type std::match_results< _Bi_iter, _Alloc >::length | ( | size_type | __sub = 0 | ) | const [inline] |
size_type std::match_results< _Bi_iter, _Alloc >::max_size | ( | ) | const [inline] |
Gets the number of matches and submatches.
The number of matches for a given regular expression will be either 0 if there was no match or mark_count() + 1 if a match was successful. Some matches may be empty.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Alloc >.
match_results& std::match_results< _Bi_iter, _Alloc >::operator= | ( | const match_results< _Bi_iter, _Alloc > & | __rhs | ) |
Assigns rhs to *this.
match_results& std::match_results< _Bi_iter, _Alloc >::operator= | ( | match_results< _Bi_iter, _Alloc > && | __rhs | ) |
Move-assigns rhs to *this.
const_reference std::match_results< _Bi_iter, _Alloc >::operator[] | ( | size_type | __sub | ) | const [inline] |
Gets a sub_match reference for the match or submatch.
__sub | indicates the submatch. |
This function gets a reference to the indicated submatch, or the entire match if __sub
is zero.
If __sub
>= size() then this function returns a sub_match with a special value indicating no submatch.
difference_type std::match_results< _Bi_iter, _Alloc >::position | ( | size_type | __sub = 0 | ) | const [inline] |
Gets the offset of the beginning of the indicated submatch.
__sub | indicates the submatch. |
This function returns the offset from the beginning of the target sequence to the beginning of the submatch, unless the value of __sub
is zero (the default), in which case this function returns the offset from the beginning of the target sequence to the beginning of the match.
const_reference std::match_results< _Bi_iter, _Alloc >::prefix | ( | ) | const [inline] |
Gets a sub_match representing the match prefix.
This function gets a reference to a sub_match object representing the part of the target range between the start of the target range and the start of the match.
Definition at line 1711 of file regex.h.
Referenced by std::operator==().
bool std::match_results< _Bi_iter, _Alloc >::ready | ( | ) | const [inline] |
Indicates if the match_results is ready.
true | The object has a fully-established result state. |
false | The object is not ready. |
Definition at line 1602 of file regex.h.
Referenced by std::operator==(), std::match_results< _Bi_iter >::operator[](), std::match_results< _Bi_iter >::prefix(), and std::match_results< _Bi_iter >::suffix().
size_type std::match_results< _Bi_iter, _Alloc >::size | ( | ) | const [inline] |
Gets the number of matches and submatches.
The number of matches for a given regular expression will be either 0 if there was no match or mark_count() + 1 if a match was successful. Some matches may be empty.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Alloc >.
Definition at line 1619 of file regex.h.
Referenced by std::match_results< _Bi_iter >::empty(), std::operator==(), and std::match_results< _Bi_iter >::operator[]().
string_type std::match_results< _Bi_iter, _Alloc >::str | ( | size_type | __sub = 0 | ) | const [inline] |
Gets the match or submatch converted to a string type.
__sub | indicates the submatch. |
This function gets the submatch (or match, if __sub
is zero) extracted from the target range and converted to the associated string type.
const_reference std::match_results< _Bi_iter, _Alloc >::suffix | ( | ) | const [inline] |
Gets a sub_match representing the match suffix.
This function gets a reference to a sub_match object representing the part of the target range between the end of the match and the end of the target range.
Definition at line 1726 of file regex.h.
Referenced by std::operator==().
void std::match_results< _Bi_iter, _Alloc >::swap | ( | match_results< _Bi_iter, _Alloc > & | __that | ) | [inline] |
Swaps the contents of two match_results.
Definition at line 1846 of file regex.h.
Referenced by std::match_results< _Bi_iter >::swap(), and std::swap().