STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
_Deque_const_iterator< _Mydeque > Class Template Reference
Inheritance diagram for _Deque_const_iterator< _Mydeque >:
_Iterator_base12 _Deque_iterator< _Mydeque >

Public Types

enum  { _EEN_DS = _DEQUESIZ }
 
typedef _Deque_const_iterator< _Mydeque > _Myiter
 
typedef random_access_iterator_tag iterator_category
 
typedef _Mydeque::value_type value_type
 
typedef _Mydeque::size_type size_type
 
typedef _Mydeque::difference_type difference_type
 
typedef _Mydeque::const_pointer pointer
 
typedef _Mydeque::const_reference reference
 
typedef _Mydeque _Mydeque_t
 
typedef _Deque_unchecked_const_iterator< _Mydeque > _Unchecked_type
 

Public Member Functions

 _Deque_const_iterator ()
 
 _Deque_const_iterator (size_type _Off, const _Container_base12 *_Pdeque)
 
_Myiter_Rechecked (_Unchecked_type _Right)
 
_Unchecked_type _Unchecked () const
 
reference operator* () const
 
pointer operator-> () const
 
_Myiteroperator++ ()
 
_Myiter operator++ (int)
 
_Myiteroperator-- ()
 
_Myiter operator-- (int)
 
_Myiteroperator+= (difference_type _Off)
 
_Myiter operator+ (difference_type _Off) const
 
_Myiteroperator-= (difference_type _Off)
 
_Myiter operator- (difference_type _Off) const
 
difference_type operator- (const _Myiter &_Right) const
 
