STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | List of all members
_Vb_const_iterator< _Alloc > Class Template Reference
Inheritance diagram for _Vb_const_iterator< _Alloc >:
_Vb_iter_base< _Alloc > _Iterator012< random_access_iterator_tag, bool, _Alloc::difference_type, bool *, bool, _Iterator_base > _Iterator_base0 _Vb_iterator< _Alloc >

Public Types

typedef _Vb_iter_base< _Alloc > _Mybase
 
typedef _Vb_const_iterator< _Alloc > _Mytype
 
typedef _Vb_reference< _Alloc > _Reft
 
typedef bool const_reference
 
typedef random_access_iterator_tag iterator_category
 
typedef bool value_type
 
typedef _Alloc::size_type size_type
 
typedef _Alloc::difference_type difference_type
 
typedef const_referencepointer
 
typedef const_reference reference
 
- Public Types inherited from _Vb_iter_base< _Alloc >
typedef _Alloc::size_type _Sizet
 
typedef vector< bool, _Alloc > _Mycont
 
- Public Types inherited from _Iterator012< random_access_iterator_tag, bool, _Alloc::difference_type, bool *, bool, _Iterator_base >
typedef random_access_iterator_tag iterator_category
 
typedef bool value_type
 
typedef _Alloc::difference_type difference_type
 
typedef boolpointer
 
typedef bool reference
 

Public Member Functions

 _Vb_const_iterator ()
 
 _Vb_const_iterator (const _Vbase *_Ptr, const _Container_base *_Mypvbool)
 
const_reference operator* () const
 
_Mytypeoperator++ ()
 
_Mytype operator++ (int)
 
_Mytypeoperator-- ()
 
_Mytype operator-- (int)
 
_Mytypeoperator+= (difference_type _Off)
 
_Mytype operator+ (difference_type _Off) const
 
_Mytypeoperator-= (difference_type _Off)
 
_Mytype operator- (difference_type _Off) const
 
difference_type operator- (const _Mytype &_Right) const
 
const_reference operator[] (difference_type _Off) const
 
bool operator== (const _Mytype &_Right) const
 
bool operator!= (const _Mytype &_Right) const
 
bool operator< (const _Mytype &_Right) const
 
bool operator> (const _Mytype &_Right) const
 
bool operator<= (const _Mytype &_Right) const
 
bool operator>= (const _Mytype &_Right) const
 
void _Compat (const _Mytype &) const
 
void _Dec ()
 
void _Inc ()
 
- Public Member Functions inherited from _Vb_iter_base< _Alloc >
 _Vb_iter_base ()
 
 _Vb_iter_base (const _Vbase *_Ptr, _Sizet _Off, const _Container_base *_Mypvbool)
 
void _Advance (_Sizet _Off)
 
int _Valid (_Sizet _Inc) const
 
- Public Member Functions inherited from _Iterator_base0
void _Adopt (const void *)
 
const _Container_base0_Getcont () const
 

Additional Inherited Members

- Public Attributes inherited from _Vb_iter_base< _Alloc >
const _Vbase_Myptr
 
_Sizet _Myoff
 

Member Typedef Documentation

template<class _Alloc>
typedef _Vb_iter_base<_Alloc> _Vb_const_iterator< _Alloc >::_Mybase
template<class _Alloc>
typedef _Vb_const_iterator<_Alloc> _Vb_const_iterator< _Alloc >::_Mytype
template<class _Alloc>
typedef _Vb_reference<_Alloc> _Vb_const_iterator< _Alloc >::_Reft
template<class _Alloc>
typedef bool _Vb_const_iterator< _Alloc >::const_reference
template<class _Alloc>
typedef _Alloc::difference_type _Vb_const_iterator< _Alloc >::difference_type
template<class _Alloc>
typedef random_access_iterator_tag _Vb_const_iterator< _Alloc >::iterator_category
template<class _Alloc>
typedef const_reference* _Vb_const_iterator< _Alloc >::pointer
template<class _Alloc>
typedef const_reference _Vb_const_iterator< _Alloc >::reference
template<class _Alloc>
typedef _Alloc::size_type _Vb_const_iterator< _Alloc >::size_type
template<class _Alloc>
typedef bool _Vb_const_iterator< _Alloc >::value_type

