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, index_sequence< _Indexes1...>, index_sequence< _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
660  : _Mybase(), matched(false)
661  { // construct
662  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
bool matched
Definition: regex:664

Member Function Documentation

template<class _BidIt>
int sub_match< _BidIt >::_Compare ( const value_type *const  _Ptr,
const _Size_type  _Count 
) const
inline
703  { // compare *this to array [_Ptr, _Ptr + _Count)
704  const _Mybase _Range(_Effective_range());
705  return (_Iter_compare<_Traits>(_Range.first, _Range.second, _Ptr, _Ptr + _Count));
706  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
_Mybase _Effective_range() const
Definition: regex:760
_Diff _Count
Definition: algorithm:1941
template<class _BidIt>
_Mybase sub_match< _BidIt >::_Effective_range ( ) const
inline
761  { // if matched, returns *this; otherwise returns an empty range
762  if (matched)
763  return (*this);
764  else
765  return (_Mybase{});
766  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
bool matched
Definition: regex:664
template<class _BidIt>
bool sub_match< _BidIt >::_Greater ( const value_type *const  _Ptr,
const _Size_type  _Count 
) const
inline
749  { // check whether *this is greater than [_Ptr, _Ptr + _Count)
750  const _Mybase _Range(_Effective_range());
751  return (_STD lexicographical_compare(_Ptr, _Ptr + _Count,
752  _Range.first, _Range.second, _Char_traits_lt<_Traits>{}));
753  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
_Mybase _Effective_range() const
Definition: regex:760
Definition: xutility:2280
_Diff _Count
Definition: algorithm:1941
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
756  { // check whether *this is greater than C-string _Ptr
757  return (_Greater(_Ptr, _Traits::length(_Ptr)));
758  }
bool _Greater(const value_type *const _Ptr, const _Size_type _Count) const
Definition: regex:748
template<class _BidIt>
bool sub_match< _BidIt >::_Less ( const sub_match< _BidIt > &  _Right) const
inline
729  { // check whether *this is less than _Right
730  const _Mybase _LRange(_Effective_range());
731  const _Mybase _RRange(_Right._Effective_range());
732  return (_STD lexicographical_compare(_LRange.first, _LRange.second,
733  _RRange.first, _RRange.second, _Char_traits_lt<_Traits>{}));
734  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
_Mybase _Effective_range() const
Definition: regex:760
Definition: xutility:2280
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
737  { // check whether *this is less than [_Ptr, _Ptr + _Count)
738  const _Mybase _Range(_Effective_range());
739  return (_STD lexicographical_compare(_Range.first, _Range.second,
740  _Ptr, _Ptr + _Count, _Char_traits_lt<_Traits>{}));
741  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
_Mybase _Effective_range() const
Definition: regex:760
Definition: xutility:2280
_Diff _Count
Definition: algorithm:1941
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
744  { // check whether *this is less than C-string _Ptr
745  return (_Less(_Ptr, _Traits::length(_Ptr)));
746  }
bool _Less(const sub_match &_Right) const
Definition: regex:728
template<class _BidIt>
bool sub_match< _BidIt >::_Match_equal ( const sub_match< _BidIt > &  _Right) const
inline
709  { // check *this to _Right for equality
710  const _Mybase _LRange(_Effective_range());
711  const _Mybase _RRange(_Right._Effective_range());
712  return (_STD equal(_LRange.first, _LRange.second, _RRange.first,
713  _RRange.second, _Char_traits_eq<_Traits>{}));
714  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
Definition: xutility:2268
_Mybase _Effective_range() const
Definition: regex:760
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
717  { // check *this to array [_Ptr, _Ptr + _Count) for equality
718  const _Mybase _Range(_Effective_range());
719  return (_STD equal(_Range.first, _Range.second,
720  _Ptr, _Ptr + _Count, _Char_traits_eq<_Traits>{}));
721  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
Definition: xutility:2268
_Mybase _Effective_range() const
Definition: regex:760
bool equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
Definition: memory:611
_Diff _Count
Definition: algorithm:1941
template<class _BidIt>
bool sub_match< _BidIt >::_Match_equal ( const value_type *const  _Ptr) const
inline
724  { // check *this to C-string _Ptr for equality
725  return (_Match_equal(_Ptr, _Traits::length(_Ptr)));
726  }
bool _Match_equal(const sub_match &_Right) const
Definition: regex:708
template<class _BidIt>
int sub_match< _BidIt >::compare ( const sub_match< _BidIt > &  _Right) const
inline
684  { // compare *this to _Right
685  const _Mybase _LRange(_Effective_range());
686  const _Mybase _RRange(_Right._Effective_range());
687  return (_Iter_compare<_Traits>(_LRange.first, _LRange.second,
688  _RRange.first, _RRange.second));
689  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
_Mybase _Effective_range() const
Definition: regex:760
template<class _BidIt>
int sub_match< _BidIt >::compare ( const string_type _Right) const
inline
692  { // compare *this to _Right
693  return (_Compare(_Right.data(), _Right.size()));
694  }
int _Compare(const value_type *const _Ptr, const _Size_type _Count) const
Definition: regex:701
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _BidIt>
int sub_match< _BidIt >::compare ( _In_z_ const value_type _Ptr) const
inline
697  { // compare *this to array pointed to by _Ptr
698  return (_Compare(_Ptr, _Traits::length(_Ptr)));
699  }
int _Compare(const value_type *const _Ptr, const _Size_type _Count) const
Definition: regex:701
template<class _BidIt>
difference_type sub_match< _BidIt >::length ( ) const
inline
667  { // return length of matched text
668  const _Mybase _Range(_Effective_range());
669  return (_STD distance(_Range.first, _Range.second));
670  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
_Iter_diff_t< _InIt > distance(_InIt _First, _InIt _Last)
Definition: xutility:1111
_Mybase _Effective_range() const
Definition: regex:760
template<class _BidIt>
sub_match< _BidIt >::operator string_type ( ) const
inline
673  { // convert matched text to string
674  return (str());
675  }
string_type str() const
Definition: regex:677
template<class _BidIt>
string_type sub_match< _BidIt >::str ( ) const
inline
678  { // convert matched text to string
679  const _Mybase _Range(_Effective_range());
680  return (string_type(_Range.first, _Range.second));
681  }
pair< _BidIt, _BidIt > _Mybase
Definition: regex:649
_Mybase _Effective_range() const
Definition: regex:760
basic_string< value_type > string_type
Definition: regex:653

Member Data Documentation

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

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