STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
regex_iterator< _BidIt, _Elem, _RxTraits > Class Template Reference
Inheritance diagram for regex_iterator< _BidIt, _Elem, _RxTraits >:
_Iterator012< forward_iterator_tag, match_results< _BidIt >, ptrdiff_t, match_results< _BidIt > *, match_results< _BidIt > &, _Iterator_base > _Iterator_base0

Public Types

typedef regex_iterator< _BidIt, _Elem, _RxTraits > _Myt
 
typedef basic_regex< _Elem, _RxTraits > regex_type
 
typedef match_results< _BidIt > value_type
 
typedef ptrdiff_t difference_type
 
typedef const value_typepointer
 
typedef const value_typereference
 
typedef forward_iterator_tag iterator_category
 
- Public Types inherited from _Iterator012< forward_iterator_tag, match_results< _BidIt >, ptrdiff_t, match_results< _BidIt > *, match_results< _BidIt > &, _Iterator_base >
typedef forward_iterator_tag iterator_category
 
typedef match_results< _BidIt > value_type
 
typedef ptrdiff_t difference_type
 
typedef match_results< _BidIt > * pointer
 
typedef match_results< _BidIt > & reference
 

Public Member Functions

 regex_iterator ()
 
 regex_iterator (_BidIt _First, _BidIt _Last, const regex_type &_Re, regex_constants::match_flag_type _Fl=regex_constants::match_default)
 
 regex_iterator (_BidIt, _BidIt, const regex_type &&, regex_constants::match_flag_type=regex_constants::match_default)=delete
 
bool operator== (const _Myt &_Right) const
 
bool operator!= (const _Myt &_Right) const
 
const value_typeoperator* () const
 
pointer operator-> () const
 
_Mytoperator++ ()
 
_Myt operator++ (int)
 
bool _Atend () const
 
- Public Member Functions inherited from _Iterator_base0
void _Adopt (const void *)
 
const _Container_base0_Getcont () const
 

Private Attributes

_BidIt _Begin
 
_BidIt _End
 
const regex_type_MyRe
 
regex_constants::match_flag_type _Flags
 
match_results< _BidIt > _MyVal
 

Member Typedef Documentation

template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
typedef regex_iterator<_BidIt, _Elem, _RxTraits> regex_iterator< _BidIt, _Elem, _RxTraits >::_Myt
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
typedef ptrdiff_t regex_iterator< _BidIt, _Elem, _RxTraits >::difference_type
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
typedef forward_iterator_tag regex_iterator< _BidIt, _Elem, _RxTraits >::iterator_category
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
typedef const value_type* regex_iterator< _BidIt, _Elem, _RxTraits >::pointer
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
typedef const value_type& regex_iterator< _BidIt, _Elem, _RxTraits >::reference
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
typedef basic_regex<_Elem, _RxTraits> regex_iterator< _BidIt, _Elem, _RxTraits >::regex_type
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
typedef match_results<_BidIt> regex_iterator< _BidIt, _Elem, _RxTraits >::value_type

Constructor & Destructor Documentation