reference operator[] (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
 
void _Setcont (const _Mydeque *_Pdeque)
 
- Public Member Functions inherited from _Iterator_base12
 _Iterator_base12 ()
 
 _Iterator_base12 (const _Iterator_base12 &_Right)
 
_Iterator_base12operator= (const _Iterator_base12 &_Right)
 
 ~_Iterator_base12 () _NOEXCEPT
 
void _Adopt (const _Container_base12 *_Parent)
 
void _Clrcont ()
 
const _Container_base12_Getcont () const
 
_Iterator_base12 ** _Getpnext ()
 
void _Orphan_me ()
 

Public Attributes

size_type _Myoff
 
- Public Attributes inherited from _Iterator_base12
_Container_proxy_Myproxy
 
_Iterator_base12_Mynextiter
 

Member Typedef Documentation

template<class _Mydeque>
typedef _Mydeque _Deque_const_iterator< _Mydeque >::_Mydeque_t
template<class _Mydeque>
typedef _Deque_const_iterator<_Mydeque> _Deque_const_iterator< _Mydeque >::_Myiter
template<class _Mydeque>
typedef _Deque_unchecked_const_iterator<_Mydeque> _Deque_const_iterator< _Mydeque >::_Unchecked_type
template<class _Mydeque>
typedef _Mydeque::difference_type _Deque_const_iterator< _Mydeque >::difference_type
template<class _Mydeque>
typedef random_access_iterator_tag _Deque_const_iterator< _Mydeque >::iterator_category
template<class _Mydeque>
typedef _Mydeque::const_pointer _Deque_const_iterator< _Mydeque >::pointer
template<class _Mydeque>
typedef _Mydeque::const_reference _Deque_const_iterator< _Mydeque >::reference
template<class _Mydeque>
typedef _Mydeque::size_type _Deque_const_iterator< _Mydeque >::size_type
template<class _Mydeque>
typedef _Mydeque::value_type _Deque_const_iterator< _Mydeque >::value_type

Member Enumeration Documentation

template<class _Mydeque>
anonymous enum
Enumerator
_EEN_DS 
295 {_EEN_DS = _DEQUESIZ}; // helper for expression evaluator
#define _DEQUESIZ
Definition: deque:19
Definition: deque:295

Constructor & Destructor Documentation

template<class _Mydeque>
_Deque_const_iterator< _Mydeque >::_Deque_const_iterator ( )
inline
297  { // construct with null pointer
298  _Setcont(0);
299  _Myoff = 0;
300  }
void _Setcont(const _Mydeque *_Pdeque)
Definition: deque:529
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
_Deque_const_iterator< _Mydeque >::_Deque_const_iterator ( size_type  _Off,
const _Container_base12 _Pdeque 
)
inline
303  { // construct with offset _Off in *_Pdeque
304  _Setcont((_Mydeque *)_Pdeque);
305  _Myoff = _Off;
306  }
void _Setcont(const _Mydeque *_Pdeque)
Definition: deque:529
size_type _Myoff
Definition: deque:535

Member Function Documentation

template<class _Mydeque>
void _Deque_const_iterator< _Mydeque >::_Compat ( const _Myiter ) const
inline
526  { // test for compatible iterator pair
527  }
template<class _Mydeque>
_Myiter& _Deque_const_iterator< _Mydeque >::_Rechecked ( _Unchecked_type  _Right)
inline
311  { // reset from unchecked iterator
312  this->_Myoff = _Right._Myoff;
313  return (*this);
314  }
const _Ty & _Right
Definition: algorithm:4087
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
void _Deque_const_iterator< _Mydeque >::_Setcont ( const _Mydeque *  _Pdeque)
inline
530  { // set container pointer
531  this->_Adopt(_Pdeque);
532  }
void _Adopt(const _Container_base12 *_Parent)
Definition: xutility:147
template<class _Mydeque>
_Unchecked_type _Deque_const_iterator< _Mydeque >::_Unchecked ( ) const
inline
317  { // make an unchecked iterator
318  return (_Unchecked_type(_Myoff, this->_Getcont()));
319  }
_Deque_unchecked_const_iterator< _Mydeque > _Unchecked_type
Definition: deque:308
const _Container_base12 * _Getcont() const
Definition: xutility:181
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
bool _Deque_const_iterator< _Mydeque >::operator!= ( const _Myiter _Right) const
inline
469  { // test for iterator inequality
470  return (!(*this == _Right));
471  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mydeque>
reference _Deque_const_iterator< _Mydeque >::operator* ( ) const
inline
322  { // return designated object
323  _Mydeque *_Mycont = ((_Mydeque *)this->_Getcont());
324 
325  #if _ITERATOR_DEBUG_LEVEL == 2
326  if (_Mycont == 0
327  || this->_Myoff < _Mycont->_Myoff
328  || _Mycont->_Myoff + _Mycont->_Mysize <= this->_Myoff)
329  { // report error
330  _DEBUG_ERROR("deque iterator not dereferencable");
332  }
333 
334  #elif _ITERATOR_DEBUG_LEVEL == 1
335  _SCL_SECURE_VALIDATE(_Mycont != 0);
336  _SCL_SECURE_VALIDATE_RANGE(_Mycont->_Myoff <= this->_Myoff
337  && this->_Myoff < _Mycont->_Myoff + _Mycont->_Mysize);
338  #endif /* _ITERATOR_DEBUG_LEVEL */
339 
340  _Analysis_assume_(_Mycont != 0);
341 
342  size_type _Block = _Mycont->_Getblock(_Myoff);
343  size_type _Off = _Myoff % _DEQUESIZ;
344  return (_Mycont->_Map[_Block][_Off]);
345  }
#define _DEQUESIZ
Definition: deque:19
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _Analysis_assume_(expr)
Definition: sal.h:2916
_Mydeque::size_type size_type
Definition: deque:289
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:347
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const _Container_base12 * _Getcont() const
Definition: xutility:181
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
_Myiter _Deque_const_iterator< _Mydeque >::operator+ ( difference_type  _Off) const
inline
433  { // return this + integer
434  _Myiter _Tmp = *this;
435  return (_Tmp += _Off);
436  }
_Deque_const_iterator< _Mydeque > _Myiter
Definition: deque:285
template<class _Mydeque>
_Myiter& _Deque_const_iterator< _Mydeque >::operator++ ( )
inline
353  { // preincrement
354  #if _ITERATOR_DEBUG_LEVEL == 2
355  _Mydeque *_Mycont = ((_Mydeque *)this->_Getcont());
356  if (_Mycont == 0
357  || _Mycont->_Myoff + _Mycont->_Mysize <= this->_Myoff)
358  { // report error
359  _DEBUG_ERROR("deque iterator not incrementable");
361  }
362 
363  #elif _ITERATOR_DEBUG_LEVEL == 1
364  _Mydeque *_Mycont = ((_Mydeque *)this->_Getcont());
365  _SCL_SECURE_VALIDATE(_Mycont != 0);
367  this->_Myoff < _Mycont->_Myoff + _Mycont->_Mysize);
368  #endif /* _ITERATOR_DEBUG_LEVEL */
369 
370  ++_Myoff;
371  return (*this);
372  }
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:347
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const _Container_base12 * _Getcont() const
Definition: xutility:181
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
_Myiter _Deque_const_iterator< _Mydeque >::operator++ ( int  )
inline
375  { // postincrement
376  _Myiter _Tmp = *this;
377  ++*this;
378  return (_Tmp);
379  }
_Deque_const_iterator< _Mydeque > _Myiter
Definition: deque:285
template<class _Mydeque>
_Myiter& _Deque_const_iterator< _Mydeque >::operator+= ( difference_type  _Off)
inline
410  { // increment by integer
411  #if _ITERATOR_DEBUG_LEVEL == 2
412  _Mydeque *_Mycont = ((_Mydeque *)this->_Getcont());
413  if (_Mycont == 0
414  || this->_Myoff + _Off < _Mycont->_Myoff
415  || _Mycont->_Myoff + _Mycont->_Mysize < this->_Myoff + _Off)
416  { // report error
417  _DEBUG_ERROR("deque iterator + offset out of range");
419  }
420 
421  #elif _ITERATOR_DEBUG_LEVEL == 1
422  _Mydeque *_Mycont = ((_Mydeque *)this->_Getcont());
423  _SCL_SECURE_VALIDATE(_Mycont != 0);
424  _SCL_SECURE_VALIDATE_RANGE(_Mycont->_Myoff <= this->_Myoff + _Off
425  && this->_Myoff + _Off <= _Mycont->_Myoff + _Mycont->_Mysize);
426  #endif /* _ITERATOR_DEBUG_LEVEL */
427 
428  _Myoff += _Off;
429  return (*this);
430  }
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:347
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const _Container_base12 * _Getcont() const
Definition: xutility:181
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
_Myiter _Deque_const_iterator< _Mydeque >::operator- ( difference_type  _Off) const
inline
444  { // return this - integer
445  _Myiter _Tmp = *this;
446  return (_Tmp -= _Off);
447  }
_Deque_const_iterator< _Mydeque > _Myiter
Definition: deque:285
template<class _Mydeque>
difference_type _Deque_const_iterator< _Mydeque >::operator- ( const _Myiter _Right) const
inline
450  { // return difference of iterators
451  _Compat(_Right);
452  return (_Right._Myoff <= this->_Myoff
453  ? this->_Myoff - _Right._Myoff
454  : -(difference_type)(_Right._Myoff - this->_Myoff));
455  }
void _Compat(const _Myiter &) const
Definition: deque:525
_Mydeque::difference_type difference_type
Definition: deque:290
const _Ty & _Right
Definition: algorithm:4087
template<class _Mydeque>
_Myiter& _Deque_const_iterator< _Mydeque >::operator-- ( )
inline
382  { // predecrement
383  #if _ITERATOR_DEBUG_LEVEL == 2
384  _Mydeque *_Mycont = ((_Mydeque *)this->_Getcont());
385  if (_Mycont == 0
386  || this->_Myoff <= _Mycont->_Myoff)
387  { // report error
388  _DEBUG_ERROR("deque iterator not decrementable");
390  }
391 
392  #elif _ITERATOR_DEBUG_LEVEL == 1
393  _Mydeque *_Mycont = ((_Mydeque *)this->_Getcont());
394  _SCL_SECURE_VALIDATE(_Mycont != 0);
395  _SCL_SECURE_VALIDATE_RANGE(_Mycont->_Myoff < this->_Myoff);
396  #endif /* _ITERATOR_DEBUG_LEVEL */
397 
398  --_Myoff;
399  return (*this);
400  }
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:347
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const _Container_base12 * _Getcont() const
Definition: xutility:181
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
_Myiter _Deque_const_iterator< _Mydeque >::operator-- ( int  )
inline
403  { // postdecrement
404  _Myiter _Tmp = *this;
405  --*this;
406  return (_Tmp);
407  }
_Deque_const_iterator< _Mydeque > _Myiter
Definition: deque:285
template<class _Mydeque>
_Myiter& _Deque_const_iterator< _Mydeque >::operator-= ( difference_type  _Off)
inline
439  { // decrement by integer
440  return (*this += -_Off);
441  }
template<class _Mydeque>
pointer _Deque_const_iterator< _Mydeque >::operator-> ( ) const
inline
348  { // return pointer to class object
349  return (_STD pointer_traits<pointer>::pointer_to(**this));
350  }
Definition: xmemory0:198
template<class _Mydeque>
bool _Deque_const_iterator< _Mydeque >::operator< ( const _Myiter _Right) const
inline
474  { // test if this < _Right
475  _Compat(_Right);
476  return (this->_Myoff < _Right._Myoff);
477  }
void _Compat(const _Myiter &) const
Definition: deque:525
const _Ty & _Right
Definition: algorithm:4087
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
bool _Deque_const_iterator< _Mydeque >::operator<= ( const _Myiter _Right) const
inline
485  { // test if this <= _Right
486  return (!(_Right < *this));
487  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mydeque>
bool _Deque_const_iterator< _Mydeque >::operator== ( const _Myiter _Right) const
inline
463  { // test for iterator equality
464  _Compat(_Right);
465  return (this->_Myoff == _Right._Myoff);
466  }
void _Compat(const _Myiter &) const
Definition: deque:525
const _Ty & _Right
Definition: algorithm:4087
size_type _Myoff
Definition: deque:535
template<class _Mydeque>
bool _Deque_const_iterator< _Mydeque >::operator> ( const _Myiter _Right) const
inline
480  { // test if this > _Right
481  return (_Right < *this);
482  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mydeque>
bool _Deque_const_iterator< _Mydeque >::operator>= ( const _Myiter _Right) const
inline
490  { // test if this >= _Right
491  return (!(*this < _Right));
492  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mydeque>
reference _Deque_const_iterator< _Mydeque >::operator[] ( difference_type  _Off) const
inline
458  { // subscript
459  return (*(*this + _Off));
460  }

Member Data Documentation

template<class _Mydeque>
size_type _Deque_const_iterator< _Mydeque >::_Myoff

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