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

Public Member Functions

 _Vb_reference (const _Mybase &_Right)
 
_Mytypeoperator= (const _Mytype &_Right) _NOEXCEPT
 
_Mytypeoperator= (bool _Val) _NOEXCEPT
 
void flip () _NOEXCEPT
 
 operator bool () const _NOEXCEPT
 
const _Vbase_Getptr () const
 
- 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
 

Protected Member Functions

_Vbase _Mask () const
 

Private Types

typedef _Vb_iter_base< _Alloc > _Mybase
 
typedef _Vb_reference< _Alloc > _Mytype
 

Private Member Functions

 _Vb_reference () _NOEXCEPT
 

Additional Inherited Members

- 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 Attributes inherited from _Vb_iter_base< _Alloc >
const _Vbase_Myptr
 
_Sizet _Myoff
 

Member Typedef Documentation

template<class _Alloc>
typedef _Vb_iter_base<_Alloc> _Vb_reference< _Alloc >::_Mybase
private
template<class _Alloc>
typedef _Vb_reference<_Alloc> _Vb_reference< _Alloc >::_Mytype
private

Constructor & Destructor Documentation

template<class _Alloc>
_Vb_reference< _Alloc >::_Vb_reference ( )
inlineprivate
1926  { // construct with null pointer (private)
1927  }
template<class _Alloc>
_Vb_reference< _Alloc >::_Vb_reference ( const _Mybase _Right)
inline
1931  : _Mybase(_Right._Myptr, _Right._Myoff, _Right._Getcont())
1932  { // construct with base
1933  }
_Vb_iter_base< _Alloc > _Mybase
Definition: vector:1922
constexpr const _Ty &() _Right
Definition: algorithm:3591

Member Function Documentation

template<class _Alloc>
const _Vbase* _Vb_reference< _Alloc >::_Getptr ( ) const
inline
1960  { // get pointer to base word
1961  #if _ITERATOR_DEBUG_LEVEL == 2
1962  if (this->_Getcont() == 0
1963  || this->_Myptr == 0
1964  || 0 <= this->_Valid(0))
1965  { // report error
1966  _DEBUG_ERROR("vector<bool> iterator not dereferencable");
1968  }
1969 
1970  #elif _ITERATOR_DEBUG_LEVEL == 1
1971  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Myptr != 0);
1972  _SCL_SECURE_VALIDATE_RANGE(this->_Valid(0) < 0);
1973  #endif /* _ITERATOR_DEBUG_LEVEL */
1974 
1975  return (this->_Myptr);
1976  }
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
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:391
template<class _Alloc>
_Vbase _Vb_reference< _Alloc >::_Mask ( ) const
inlineprotected
1980  { // convert offset to mask
1981  return ((_Vbase)(1) << this->_Myoff);
1982  }
unsigned int _Vbase
Definition: vector:1861
_Sizet _Myoff
Definition: vector:1914
template<class _Alloc>
void _Vb_reference< _Alloc >::flip ( )
inline
1950  { // toggle the bit
1951  *(_Vbase *)_Getptr() ^= _Mask();
1952  }
const _Vbase * _Getptr() const
Definition: vector:1959
unsigned int _Vbase
Definition: vector:1861
_Vbase _Mask() const
Definition: vector:1979
template<class _Alloc>
_Vb_reference< _Alloc >::operator bool ( ) const
inline
1955  { // test if bit is set
1956  return ((*_Getptr() & _Mask()) != 0);
1957  }
const _Vbase * _Getptr() const
Definition: vector:1959
_Vbase _Mask() const
Definition: vector:1979
template<class _Alloc>
_Mytype& _Vb_reference< _Alloc >::operator= ( const _Mytype _Right)
inline
1936  { // assign _Vb_reference _Right to bit
1937  return (*this = bool(_Right));
1938  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc>
_Mytype& _Vb_reference< _Alloc >::operator= ( bool  _Val)
inline
1941  { // assign _Val to bit
1942  if (_Val)
1943  *(_Vbase *)_Getptr() |= _Mask();
1944  else
1945  *(_Vbase *)_Getptr() &= (~_Mask()); // STET
1946  return (*this);
1947  }
const _Vbase * _Getptr() const
Definition: vector:1959
unsigned int _Vbase
Definition: vector:1861
_In_ int _Val
Definition: vcruntime_string.h:62
_Vbase _Mask() const
Definition: vector:1979

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