STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
sub_match< _BidIt > Class Template Reference
Inheritance diagram for sub_match< _BidIt >:
pair< _BidIt, _BidIt >

Public Types

typedef pair< _BidIt, _BidIt > _Mybase
 
typedef iterator_traits< _BidIt >::value_type value_type
 
typedef iterator_traits< _BidIt >::difference_type difference_type
 
typedef _BidIt iterator
 
typedef basic_string< value_typestring_type
 
typedef string_type::traits_type _Traits
 
typedef string_type::size_type _Size_type
 
- Public Types inherited from pair< _BidIt, _BidIt >
typedef pair< _BidIt, _BidIt > _Myt
 
typedef _BidIt first_type
 
typedef _BidIt second_type
 

Public Member Functions

constexpr sub_match ()
 
difference_type length () const
 
 operator string_type () const
 
string_type str () const
 
int compare (const sub_match &_Right) const
 
int compare (const string_type &_Right) const
 
int compare (_In_z_ const value_type *_Ptr) const
 
int _Compare (const value_type *const _Ptr, const _Size_type _Count) const
 
bool _Match_equal (const sub_match &_Right) const
 
bool _Match_equal (const value_type *const _Ptr, const _Size_type _Count) const
 
bool _Match_equal (const value_type *const _Ptr) const
 
bool _Less (const sub_match &_Right) const
 
bool _Less (const value_type *const _Ptr, const _Size_type _Count) const
 
bool _Less (const value_type *const _Ptr) const
 
bool _Greater (const value_type *const _Ptr, const _Size_type _Count) const
 
bool _Greater (const value_type *const _Ptr) const
 
_Mybase _Effective_range () const
 
- Public Member Functions inherited from pair< _BidIt, _BidIt >
constexpr _Other1::value second (_STD forward< _Other2 >(_Val2))
 
constexpr _Other1::value second (_STD forward< _Other2 >(_Val2))
 
constexpr _Other1::value second (_STD forward< _Other2 >(_Right.second))
 
constexpr _Other1::value second (_STD forward< _Other2 >(_Right.second))
 
constexpr pair ()
 
constexpr pair (const _BidIt &_Val1, const _BidIt &_Val2)
 
constexpr pair (const _BidIt &_Val1, const _BidIt &_Val2)
 
 pair (const pair &)=default
 
 pair (pair &&)=default
 
constexpr pair (const pair< _Other1, _Other2 > &_Right)
 
constexpr pair (const pair< _Other1, _Other2 > &_Right)
 
 pair (_Tuple1 &_Val1, _Tuple2 &_Val2, integer_sequence< size_t, _Indexes1...>, integer_sequence< size_t, _Indexes2...>)
 
 pair (piecewise_construct_t, tuple< _Types1...> _Val1, tuple< _Types2...> _Val2)
 
