STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
match_results< _BidIt, _Alloc > Class Template Reference

Public Types

typedef match_results< _BidIt, _Alloc > _Myt
 
typedef sub_match< _BidIt > _Elem
 
typedef vector< _Elem, _Alloc > _MyCont
 
typedef allocator_traits< _Alloc > _Mytraits
 
typedef _Elem value_type
 
typedef const value_typeconst_reference
 
typedef const_reference reference
 
typedef _MyCont::const_iterator const_iterator
 
typedef const_iterator iterator
 
typedef _Mytraits::size_type size_type
 
typedef _Alloc allocator_type
 
typedef basic_string< char_type > string_type
 

Public Member Functions

typedef _REGEX_DIFFT (_BidIt) difference_type
 
typedef _REGEX_VALT (_BidIt) char_type
 
 match_results ()
 
 match_results (const _Alloc &_Al)
 
 match_results (const _Myt &_Right)
 
_Mytoperator= (const _Myt &_Right)
 
 match_results (_Myt &&_Right)
 
_Mytoperator= (_Myt &&_Right) _NOEXCEPT
 
bool ready () const
 
size_type size () const
 
size_type max_size () const
 
bool empty () const
 
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 end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
template<class _OutIt >
_OutIt _Format (_OutIt _Out, const char_type *_Fmt_begin, const char_type *_Fmt_end, regex_constants::match_flag_type _Flags) const
 
template<class _OutIt >
_OutIt format (_OutIt _Out, const char_type *_Fmt_begin, const char_type *_Fmt_end, regex_constants::match_flag_type _Flags=regex_constants::format_default) const
 
template<class _OutIt , class _Traits1 , class _Alloc1 >
_OutIt format (_OutIt _Out, const basic_string< char_type, _Traits1, _Alloc1 > &_Fmt, regex_constants::match_flag_type _Flags=regex_constants::format_default) const
 
template<class _Traits1 , class _Alloc1 >
basic_string< char_type, _Traits1, _Alloc1 > format (const basic_string< char_type, _Traits1, _Alloc1 > &_Fmt, regex_constants::match_flag_type _Flags=regex_constants::format_default) const
 
string_type format (const char_type *_Fmt_begin, regex_constants::match_flag_type _Flags=regex_constants::format_default) const
 
allocator_type get_allocator () const
 
void swap (match_results &_Right)
 
void _Resize (unsigned int _Nx)
 
_Elem_Pfx ()
 
_Elem_Sfx ()
 
_Elem_Null ()
 
_Elem_At (unsigned int _Sub)
 
_Elem _At (unsigned int _Sub) const
 

Public Attributes

_BidIt _Org
 
bool _Ready
 

Private Attributes

_MyCont _Matches
 
_Elem _Prefix
 
_Elem _Suffix
 
_Elem _Null_elem
 

Member Typedef Documentation

template<class _BidIt, class _Alloc>
typedef sub_match<_BidIt> match_results< _BidIt, _Alloc >::_Elem
template<class _BidIt, class _Alloc>
typedef vector<_Elem, _Alloc> match_results< _BidIt, _Alloc >::_MyCont
template<class _BidIt, class _Alloc>
typedef match_results<_BidIt, _Alloc> match_results< _BidIt, _Alloc >::_Myt
template<class _BidIt, class _Alloc>
typedef allocator_traits<_Alloc> match_results< _BidIt, _Alloc >::_Mytraits
template<class _BidIt, class _Alloc>
typedef _Alloc match_results< _BidIt, _Alloc >::allocator_type
template<class _BidIt, class _Alloc>
typedef _MyCont::const_iterator match_results< _BidIt, _Alloc >::const_iterator
template<class _BidIt, class _Alloc>
typedef const value_type& match_results< _BidIt, _Alloc >::const_reference
template<class _BidIt, class _Alloc>
typedef const_iterator match_results< _BidIt, _Alloc >::iterator
template<class _BidIt, class _Alloc>
typedef const_reference match_results< _BidIt, _Alloc >::reference
template<class _BidIt, class _Alloc>
typedef _Mytraits::size_type match_results< _BidIt, _Alloc >::size_type
template<class _BidIt, class _Alloc>
typedef basic_string<char_type> match_results< _BidIt, _Alloc >::string_type
template<class _BidIt, class _Alloc>
typedef _Elem match_results< _BidIt, _Alloc >::value_type

