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
2014  { // construct with null reference
2015  }
template<class _Alloc>
_Vb_const_iterator< _Alloc >::_Vb_const_iterator ( const _Vbase _Ptr,
const _Container_base _Mypvbool 
)
inline
2018  : _Mybase(_Ptr, 0, _Mypvbool)
2019  { // construct with offset and pointer
2020  }
_Vb_iter_base< _Alloc > _Mybase
Definition: vector:2000

Member Function Documentation

template<class _Alloc>
void _Vb_const_iterator< _Alloc >::_Compat ( const _Mytype ) const
inline
2151  { // test for compatible iterator pair
2152  }
template<class _Alloc>
void _Vb_const_iterator< _Alloc >::_Dec ( )
inline
2156  { // decrement bit position
2157  if (this->_Myoff != 0)
2158  --this->_Myoff;
2159  else
2160  { // move to previous word
2161  #if _ITERATOR_DEBUG_LEVEL == 2
2162  if (this->_Getcont() == 0 || 0 < this->_Valid((size_type)-1))
2163  { // report error
2164  _DEBUG_ERROR("vector<bool> iterator not decrementable");
2166  }
2167 
2168  #elif _ITERATOR_DEBUG_LEVEL == 1
2169  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
2170  _SCL_SECURE_VALIDATE_RANGE(this->_Valid((size_type)-1) <= 0);
2171  #endif /* _ITERATOR_DEBUG_LEVEL */
2172 
2173  this->_Myoff = _VBITS - 1;
2174  --this->_Myptr;
2175  }
2176  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:396
const _Vbase * _Myptr
Definition: vector:1913
int _Valid(_Sizet _Inc) const
Definition: vector:1897
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:392
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const int _VBITS
Definition: vector:1862
_Sizet _Myoff
Definition: vector:1914
_Alloc::size_type size_type
Definition: vector:2008
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:391
template<class _Alloc>
void _Vb_const_iterator< _Alloc >::_Inc ( )
inline
2179  { // increment bit position
2180  if (this->_Myoff < _VBITS - 1)
2181  ++this->_Myoff;
2182  else
2183  { // move to next word
2184  #if _ITERATOR_DEBUG_LEVEL == 2
2185  if (this->_Getcont() == 0 || 0 < this->_Valid(1))
2186  { // report error
2187  _DEBUG_ERROR("vector<bool> iterator not incrementable");
2189  }
2190 
2191  #elif _ITERATOR_DEBUG_LEVEL == 1
2192  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
2193  _SCL_SECURE_VALIDATE_RANGE(this->_Valid(1) <= 0);
2194  #endif /* _ITERATOR_DEBUG_LEVEL */
2195 
2196  this->_Myoff = 0;
2197  ++this->_Myptr;
2198  }
2199  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:396
const _Vbase * _Myptr
Definition: vector:1913
int _Valid(_Sizet _Inc) const
Definition: vector:1897
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:392
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const int _VBITS
Definition: vector:1862
_Sizet _Myoff
Definition: vector:1914
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:391
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator!= ( const _Mytype _Right) const
inline
2109  { // test for iterator inequality
2110  return (!(*this == _Right));
2111  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
const_reference _Vb_const_iterator< _Alloc >::operator* ( ) const
inline
2023  { // return (reference to) designated object
2024  return (_Reft(*this));
2025  }
_Vb_reference< _Alloc > _Reft
Definition: vector:2003
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator+ ( difference_type  _Off) const
inline
2071  { // return this + integer
2072  _Mytype _Tmp = *this;
2073  return (_Tmp += _Off);
2074  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2001
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator++ ( )
inline
2028  { // preincrement
2029  _Inc();
2030  return (*this);
2031  }
void _Inc()
Definition: vector:2178
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator++ ( int  )
inline
2034  { // postincrement
2035  _Mytype _Tmp = *this;
2036  ++*this;
2037  return (_Tmp);
2038  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2001
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator+= ( difference_type  _Off)
inline
2054  { // increment by integer
2055  if (_Off < 0 && this->_Myoff < 0 - (size_type)_Off)
2056  { /* add negative increment */
2057  this->_Myoff += _Off;
2058  this->_Myptr -= 1 + ((size_type)(-1) - this->_Myoff) / _VBITS;
2059  this->_Myoff %= _VBITS;
2060  }
2061  else
2062  { /* add non-negative increment */
2063  this->_Myoff += _Off;
2064  this->_Myptr += this->_Myoff / _VBITS;
2065  this->_Myoff %= _VBITS;
2066  }
2067  return (*this);
2068  }
const _Vbase * _Myptr
Definition: vector:1913
const int _VBITS
Definition: vector:1862
_Sizet _Myoff
Definition: vector:1914
_Alloc::size_type size_type
Definition: vector:2008
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator- ( difference_type  _Off) const
inline
2082  { // return this - integer
2083  _Mytype _Tmp = *this;
2084  return (_Tmp -= _Off);
2085  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2001
template<class _Alloc>
difference_type _Vb_const_iterator< _Alloc >::operator- ( const _Mytype _Right) const
inline
2089  { // return difference of iterators
2090  _Compat(_Right);
2091  return (_VBITS * (this->_Myptr - _Right._Myptr)
2092  + (difference_type)this->_Myoff
2093  - (difference_type)_Right._Myoff);
2094  }
_Alloc::difference_type difference_type
Definition: vector:2009
const _Vbase * _Myptr
Definition: vector:1913
void _Compat(const _Mytype &) const
Definition: vector:2150
const int _VBITS
Definition: vector:1862
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator-- ( )
inline
2041  { // predecrement
2042  _Dec();
2043  return (*this);
2044  }
void _Dec()
Definition: vector:2155
template<class _Alloc>
_Mytype _Vb_const_iterator< _Alloc >::operator-- ( int  )
inline
2047  { // postdecrement
2048  _Mytype _Tmp = *this;
2049  --*this;
2050  return (_Tmp);
2051  }
_Vb_const_iterator< _Alloc > _Mytype
Definition: vector:2001
template<class _Alloc>
_Mytype& _Vb_const_iterator< _Alloc >::operator-= ( difference_type  _Off)
inline
2077  { // decrement by integer
2078  return (*this += -_Off);
2079  }
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator< ( const _Mytype _Right) const
inline
2114  { // test if this < _Right
2115  _Compat(_Right);
2116  return (this->_Myptr < _Right._Myptr
2117  || (this->_Myptr == _Right._Myptr
2118  && this->_Myoff < _Right._Myoff));
2119  }
const _Vbase * _Myptr
Definition: vector:1913
void _Compat(const _Mytype &) const
Definition: vector:2150
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator<= ( const _Mytype _Right) const
inline
2127  { // test if this <= _Right
2128  return (!(_Right < *this));
2129  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator== ( const _Mytype _Right) const
inline
2102  { // test for iterator equality
2103  _Compat(_Right);
2104  return (this->_Myptr == _Right._Myptr
2105  && this->_Myoff == _Right._Myoff);
2106  }
const _Vbase * _Myptr
Definition: vector:1913
void _Compat(const _Mytype &) const
Definition: vector:2150
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator> ( const _Mytype _Right) const
inline
2122  { // test if this > _Right
2123  return (_Right < *this);
2124  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
bool _Vb_const_iterator< _Alloc >::operator>= ( const _Mytype _Right) const
inline
2132  { // test if this >= _Right
2133  return (!(*this < _Right));
2134  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
const_reference _Vb_const_iterator< _Alloc >::operator[] ( difference_type  _Off) const
inline
2097  { // subscript
2098  return (*(*this + _Off));
2099  }

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