Constructor & Destructor Documentation

template<class _Alloc>
_Vb_const_iterator< _Alloc >::_Vb_const_iterator ( )
inline
2214  { // construct with null reference
2215  }
template<class _Alloc>
_Vb_const_iterator< _Alloc >::_Vb_const_iterator ( const _Vbase _Ptr,
const _Container_base _Mypvbool 
)
inline
2218  : _Mybase(_Ptr, 0, _Mypvbool)
2219  { // construct with offset and pointer
2220  }
_Vb_iter_base< _Alloc > _Mybase
Definition: vector:2200

Member Function Documentation

template<class _Alloc>
void _Vb_const_iterator< _Alloc >::_Compat ( const _Mytype ) const
inline
2353  { // test for compatible iterator pair
2354  }
template<class _Alloc>
void _Vb_const_iterator< _Alloc >::_Dec ( )
inline
2358  { // decrement bit position
2359  if (this->_Myoff != 0)
2360  --this->_Myoff;
2361  else
2362  { // move to previous word
2363  #if _ITERATOR_DEBUG_LEVEL == 2
2364  if (this->_Getcont() == 0 || 0 < this->_Valid((size_type)-1))
2365  { // report error
2366  _DEBUG_ERROR("vector<bool> iterator not decrementable");
2367  }
2368 
2369  #elif _ITERATOR_DEBUG_LEVEL == 1
2370  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
2371  _SCL_SECURE_VALIDATE_RANGE(this->_Valid((size_type)-1) <= 0);
2372  #endif /* _ITERATOR_DEBUG_LEVEL */
2373 
2374  this->_Myoff = _VBITS - 1;
2375  --this->_Myptr;
2376  }
2377  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
const _Vbase * _Myptr
Definition: vector:2114
int _Valid(_Sizet _Inc) const
Definition: vector:2098
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:432
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
const int _VBITS
Definition: vector:2063
_Sizet _Myoff
Definition: vector:2115
_Alloc::size_type size_type
Definition: vector:2208
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431
template<class _Alloc>
void _Vb_const_iterator< _Alloc >::_Inc ( )
inline
2380  { // increment bit position
2381  if (this->_Myoff < _VBITS - 1)
2382  ++this->_Myoff;
2383  else
2384  { // move to next word
2385  #if _ITERATOR_DEBUG_LEVEL == 2
2386  if (this->_Getcont() == 0 || 0 < this->_Valid(1))
2387  { // report error
2388  _DEBUG_ERROR("vector<bool> iterator not incrementable");
2389  }
2390 
2391  #elif _ITERATOR_DEBUG_LEVEL == 1
2392  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
2393  _SCL_SECURE_VALIDATE_RANGE(this->_Valid(1) <= 0);
2394  #endif /* _ITERATOR_DEBUG_LEVEL */
2395 
2396  this->_Myoff = 0;
2397  ++this->_Myptr;
2398  }
2399  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
const _Vbase * _Myptr
Definition: vector:2114
int _Valid(_Sizet _Inc) const
Definition: vector:2098
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:432
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
const int _VBITS
Definition: vector:2063
_Sizet _Myoff
Definition: vector:2115
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator!= ( const _Mytype _Right) const
inline
2309  { // test for iterator inequality
2310  return (!(*this == _Right));
2311  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc>
const_reference _Vb_const_iterator< _Alloc >::operator* ( ) const
inline
2223  { // return (reference to) designated object
2224  return (_Reft(*this));
2225  }
_Vb_reference< _Alloc > _Reft
Definition: vector:2203
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator+ ( difference_type  _Off) const
inline
2271  { // return this + integer
2272  _Mytype _Tmp = *this;
2273  return (_Tmp += _Off);
2274  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2201
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator++ ( )
inline
2228  { // preincrement
2229  _Inc();
2230  return (*this);
2231  }
void _Inc()
Definition: vector:2379
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator++ ( int  )
inline
2234  { // postincrement
2235  _Mytype _Tmp = *this;
2236  ++*this;
2237  return (_Tmp);
2238  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2201
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator+= ( difference_type  _Off)
inline
2254  { // increment by integer
2255  if (_Off < 0 && this->_Myoff < 0 - (size_type)_Off)
2256  { /* add negative increment */
2257  this->_Myoff += _Off;
2258  this->_Myptr -= 1 + ((size_type)(-1) - this->_Myoff) / _VBITS;
2259  this->_Myoff %= _VBITS;
2260  }
2261  else
2262  { /* add non-negative increment */
2263  this->_Myoff += _Off;
2264  this->_Myptr += this->_Myoff / _VBITS;
2265  this->_Myoff %= _VBITS;
2266  }
2267  return (*this);
2268  }
const _Vbase * _Myptr
Definition: vector:2114
const int _VBITS
Definition: vector:2063
_Sizet _Myoff
Definition: vector:2115
_Alloc::size_type size_type
Definition: vector:2208
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator- ( difference_type  _Off) const
inline
2282  { // return this - integer
2283  _Mytype _Tmp = *this;
2284  return (_Tmp -= _Off);
2285  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2201
template<class _Alloc>
difference_type _Vb_const_iterator< _Alloc >::operator- ( const _Mytype _Right) const
inline
2289  { // return difference of iterators
2290  _Compat(_Right);
2291  return (_VBITS * (this->_Myptr - _Right._Myptr)
2292  + (difference_type)this->_Myoff
2293  - (difference_type)_Right._Myoff);
2294  }
return * this
Definition: variant:950
_Alloc::difference_type difference_type
Definition: vector:2209
const _Vbase * _Myptr
Definition: vector:2114
void _Compat(const _Mytype &) const
Definition: vector:2352
const int _VBITS
Definition: vector:2063
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator-- ( )
inline
2241  { // predecrement
2242  _Dec();
2243  return (*this);
2244  }
void _Dec()
Definition: vector:2357
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator-- ( int  )
inline
2247  { // postdecrement
2248  _Mytype _Tmp = *this;
2249  --*this;
2250  return (_Tmp);
2251  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2201
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator-= ( difference_type  _Off)
inline
2277  { // decrement by integer
2278  return (*this += -_Off);
2279  }
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator< ( const _Mytype _Right) const
inline
2314  { // test if this < _Right
2315  _Compat(_Right);
2316  return (this->_Myptr < _Right._Myptr
2317  || (this->_Myptr == _Right._Myptr
2318  && this->_Myoff < _Right._Myoff));
2319  }
return * this
Definition: variant:950
const _Vbase * _Myptr
Definition: vector:2114
void _Compat(const _Mytype &) const
Definition: vector:2352
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator<= ( const _Mytype _Right) const
inline
2327  { // test if this <= _Right
2328  return (!(_Right < *this));
2329  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator== ( const _Mytype _Right) const
inline
2302  { // test for iterator equality
2303  _Compat(_Right);
2304  return (this->_Myptr == _Right._Myptr
2305  && this->_Myoff == _Right._Myoff);
2306  }
return * this
Definition: variant:950
const _Vbase * _Myptr
Definition: vector:2114
void _Compat(const _Mytype &) const
Definition: vector:2352
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator> ( const _Mytype _Right) const
inline
2322  { // test if this > _Right
2323  return (_Right < *this);
2324  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator>= ( const _Mytype _Right) const
inline
2332  { // test if this >= _Right
2333  return (!(*this < _Right));
2334  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc>
const_reference _Vb_const_iterator< _Alloc >::operator[] ( difference_type  _Off) const
inline
2297  { // subscript
2298  return (*(*this + _Off));
2299  }

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