std::match_results< _Bi_iter, _Allocator >(3cxx) | std::match_results< _Bi_iter, _Allocator >(3cxx) |
NAME¶
std::match_results< _Bi_iter, _Allocator > -SYNOPSIS¶
Inherits std::vector< sub_match< _Bi_iter >, _Allocator >.Public Member Functions¶
bool ready () const
Private Types¶
typedef
Private Member Functions¶
pointer _M_allocate (size_t __n)
Private Attributes¶
_Vector_impl _M_impl
Friends¶
class __regex::_SpecializedResults< _Bi_iter, _Allocator >
10.? Public Types¶
typedef sub_match< _Bi_iter > value_type
28.10.1 Construction, Copying, and Destruction¶
match_results (const _Allocator &__a=_Allocator())
28.10.2 Size¶
size_type size () const
10.3 Element Access¶
difference_type length (size_type __sub=0) 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 flags parameter as documented above.template<typename _Out_iter > _Out_iter format (_Out_iter __out, const char_type *__fmt_first, const char_type *__fmt_last, regex_constants::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)
Detailed Description¶
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>class std::match_results< _Bi_iter, _Allocator >¶
The results of a match or search operation.Constructor & Destructor Documentation¶
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> std::match_results< _Bi_iter, _Allocator >:: match_results (const _Allocator &__a = _Allocator()) [inline], [explicit]¶
Constructs a default match_results container. Postcondition:size() returns 0 and str()
returns an empty string.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> std::match_results< _Bi_iter, _Allocator >:: match_results (const match_results< _Bi_iter, _Allocator > &__rhs) [inline]¶
Copy constructs a match_results. Definition at line 1519 of file regex.h.template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> std::match_results< _Bi_iter, _Allocator >:: match_results (match_results< _Bi_iter, _Allocator > &&__rhs) [inline], [noexcept]¶
Move constructs a match_results. Definition at line 1526 of file regex.h.template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> std::match_results< _Bi_iter, _Allocator >::~ match_results () [inline]¶
Destroys a match_results object. Definition at line 1553 of file regex.h.Member Function Documentation¶
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> const_iterator std::match_results< _Bi_iter, _Allocator >::begin () const [inline]¶
Gets an iterator to the start of the sub_match collection. Definition at line 1710 of file regex.h. Referenced by std::operator==().template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> const_iterator std::match_results< _Bi_iter, _Allocator >::cbegin () const [inline]¶
Gets an iterator to the start of the sub_match collection. Definition at line 1717 of file regex.h.template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> const_iterator std::match_results< _Bi_iter, _Allocator >::cend () const [inline]¶
Gets an iterator to one-past-the-end of the collection. Definition at line 1731 of file regex.h.template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> bool std::match_results< _Bi_iter, _Allocator >::empty () const [inline]¶
Indicates if the match_results contains no results. Return values:true The match_results object is empty.
false The match_results object is not empty.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> const_iterator std::match_results< _Bi_iter, _Allocator >::end () const [inline]¶
Gets an iterator to one-past-the-end of the collection. Definition at line 1724 of file regex.h. Referenced by std::match_results< _FwdIterT, _Alloc >::cend(), and std::operator==().template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> template<typename _Out_iter > _Out_iter std::match_results< _Bi_iter, _Allocator >::format (_Out_iter__out, const char_type *__fmt_first, const char_type *__fmt_last, regex_constants::match_flag_type__flags = regex_constants::format_default ) const [inline]¶
Precondition:ready() == true
Todo
Implement this function.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> template<typename _Out_iter , typename _St , typename _Sa > _Out_iter std::match_results< _Bi_iter, _Allocator >::format (_Out_iter__out, const basic_string< char_type, _St, _Sa > &__fmt, regex_constants::match_flag_type__flags = regex_constants::format_default ) const [inline]¶
Precondition:ready() == true
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> template<typename _Out_iter , typename _St , typename _Sa > basic_string<char_type, _St, _Sa> std::match_results< _Bi_iter, _Allocator >::format (const basic_string< char_type, _St, _Sa > &__fmt, regex_constants::match_flag_type__flags = regex_constants::format_default ) const [inline]¶
Precondition:ready() == true
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> string_type std::match_results< _Bi_iter, _Allocator >::format (const char_type *__fmt, regex_constants::match_flag_type__flags = regex_constants::format_default ) const [inline]¶
Precondition:ready() == true
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> allocator_type std::match_results< _Bi_iter, _Allocator >::get_allocator () const [inline]¶
Gets a copy of the allocator. Definition at line 1811 of file regex.h.template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> difference_type std::match_results< _Bi_iter, _Allocator >::length (size_type__sub = 0) const [inline]¶
Gets the length of the indicated submatch. Parameters:__sub indicates the submatch.
Precondition:
ready() == true
This function returns the length of the indicated submatch, or the length of the
entire match if __sub is zero (the default).
Definition at line 1616 of file regex.h.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> size_type std::match_results< _Bi_iter, _Allocator >::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. Returns:the number of matches found.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> match_results& std::match_results< _Bi_iter, _Allocator >::operator= (const match_results< _Bi_iter, _Allocator > &__rhs) [inline]¶
Assigns rhs to *this. Definition at line 1534 of file regex.h.template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> match_results& std::match_results< _Bi_iter, _Allocator >::operator= ( match_results< _Bi_iter, _Allocator > &&__rhs) [inline]¶
Move-assigns rhs to *this. Definition at line 1544 of file regex.h.template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> const_reference std::match_results< _Bi_iter, _Allocator >::operator[] (size_type__sub) const [inline]¶
Gets a sub_match reference for the match or submatch. Parameters:__sub indicates the submatch.
Precondition:
ready() == true
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.
Definition at line 1664 of file regex.h.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> difference_type std::match_results< _Bi_iter, _Allocator >::position (size_type__sub = 0) const [inline]¶
Gets the offset of the beginning of the indicated submatch. Parameters:__sub indicates the submatch.
Precondition:
ready() == true
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.
Returns -1 if __sub is out of range.
Definition at line 1633 of file regex.h.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> const_reference std::match_results< _Bi_iter, _Allocator >::prefix () const [inline]¶
Gets a sub_match representing the match prefix. Precondition:ready() == true
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 1681 of file regex.h.
Referenced by std::operator==(), and std::match_results< _FwdIterT, _Alloc
>::position().
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> bool std::match_results< _Bi_iter, _Allocator >::ready () const [inline]¶
Indicates if the match_results is ready. Return values:true The object has a fully-established
result state.
false The object is not ready.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> size_type std::match_results< _Bi_iter, _Allocator >::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. Returns:the number of matches found.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> string_type std::match_results< _Bi_iter, _Allocator >::str (size_type__sub = 0) const [inline]¶
Gets the match or submatch converted to a string type. Parameters:__sub indicates the submatch.
Precondition:
ready() == true
This function gets the submatch (or match, if __sub is zero) extracted from the
target range and converted to the associated string type.
Definition at line 1649 of file regex.h.
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> const_reference std::match_results< _Bi_iter, _Allocator >::suffix () const [inline]¶
Gets a sub_match representing the match suffix. Precondition:ready() == true
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 1698 of file regex.h.
Referenced by std::operator==().
template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >> void std::match_results< _Bi_iter, _Allocator >::swap ( match_results< _Bi_iter, _Allocator > &__that) [inline]¶
Swaps the contents of two match_results. Definition at line 1825 of file regex.h. Referenced by std::swap().Author¶
Generated automatically by Doxygen for libstdc++ from the source code.Sun Jan 6 2013 | libstdc++ |