Constructor & Destructor Documentation

template<class _BidIt, class _Alloc>
match_results< _BidIt, _Alloc >::match_results ( )
inline
1082  : _Ready(false)
1083  { // construct empty match_results
1084  }
bool _Ready
Definition: regex:1418
template<class _BidIt, class _Alloc>
match_results< _BidIt, _Alloc >::match_results ( const _Alloc &  _Al)
inlineexplicit
1087  : _Ready(false),
1088  _Matches(_Al)
1089  { // construct empty match_results with allocator
1090  }
bool _Ready
Definition: regex:1418
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
match_results< _BidIt, _Alloc >::match_results ( const _Myt _Right)
inline
1093  : _Ready(_Right._Ready),
1094  _Org(_Right._Org),
1095  _Matches(_Right._Matches),
1096  _Prefix(_Right._Prefix),
1097  _Suffix(_Right._Suffix)
1098  { // construct by copying
1099  }
_Elem _Suffix
Definition: regex:1423
_BidIt _Org
Definition: regex:1417
_Elem _Prefix
Definition: regex:1422
bool _Ready
Definition: regex:1418
_MyCont _Matches
Definition: regex:1421
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt, class _Alloc>
match_results< _BidIt, _Alloc >::match_results ( _Myt &&  _Right)
inline
1112  : _Ready(_Right._Ready),
1113  _Org(_Right._Org),
1114  _Matches(_STD move(_Right._Matches)),
1115  _Prefix(_Right._Prefix),
1116  _Suffix(_Right._Suffix),
1117  _Null_elem(_Right._Null_elem)
1118  { // construct by moving _Right
1119  }
_Elem _Suffix
Definition: regex:1423
_BidIt _Org
Definition: regex:1417
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
_Elem _Prefix
Definition: regex:1422
bool _Ready
Definition: regex:1418
_Elem _Null_elem
Definition: regex:1424
_MyCont _Matches
Definition: regex:1421
const _Ty & _Right
Definition: algorithm:4087

Member Function Documentation

