STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
_String_const_iterator< _Mystr > Class Template Reference
Inheritance diagram for _String_const_iterator< _Mystr >:
_Iterator012< random_access_iterator_tag, _Mystr::value_type, _Mystr::difference_type, _Mystr::const_pointer, _Mystr::const_reference, _Iterator_base > _Iterator_base0 _String_iterator< _Mystr >

Public Types

typedef _String_const_iterator< _Mystr > _Myiter
 
typedef random_access_iterator_tag iterator_category
 
typedef _Mystr::value_type value_type
 
typedef _Mystr::difference_type difference_type
 
typedef _Mystr::const_pointer pointer
 
typedef _Mystr::const_reference reference
 
typedef pointer _Unchecked_type
 
- Public Types inherited from _Iterator012< random_access_iterator_tag, _Mystr::value_type, _Mystr::difference_type, _Mystr::const_pointer, _Mystr::const_reference, _Iterator_base >
typedef random_access_iterator_tag iterator_category
 
typedef _Mystr::value_type value_type
 
typedef _Mystr::difference_type difference_type
 
typedef _Mystr::const_pointer pointer
 
typedef _Mystr::const_reference reference
 

Public Member Functions

 _String_const_iterator ()
 
 _String_const_iterator (pointer _Parg, const _Container_base *_Pstring)
 
_Myiter_Rechecked (_Unchecked_type _Right)
 
_Unchecked_type _Unchecked () const
 
reference operator* () const
 
pointer operator-> () const
 
_Myiteroperator++ ()
 
_Myiter operator++ (int)
 
_Myiteroperator-- ()
 
_Myiter operator-- (int)
 
_Myiteroperator+= (const difference_type _Off)
 
_Myiter operator+ (const difference_type _Off) const
 
_Myiteroperator-= (const difference_type _Off)
 
_Myiter operator- (const difference_type _Off) const
 
difference_type operator- (const _Myiter &_Right) const
 
reference operator[] (const difference_type _Off) const
 
bool operator== (const _Myiter &_Right) const
 
bool operator!= (const _Myiter &_Right) const
 
bool operator< (const _Myiter &_Right) const
 
bool operator> (const _Myiter &_Right) const
 
bool operator<= (const _Myiter &_Right) const
 
bool operator>= (const _Myiter &_Right) const
 
void _Compat (const _Myiter &) const
 
- Public Member Functions inherited from _Iterator_base0
void _Adopt (const void *)
 
const _Container_base0_Getcont () const
 

Public Attributes

pointer _Ptr
 

Member Typedef Documentation

template<class _Mystr>
typedef _String_const_iterator<_Mystr> _String_const_iterator< _Mystr >::_Myiter
template<class _Mystr>
typedef pointer _String_const_iterator< _Mystr >::_Unchecked_type
template<class _Mystr>
typedef _Mystr::difference_type _String_const_iterator< _Mystr >::difference_type
template<class _Mystr>
typedef random_access_iterator_tag _String_const_iterator< _Mystr >::iterator_category
template<class _Mystr>
typedef _Mystr::const_pointer _String_const_iterator< _Mystr >::pointer
template<class _Mystr>
typedef _Mystr::const_reference _String_const_iterator< _Mystr >::reference
template<class _Mystr>
typedef _Mystr::value_type _String_const_iterator< _Mystr >::value_type

Constructor & Destructor Documentation

template<class _Mystr>
_String_const_iterator< _Mystr >::_String_const_iterator ( )
inline
1190  : _Ptr()
1191  { // construct with null pointer
1192  }
pointer _Ptr
Definition: xstring:1372
template<class _Mystr>
_String_const_iterator< _Mystr >::_String_const_iterator ( pointer  _Parg,
const _Container_base _Pstring 
)
inline
1195  : _Ptr(_Parg)
1196  { // construct with pointer _Parg
1197  this->_Adopt(_Pstring);
1198  }
pointer _Ptr
Definition: xstring:1372
void _Adopt(const void *)
Definition: xutility:73

Member Function Documentation