constexpr pair (_Other1 &&_Val1, _Other2 &&_Val2) _NOEXCEPT_OP((is_nothrow_constructible< _BidIt
 
constexpr pair (_Other1 &&_Val1, _Other2 &&_Val2) _NOEXCEPT_OP((is_nothrow_constructible< _BidIt
 
constexpr pair (pair< _Other1, _Other2 > &&_Right) _NOEXCEPT_OP((is_nothrow_constructible< _BidIt
 
constexpr pair (pair< _Other1, _Other2 > &&_Right) _NOEXCEPT_OP((is_nothrow_constructible< _BidIt
 
_Mytoperator= (const pair< _Other1, _Other2 > &_Right)
 
_Mytoperator= (pair< _Other1, _Other2 > &&_Right)
 
_Mytoperator= (_Myt &&_Right) _NOEXCEPT_OP((is_nothrow_move_assignable< _BidIt >
 
_Mytoperator= (const _Myt &_Right)
 
void swap (_Myt &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _BidIt >
 

Public Attributes

bool matched
 
- Public Attributes inherited from pair< _BidIt, _BidIt >
_BidIt first
 
_BidIt second
 

Member Typedef Documentation

template<class _BidIt>
typedef pair<_BidIt, _BidIt> sub_match< _BidIt >::_Mybase
template<class _BidIt>
typedef string_type::size_type sub_match< _BidIt >::_Size_type
template<class _BidIt>
typedef string_type::traits_type sub_match< _BidIt >::_Traits
template<class _BidIt>
typedef iterator_traits<_BidIt>::difference_type sub_match< _BidIt >::difference_type
template<class _BidIt>
typedef _BidIt sub_match< _BidIt >::iterator
template<class _BidIt>
typedef basic_string<value_type> sub_match< _BidIt >::string_type
template<class _BidIt>
typedef iterator_traits<_BidIt>::value_type sub_match< _BidIt >::value_type

Constructor & Destructor Documentation

template<class _BidIt>
constexpr sub_match< _BidIt >::sub_match ( )
inline
639  : _Mybase(), matched(false)
640  { // construct
641  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
bool matched
Definition: regex:643

Member Function Documentation

template<class _BidIt>
int sub_match< _BidIt >::_Compare ( const value_type *const  _Ptr,
const _Size_type  _Count 
) const
inline
682  { // compare *this to array [_Ptr, _Ptr + _Count)
683  const _Mybase _Range(_Effective_range());
684  return (_Iter_compare<_Traits>(_Range.first, _Range.second, _Ptr, _Ptr + _Count));
685  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
unsigned int _Count
Definition: xcomplex:668
_Mybase _Effective_range() const
Definition: regex:739
template<class _BidIt>
_Mybase sub_match< _BidIt >::_Effective_range ( ) const
inline
740  { // if matched, returns *this; otherwise returns an empty range
741  if (matched)
742  return (*this);
743  else
744  return (_Mybase{});
745  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
bool matched
Definition: regex:643
template<class _BidIt>
bool sub_match< _BidIt >::_Greater ( const value_type *const  _Ptr,
const _Size_type  _Count 
) const
inline
728  { // check whether *this is greater than [_Ptr, _Ptr + _Count)
729  const _Mybase _Range(_Effective_range());
730  return (_STD lexicographical_compare(_Ptr, _Ptr + _Count,
731  _Range.first, _Range.second, _Char_traits_lt<_Traits>{}));
732  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
unsigned int _Count
Definition: xcomplex:668
_Mybase _Effective_range() const
Definition: regex:739
Definition: xutility:2286
bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
Definition: memory:830
template<class _BidIt>
bool sub_match< _BidIt >::_Greater ( const value_type *const  _Ptr) const
inline
735  { // check whether *this is greater than C-string _Ptr
736  return (_Greater(_Ptr, _Traits::length(_Ptr)));
737  }
bool _Greater(const value_type *const _Ptr, const _Size_type _Count) const
Definition: regex:727
template<class _BidIt>
bool sub_match< _BidIt >::_Less ( const sub_match< _BidIt > &  _Right) const
inline
708  { // check whether *this is less than _Right
709  const _Mybase _LRange(_Effective_range());
710  const _Mybase _RRange(_Right._Effective_range());
711  return (_STD lexicographical_compare(_LRange.first, _LRange.second,
712  _RRange.first, _RRange.second, _Char_traits_lt<_Traits>{}));
713  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
_Mybase _Effective_range() const
Definition: regex:739
Definition: xutility:2286
bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
Definition: memory:830
template<class _BidIt>
bool sub_match< _BidIt >::_Less ( const value_type *const  _Ptr,
const _Size_type  _Count 
) const
inline
716  { // check whether *this is less than [_Ptr, _Ptr + _Count)
717  const _Mybase _Range(_Effective_range());
718  return (_STD lexicographical_compare(_Range.first, _Range.second,
719  _Ptr, _Ptr + _Count, _Char_traits_lt<_Traits>{}));
720  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
unsigned int _Count
Definition: xcomplex:668
_Mybase _Effective_range() const
Definition: regex:739
Definition: xutility:2286
bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
Definition: memory:830
template<class _BidIt>
bool sub_match< _BidIt >::_Less ( const value_type *const  _Ptr) const
inline
723  { // check whether *this is less than C-string _Ptr
724  return (_Less(_Ptr, _Traits::length(_Ptr)));
725  }
bool _Less(const sub_match &_Right) const
Definition: regex:707
template<class _BidIt>
bool sub_match< _BidIt >::_Match_equal ( const sub_match< _BidIt > &  _Right) const
inline
688  { // check *this to _Right for equality
689  const _Mybase _LRange(_Effective_range());
690  const _Mybase _RRange(_Right._Effective_range());
691  return (_STD equal(_LRange.first, _LRange.second, _RRange.first,
692  _RRange.second, _Char_traits_eq<_Traits>{}));
693  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
Definition: xutility:2274
_Mybase _Effective_range() const
Definition: regex:739
bool equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
Definition: memory:611
template<class _BidIt>
bool sub_match< _BidIt >::_Match_equal ( const value_type *const  _Ptr,
const _Size_type  _Count 
) const
inline
696  { // check *this to array [_Ptr, _Ptr + _Count) for equality
697  const _Mybase _Range(_Effective_range());
698  return (_STD equal(_Range.first, _Range.second,
699  _Ptr, _Ptr + _Count, _Char_traits_eq<_Traits>{}));
700  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
unsigned int _Count
Definition: xcomplex:668
Definition: xutility:2274
_Mybase _Effective_range() const
Definition: regex:739
bool equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
Definition: memory:611
template<class _BidIt>
bool sub_match< _BidIt >::_Match_equal ( const value_type *const  _Ptr) const
inline
703  { // check *this to C-string _Ptr for equality
704  return (_Match_equal(_Ptr, _Traits::length(_Ptr)));
705  }
bool _Match_equal(const sub_match &_Right) const
Definition: regex:687
template<class _BidIt>
int sub_match< _BidIt >::compare ( const sub_match< _BidIt > &  _Right) const
inline
663  { // compare *this to _Right
664  const _Mybase _LRange(_Effective_range());
665  const _Mybase _RRange(_Right._Effective_range());
666  return (_Iter_compare<_Traits>(_LRange.first, _LRange.second,
667  _RRange.first, _RRange.second));
668  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
_Mybase _Effective_range() const
Definition: regex:739
template<class _BidIt>
int sub_match< _BidIt >::compare ( const string_type _Right) const
inline
671  { // compare *this to _Right
672  return (_Compare(_Right.data(), _Right.size()));
673  }
int _Compare(const value_type *const _Ptr, const _Size_type _Count) const
Definition: regex:680
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _BidIt>
int sub_match< _BidIt >::compare ( _In_z_ const value_type _Ptr) const
inline
676  { // compare *this to array pointed to by _Ptr
677  return (_Compare(_Ptr, _Traits::length(_Ptr)));
678  }
int _Compare(const value_type *const _Ptr, const _Size_type _Count) const
Definition: regex:680
template<class _BidIt>
difference_type sub_match< _BidIt >::length ( ) const
inline
646  { // return length of matched text
647  const _Mybase _Range(_Effective_range());
648  return (_STD distance(_Range.first, _Range.second));
649  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
_Iter_diff_t< _InIt > distance(_InIt _First, _InIt _Last)
Definition: xutility:1124
_Mybase _Effective_range() const
Definition: regex:739
template<class _BidIt>
sub_match< _BidIt >::operator string_type ( ) const
inline
652  { // convert matched text to string
653  return (str());
654  }
string_type str() const
Definition: regex:656
template<class _BidIt>
string_type sub_match< _BidIt >::str ( ) const
inline
657  { // convert matched text to string
658  const _Mybase _Range(_Effective_range());
659  return (string_type(_Range.first, _Range.second));
660  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:628
_Mybase _Effective_range() const
Definition: regex:739
basic_string< value_type > string_type
Definition: regex:632

Member Data Documentation

template<class _BidIt>
bool sub_match< _BidIt >::matched

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