template<class _BidIt, class _Alloc>
_Elem& match_results< _BidIt, _Alloc >::_At ( unsigned int  _Sub)
inline
1408  { // unchecked access to element at _Sub
1409  return (_Matches[_Sub]);
1410  }
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
_Elem match_results< _BidIt, _Alloc >::_At ( unsigned int  _Sub) const
inline
1413  { // unchecked access to element at _Sub
1414  return (_Matches[_Sub]);
1415  }
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
template<class _OutIt >
_OutIt match_results< _BidIt, _Alloc >::_Format ( _OutIt  _Out,
const char_type *  _Fmt_begin,
const char_type *  _Fmt_end,
regex_constants::match_flag_type  _Flags 
) const
inline
1210  { // format text, replacing matches
1211  return (_Flags & regex_constants::format_sed
1212  ? _Format_sed(*this, _Out, _Fmt_begin, _Fmt_end, _Flags)
1213  : _Format_default(*this, _Out, _Fmt_begin, _Fmt_end, _Flags));
1214  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:169
_OutIt _Format_sed(const match_results< _BidIt, _Alloc > &_Match, _OutIt _Out, _InIt _First, _InIt _Last, regex_constants::match_flag_type _Flags=regex_constants::format_default)
Definition: regex:2636
_OutIt _Format_default(const match_results< _BidIt, _Alloc > &_Match, _OutIt _Out, _InIt _First, _InIt _Last, regex_constants::match_flag_type _Flags=regex_constants::format_default)
Definition: regex:2573
Definition: regex:165
template<class _BidIt, class _Alloc>
_Elem& match_results< _BidIt, _Alloc >::_Null ( )
inline
1403  { // return modifiable pair of iterators for null element
1404  return (_Null_elem);
1405  }
_Elem _Null_elem
Definition: regex:1424
template<class _BidIt, class _Alloc>
_Elem& match_results< _BidIt, _Alloc >::_Pfx ( )
inline
1393  { // return modifiable pair of iterators to prefix
1394  return (_Prefix);
1395  }
_Elem _Prefix
Definition: regex:1422
template<class _BidIt, class _Alloc>
typedef match_results< _BidIt, _Alloc >::_REGEX_DIFFT ( _BidIt  )
template<class _BidIt, class _Alloc>
typedef match_results< _BidIt, _Alloc >::_REGEX_VALT ( _BidIt  )
template<class _BidIt, class _Alloc>
void match_results< _BidIt, _Alloc >::_Resize ( unsigned int  _Nx)
inline
1388  { // allocate space for _Nx submatches
1389  _Matches.resize(_Nx);
1390  }
void resize(size_type _Newsize)
Definition: vector:1099
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
_Elem& match_results< _BidIt, _Alloc >::_Sfx ( )
inline
1398  { // return modifiable pair of iterators to suffix
1399  return (_Suffix);
1400  }
_Elem _Suffix
Definition: regex:1423
template<class _BidIt, class _Alloc>
const_iterator match_results< _BidIt, _Alloc >::begin ( ) const
inline
1186  { // return iterator for beginning of sequence of submatches
1187  return (_Matches.begin());
1188  }
iterator begin() _NOEXCEPT
Definition: vector:1023
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
const_iterator match_results< _BidIt, _Alloc >::cbegin ( ) const
inline
1196  { // return iterator for beginning of sequence of submatches
1197  return (_Matches.begin());
1198  }
iterator begin() _NOEXCEPT
Definition: vector:1023
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
const_iterator match_results< _BidIt, _Alloc >::cend ( ) const
inline
1201  { // return iterator for end of sequence of submatches
1202  return (_Matches.end());
1203  }
iterator end() _NOEXCEPT
Definition: vector:1033
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
bool match_results< _BidIt, _Alloc >::empty ( ) const
inline
1151  { // test if object is empty
1152  return (_Matches.empty());
1153  }
_MyCont _Matches
Definition: regex:1421
bool empty() const _NOEXCEPT
Definition: vector:1156
template<class _BidIt, class _Alloc>
const_iterator match_results< _BidIt, _Alloc >::end ( ) const
inline
1191  { // return iterator for end of sequence of submatches
1192  return (_Matches.end());
1193  }
iterator end() _NOEXCEPT
Definition: vector:1033
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
template<class _OutIt >
_OutIt match_results< _BidIt, _Alloc >::format ( _OutIt  _Out,
const char_type *  _Fmt_begin,
const char_type *  _Fmt_end,
regex_constants::match_flag_type  _Flags = regex_constants::format_default 
) const
inline
1223  { // format text, replacing matches
1224  return (_Rechecked(_Out,
1225  _Format(_Unchecked(_Out), _Fmt_begin, _Fmt_end, _Flags)));
1226  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:169
_Deque_const_iterator< _Mydeque > & _Rechecked(_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
Definition: deque:547
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
_OutIt _Format(_OutIt _Out, const char_type *_Fmt_begin, const char_type *_Fmt_end, regex_constants::match_flag_type _Flags) const
Definition: regex:1206
template<class _BidIt, class _Alloc>
template<class _OutIt , class _Traits1 , class _Alloc1 >
_OutIt match_results< _BidIt, _Alloc >::format ( _OutIt  _Out,
const basic_string< char_type, _Traits1, _Alloc1 > &  _Fmt,
regex_constants::match_flag_type  _Flags = regex_constants::format_default 
) const
inline
1288  { // format text, replacing matches
1290  _Unchecked(_Fmt.begin()), _Unchecked(_Fmt.end()), _Flags)));
1291  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:169
_Deque_const_iterator< _Mydeque > & _Rechecked(_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
Definition: deque:547
iterator end() _NOEXCEPT
Definition: xstring:1608
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
iterator begin() _NOEXCEPT
Definition: xstring:1598
_OutIt _Format(_OutIt _Out, const char_type *_Fmt_begin, const char_type *_Fmt_end, regex_constants::match_flag_type _Flags) const
Definition: regex:1206
template<class _BidIt, class _Alloc>
template<class _Traits1 , class _Alloc1 >
basic_string<char_type, _Traits1, _Alloc1> match_results< _BidIt, _Alloc >::format ( const basic_string< char_type, _Traits1, _Alloc1 > &  _Fmt,
regex_constants::match_flag_type  _Flags = regex_constants::format_default 
) const
inline
1355  { // format text, replacing matches
1357  format(_STD back_inserter(_Str),
1358  _Unchecked(_Fmt.begin()), _Unchecked(_Fmt.end()), _Flags);
1359  return (_Str);
1360  }
_OutIt format(_OutIt _Out, const char_type *_Fmt_begin, const char_type *_Fmt_end, regex_constants::match_flag_type _Flags=regex_constants::format_default) const
Definition: regex:1218
back_insert_iterator< _Container > back_inserter(_Container &_Cont)
Definition: iterator:69
iterator end() _NOEXCEPT
Definition: xstring:1608
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
iterator begin() _NOEXCEPT
Definition: xstring:1598
Definition: xstring:21
template<class _BidIt, class _Alloc>
string_type match_results< _BidIt, _Alloc >::format ( const char_type *  _Fmt_begin,
regex_constants::match_flag_type  _Flags = regex_constants::format_default 
) const
inline
1365  { // format text, replacing matches
1366  string_type _Fmt(_Fmt_begin);
1367  string_type _Str;
1368  format(_STD back_inserter(_Str),
1369  _Unchecked(_Fmt.begin()), _Unchecked(_Fmt.end()), _Flags);
1370  return (_Str);
1371  }
basic_string< char_type > string_type
Definition: regex:1079
_OutIt format(_OutIt _Out, const char_type *_Fmt_begin, const char_type *_Fmt_end, regex_constants::match_flag_type _Flags=regex_constants::format_default) const
Definition: regex:1218
back_insert_iterator< _Container > back_inserter(_Container &_Cont)
Definition: iterator:69
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
template<class _BidIt, class _Alloc>
allocator_type match_results< _BidIt, _Alloc >::get_allocator ( ) const
inline
1374  { // return allocator object for submatches
1375  return (_Matches.get_allocator());
1376  }
_Alloc get_allocator() const _NOEXCEPT
Definition: vector:1161
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
difference_type match_results< _BidIt, _Alloc >::length ( size_type  _Sub = 0) const
inline
1156  { // return length of capture group _Sub
1157  return ((*this)[_Sub].length());
1158  }
difference_type length(size_type _Sub=0) const
Definition: regex:1155
template<class _BidIt, class _Alloc>
size_type match_results< _BidIt, _Alloc >::max_size ( ) const
inline
1146  { // return maximum possible number of capture groups
1147  return (_Matches.max_size());
1148  }
size_type max_size() const _NOEXCEPT
Definition: vector:1151
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
_Myt& match_results< _BidIt, _Alloc >::operator= ( const _Myt _Right)
inline
1102  { // assign
1103  _Ready = _Right._Ready;
1104  _Org = _Right._Org;
1105  _Matches = _Right._Matches;
1106  _Prefix = _Right._Prefix;
1107  _Suffix = _Right._Suffix;
1108  return (*this);
1109  }
_Elem _Suffix
Definition: regex:1423
_BidIt _Org
Definition: regex:1417
_Elem _Prefix
Definition: regex:1422
bool _Ready
Definition: regex:1418
_MyCont _Matches
Definition: regex:1421
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt, class _Alloc>
_Myt& match_results< _BidIt, _Alloc >::operator= ( _Myt &&  _Right)
inline
1122  { // assign by moving _Right
1123  if (this != &_Right)
1124  { // clear this and steal from _Right
1125  _Ready = _Right._Ready;
1126  _Org = _Right._Org;
1127  _Matches = _STD move(_Right._Matches);
1128  _Prefix = _Right._Prefix;
1129  _Suffix = _Right._Suffix;
1130  _Null_elem = _Right._Null_elem;
1131  }
1132  return (*this);
1133  }
_Elem _Suffix
Definition: regex:1423
_BidIt _Org
Definition: regex:1417
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
_Elem _Prefix
Definition: regex:1422
bool _Ready
Definition: regex:1418
_Elem _Null_elem
Definition: regex:1424
_MyCont _Matches
Definition: regex:1421
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt, class _Alloc>
const_reference match_results< _BidIt, _Alloc >::operator[] ( size_type  _Sub) const
inline
1171  { // return submatch _Sub
1172  return (_Matches.size() <= _Sub ? _Null_elem : _Matches[_Sub]);
1173  }
size_type size() const _NOEXCEPT
Definition: vector:1146
_Elem _Null_elem
Definition: regex:1424
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
difference_type match_results< _BidIt, _Alloc >::position ( size_type  _Sub = 0) const
inline
1161  { // return offset of submatch _Sub
1162  return (_STD distance(_Org, (*this)[_Sub].first));
1163  }
_BidIt _Org
Definition: regex:1417
iterator_traits< _InIt >::difference_type distance(_InIt _First, _InIt _Last)
Definition: xutility:755
template<class _BidIt, class _Alloc>
const_reference match_results< _BidIt, _Alloc >::prefix ( ) const
inline
1176  { // return text preceding match
1177  return (_Prefix);
1178  }
_Elem _Prefix
Definition: regex:1422
template<class _BidIt, class _Alloc>
bool match_results< _BidIt, _Alloc >::ready ( ) const
inline
1136  { // test if ready
1137  return (_Ready);
1138  }
bool _Ready
Definition: regex:1418
template<class _BidIt, class _Alloc>
size_type match_results< _BidIt, _Alloc >::size ( ) const
inline
1141  { // return number of capture groups
1142  return (_Matches.size());
1143  }
size_type size() const _NOEXCEPT
Definition: vector:1146
_MyCont _Matches
Definition: regex:1421
template<class _BidIt, class _Alloc>
string_type match_results< _BidIt, _Alloc >::str ( size_type  _Sub = 0) const
inline
1166  { // return contents of submatch _Sub
1167  return (string_type((*this)[_Sub]));
1168  }
basic_string< char_type > string_type
Definition: regex:1079
template<class _BidIt, class _Alloc>
const_reference match_results< _BidIt, _Alloc >::suffix ( ) const
inline
1181  { // return text following match
1182  return (_Suffix);
1183  }
_Elem _Suffix
Definition: regex:1423
template<class _BidIt, class _Alloc>
void match_results< _BidIt, _Alloc >::swap ( match_results< _BidIt, _Alloc > &  _Right)
inline
1379  { // exchange contents with _Right
1380  _STD swap(_Ready, _Right._Ready);
1381  _Swap_adl(_Org, _Right._Org);
1382  _Matches.swap(_Right._Matches);
1383  _STD swap(_Prefix, _Right._Prefix);
1384  _STD swap(_Suffix, _Right._Suffix);
1385  }
_Elem _Suffix
Definition: regex:1423
_BidIt _Org
Definition: regex:1417
void swap(_Myt &_Right)
Definition: vector:1513
_Elem _Prefix
Definition: regex:1422
void swap(match_results &_Right)
Definition: regex:1378
bool _Ready
Definition: regex:1418
_MyCont _Matches
Definition: regex:1421

Member Data Documentation

template<class _BidIt, class _Alloc>
_MyCont match_results< _BidIt, _Alloc >::_Matches
private
template<class _BidIt, class _Alloc>
_Elem match_results< _BidIt, _Alloc >::_Null_elem
private
template<class _BidIt, class _Alloc>
_BidIt match_results< _BidIt, _Alloc >::_Org
template<class _BidIt, class _Alloc>
_Elem match_results< _BidIt, _Alloc >::_Prefix
private
template<class _BidIt, class _Alloc>
bool match_results< _BidIt, _Alloc >::_Ready
template<class _BidIt, class _Alloc>
_Elem match_results< _BidIt, _Alloc >::_Suffix
private

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