template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
regex_iterator< _BidIt, _Elem, _RxTraits >::regex_iterator ( )
inline
3216  : _MyRe(0)
3217  { // construct end of sequence iterator
3218  }
const regex_type * _MyRe
Definition: regex:3349
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
regex_iterator< _BidIt, _Elem, _RxTraits >::regex_iterator ( _BidIt  _First,
_BidIt  _Last,
const regex_type _Re,
regex_constants::match_flag_type  _Fl = regex_constants::match_default 
)
inline
3224  : _Begin(_First), _End(_Last), _MyRe(&_Re), _Flags(_Fl)
3225  { // construct from regular expression and target text
3228  _MyRe = 0;
3229  else
3230  this->_Adopt(_MyRe);
3231  }
const regex_type * _MyRe
Definition: regex:3349
#define _DEBUG_RANGE(first, last)
Definition: xutility:902
bool _Regex_search1(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2855
match_results< _BidIt > _MyVal
Definition: regex:3351
regex_constants::match_flag_type _Flags
Definition: regex:3350
_BidIt _End
Definition: regex:3348
_BidIt _Begin
Definition: regex:3348
void _Adopt(const void *)
Definition: xutility:73
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
regex_iterator< _BidIt, _Elem, _RxTraits >::regex_iterator ( _BidIt  ,
_BidIt  ,
const regex_type &&  ,
regex_constants::match_flag_type  = regex_constants::match_default 
)
delete

Member Function Documentation

template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
bool regex_iterator< _BidIt, _Elem, _RxTraits >::_Atend ( ) const
inline
3343  { // test for end iterator
3344  return (_MyRe == 0);
3345  }
const regex_type * _MyRe
Definition: regex:3349
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
bool regex_iterator< _BidIt, _Elem, _RxTraits >::operator!= ( const _Myt _Right) const
inline
3251  { // test for inequality
3252  return (!(*this == _Right));
3253  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
const value_type& regex_iterator< _BidIt, _Elem, _RxTraits >::operator* ( ) const
inline
3256  { // return designated match
3257  #if _ITERATOR_DEBUG_LEVEL == 2
3258  if (_MyRe == 0)
3259  { // report error
3260  _DEBUG_ERROR("regex_iterator not dereferencable");
3261  }
3262 
3263  #elif _ITERATOR_DEBUG_LEVEL == 1
3265  #endif /* _ITERATOR_DEBUG_LEVEL */
3266 
3267  return (_MyVal);
3268  }
const regex_type * _MyRe
Definition: regex:3349
match_results< _BidIt > _MyVal
Definition: regex:3351
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:432
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
_Myt& regex_iterator< _BidIt, _Elem, _RxTraits >::operator++ ( )
inline
3276  { // preincrement
3277  #if _ITERATOR_DEBUG_LEVEL == 2
3278  if (_MyRe == 0)
3279  { // report error
3280  _DEBUG_ERROR("regex_iterator not incrementable");
3281  }
3282 
3283  #elif _ITERATOR_DEBUG_LEVEL == 1
3285  #endif /* _ITERATOR_DEBUG_LEVEL */
3286 
3287  if (_MyRe == 0)
3288  return (*this);
3289 
3290  _BidIt _Start = _MyVal._At(0).second;
3291 
3292  #if _ITERATOR_DEBUG_LEVEL == 2
3293  if (this->_Getcont() == 0)
3294  { // report error
3295  _DEBUG_ERROR("regex_iterator orphaned");
3296  }
3297 
3298  #elif _ITERATOR_DEBUG_LEVEL == 1
3299  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
3300  #endif /* _ITERATOR_DEBUG_LEVEL */
3301 
3302  if (_MyVal._At(0).first == _MyVal._At(0).second)
3303  { // handle zero-length match
3304  if (_Start == _End)
3305  { // store end-of-sequence iterator
3306  _MyRe = 0;
3307 
3308  #if _ITERATOR_DEBUG_LEVEL == 2
3309  this->_Orphan_me();
3310  #endif /* _ITERATOR_DEBUG_LEVEL */
3311 
3312  return (*this);
3313  }
3314 
3315  // _DEBUG_RANGE(_Start, _End) checked in constructor
3316  if (_Regex_search1(_Start, _End, &_MyVal, *_MyRe,
3319  _Begin))
3320  return (*this);
3321  ++_Start;
3322  }
3324 
3325  // _DEBUG_RANGE(_Start, _End) checked in constructor
3326  if (_Regex_search1(_Start, _End, &_MyVal, *_MyRe, _Flags, _Begin))
3327  return (*this);
3328  else
3329  { // mark at end of sequence
3330  _MyRe = 0;
3331  return (*this);
3332  }
3333  }
_Ty2 second
Definition: utility:271
const regex_type * _MyRe
Definition: regex:3349
const _Container_base0 * _Getcont() const
Definition: xutility:77
Definition: regex:123
bool _Regex_search1(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2855
match_results< _BidIt > _MyVal
Definition: regex:3351
_Ty1 first
Definition: utility:270
_Elem & _At(unsigned int _Sub)
Definition: regex:1446
regex_constants::match_flag_type _Flags
Definition: regex:3350
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:432
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_BidIt _End
Definition: regex:3348
_BidIt _Begin
Definition: regex:3348
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
_Myt regex_iterator< _BidIt, _Elem, _RxTraits >::operator++ ( int  )
inline
3336  { // postincrement
3337  _Myt _Tmp = *this;
3338  ++*this;
3339  return (_Tmp);
3340  }
regex_iterator< _BidIt, _Elem, _RxTraits > _Myt
Definition: regex:3207
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
pointer regex_iterator< _BidIt, _Elem, _RxTraits >::operator-> ( ) const
inline
3271  { // return pointer to designated match
3272  return (pointer_traits<pointer>::pointer_to(**this));
3273  }
Definition: xmemory0:254
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
bool regex_iterator< _BidIt, _Elem, _RxTraits >::operator== ( const _Myt _Right) const
inline
3239  { // test for equality
3240  if (_MyRe != _Right._MyRe)
3241  return (false);
3242  else if (_MyRe == 0)
3243  return (true);
3244  return (_Begin == _Right._Begin
3245  && _End == _Right._End
3246  && _Flags == _Right._Flags
3247  && _MyVal._At(0) == _Right._MyVal._At(0));
3248  }
const regex_type * _MyRe
Definition: regex:3349
match_results< _BidIt > _MyVal
Definition: regex:3351
_Elem & _At(unsigned int _Sub)
Definition: regex:1446
regex_constants::match_flag_type _Flags
Definition: regex:3350
_BidIt _End
Definition: regex:3348
_BidIt _Begin
Definition: regex:3348
constexpr const _Ty &() _Right
Definition: algorithm:3723

Member Data Documentation

template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
_BidIt regex_iterator< _BidIt, _Elem, _RxTraits >::_Begin
private
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
_BidIt regex_iterator< _BidIt, _Elem, _RxTraits >::_End
private
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
regex_constants::match_flag_type regex_iterator< _BidIt, _Elem, _RxTraits >::_Flags
private
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
const regex_type* regex_iterator< _BidIt, _Elem, _RxTraits >::_MyRe
private
template<class _BidIt , class _Elem = _Iter_value_t<_BidIt>, class _RxTraits = regex_traits<_Elem>>
match_results<_BidIt> regex_iterator< _BidIt, _Elem, _RxTraits >::_MyVal
private

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