template<class _Mystr>
void _String_const_iterator< _Mystr >::_Compat ( const _Myiter ) const
inline
1368  { // test for compatible iterator pair
1369  }
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::_Rechecked ( _Unchecked_type  _Right)
inline
1203  { // reset from unchecked iterator
1204  _Ptr = _Right;
1205  return (*this);
1206  }
pointer _Ptr
Definition: xstring:1372
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
_Unchecked_type _String_const_iterator< _Mystr >::_Unchecked ( ) const
inline
1209  { // make an unchecked iterator
1210  return (_Ptr);
1211  }
pointer _Ptr
Definition: xstring:1372
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator!= ( const _Myiter _Right) const
inline
1334  { // test for iterator inequality
1335  return (!(*this == _Right));
1336  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
reference _String_const_iterator< _Mystr >::operator* ( ) const
inline
1214  { // return designated object
1215 #if _ITERATOR_DEBUG_LEVEL >= 1
1216  _IDL_VERIFY(_Ptr, "cannot dereference value-initialized string iterator");
1217  const auto _Mycont = static_cast<const _Mystr *>(this->_Getcont());
1218  _IDL_VERIFY(_Mycont, "cannot dereference string iterator because the iterator was"
1219  " invalidated (e.g. reallocation occurred, or the string was destroyed)");
1220  const auto _Contptr = _Mycont->_Myptr();
1221  const auto _Rawptr = _Unfancy(_Ptr);
1222  _IDL_VERIFY(_Contptr <= _Rawptr && _Rawptr < _Contptr + _Mycont->_Mysize,
1223  "cannot dereference string iterator because it is out of range (e.g. an end iterator)");
1224 #endif /* _ITERATOR_DEBUG_LEVEL >= 1 */
1225 
1227  return (*_Ptr);
1228  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _Analysis_assume_(expr)
Definition: sal.h:2896
#define _IDL_VERIFY(assertion, message)
Definition: xutility:43
pointer _Ptr
Definition: xstring:1372
auto _Unfancy(_Ptrty _Ptr)
Definition: xstddef:635
template<class _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator+ ( const difference_type  _Off) const
inline
1300  { // return this + integer
1301  _Myiter _Tmp = *this;
1302  return (_Tmp += _Off);
1303  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:1181
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator++ ( )
inline
1236  { // preincrement
1237 #if _ITERATOR_DEBUG_LEVEL >= 1
1238  _IDL_VERIFY(_Ptr, "cannot increment value-initialized string iterator");
1239  const auto _Mycont = static_cast<const _Mystr *>(this->_Getcont());
1240  _IDL_VERIFY(_Mycont, "cannot increment string iterator because the iterator was"
1241  " invalidated (e.g. reallocation occurred, or the string was destroyed)");
1242  _IDL_VERIFY(_Unfancy(_Ptr) < _Mycont->_Myptr() + _Mycont->_Mysize,
1243  "cannot increment string iterator past end");
1244 #endif /* _ITERATOR_DEBUG_LEVEL >= 1 */
1245 
1246  ++_Ptr;
1247  return (*this);
1248  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _IDL_VERIFY(assertion, message)
Definition: xutility:43
pointer _Ptr
Definition: xstring:1372
auto _Unfancy(_Ptrty _Ptr)
Definition: xstddef:635
template<class _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator++ ( int  )
inline
1251  { // postincrement
1252  _Myiter _Tmp = *this;
1253  ++*this;
1254  return (_Tmp);
1255  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:1181
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator+= ( const difference_type  _Off)
inline
1279  { // increment by integer
1280 #if _ITERATOR_DEBUG_LEVEL >= 1
1281  if (_Off != 0)
1282  {
1283  _IDL_VERIFY(_Ptr, "cannot seek value-initialized string iterator");
1284  const auto _Mycont = static_cast<const _Mystr *>(this->_Getcont());
1285  _IDL_VERIFY(_Mycont != 0, "cannot seek string iterator because the iterator was"
1286  " invalidated (e.g. reallocation occurred, or the string was destroyed)");
1287  const auto _Contptr = _Mycont->_Myptr();
1288  const auto _Rawptr = _Unfancy(_Ptr);
1289  _IDL_VERIFY(_Contptr <= _Rawptr + _Off, "cannot seek string iterator before begin");
1290  _IDL_VERIFY(_Rawptr + _Off <= _Contptr + _Mycont->_Mysize,
1291  "cannot seek string iterator past end");
1292  }
1293 #endif /* _ITERATOR_DEBUG_LEVEL >= 1 */
1294 
1295  _Ptr += _Off;
1296  return (*this);
1297  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _IDL_VERIFY(assertion, message)
Definition: xutility:43
pointer _Ptr
Definition: xstring:1372
auto _Unfancy(_Ptrty _Ptr)
Definition: xstddef:635
template<class _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator- ( const difference_type  _Off) const
inline
1311  { // return this - integer
1312  _Myiter _Tmp = *this;
1313  return (_Tmp -= _Off);
1314  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:1181
template<class _Mystr>
difference_type _String_const_iterator< _Mystr >::operator- ( const _Myiter _Right) const
inline
1317  { // return difference of iterators
1318  _Compat(_Right);
1319  return (_Ptr - _Right._Ptr);
1320  }
void _Compat(const _Myiter &) const
Definition: xstring:1367
pointer _Ptr
Definition: xstring:1372
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator-- ( )
inline
1258  { // predecrement
1259 #if _ITERATOR_DEBUG_LEVEL >= 1
1260  _IDL_VERIFY(_Ptr, "cannot decrement value-initialized string iterator");
1261  const auto _Mycont = static_cast<const _Mystr *>(this->_Getcont());
1262  _IDL_VERIFY(_Mycont, "cannot decrement string iterator because the iterator was"
1263  " invalidated (e.g. reallocation occurred, or the string was destroyed)");
1264  _IDL_VERIFY(_Mycont->_Myptr() < _Unfancy(_Ptr), "cannot decrement string iterator before begin");
1265 #endif /* _ITERATOR_DEBUG_LEVEL >= 1 */
1266 
1267  --_Ptr;
1268  return (*this);
1269  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _IDL_VERIFY(assertion, message)
Definition: xutility:43
pointer _Ptr
Definition: xstring:1372
auto _Unfancy(_Ptrty _Ptr)
Definition: xstddef:635
template<class _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator-- ( int  )
inline
1272  { // postdecrement
1273  _Myiter _Tmp = *this;
1274  --*this;
1275  return (_Tmp);
1276  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:1181
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator-= ( const difference_type  _Off)
inline
1306  { // decrement by integer
1307  return (*this += -_Off);
1308  }
template<class _Mystr>
pointer _String_const_iterator< _Mystr >::operator-> ( ) const
inline
1231  { // return pointer to class object
1232  return (pointer_traits<pointer>::pointer_to(**this));
1233  }
Definition: xmemory0:254
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator< ( const _Myiter _Right) const
inline
1339  { // test if this < _Right
1340  _Compat(_Right);
1341  return (_Ptr < _Right._Ptr);
1342  }
void _Compat(const _Myiter &) const
Definition: xstring:1367
pointer _Ptr
Definition: xstring:1372
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator<= ( const _Myiter _Right) const
inline
1350  { // test if this <= _Right
1351  return (!(_Right < *this));
1352  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator== ( const _Myiter _Right) const
inline
1328  { // test for iterator equality
1329  _Compat(_Right);
1330  return (_Ptr == _Right._Ptr);
1331  }
void _Compat(const _Myiter &) const
Definition: xstring:1367
pointer _Ptr
Definition: xstring:1372
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator> ( const _Myiter _Right) const
inline
1345  { // test if this > _Right
1346  return (_Right < *this);
1347  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator>= ( const _Myiter _Right) const
inline
1355  { // test if this >= _Right
1356  return (!(*this < _Right));
1357  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mystr>
reference _String_const_iterator< _Mystr >::operator[] ( const difference_type  _Off) const
inline
1323  { // subscript
1324  return (*(*this + _Off));
1325  }

Member Data Documentation

template<class _Mystr>
pointer _String_const_iterator< _Mystr >::_Ptr

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