STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions
deque File Reference
#include <xmemory>
#include <stdexcept>

Classes

class  _Deque_unchecked_const_iterator< _Mydeque >
 
class  _Deque_unchecked_iterator< _Mydeque >
 
class  _Deque_const_iterator< _Mydeque >
 
class  _Deque_iterator< _Mydeque >
 
struct  _Deque_iter_types< _Value_type, _Size_type, _Difference_type, _Pointer, _Const_pointer, _Reference, _Const_reference, _Mapptr_type >
 
struct  _Deque_simple_types< _Ty >
 
struct  _Deque_base_types< _Ty, _Alloc0 >
 
class  _Deque_val< _Val_types >
 
class  _Deque_alloc< _Al_has_storage, _Alloc_types >
 
class  _Deque_alloc< false, _Alloc_types >
 
class  deque< _Ty, _Alloc >
 

Macros

#define _DEQUE_
 
#define _DEQUEMAPSIZ   8 /* minimum map size, at least 1 */
 
#define _DEQUESIZ
 
#define _PUSH_FRONT_BEGIN
 
#define _PUSH_FRONT_END
 
#define _PUSH_BACK_BEGIN
 
#define _PUSH_BACK_END   ++this->_Mysize
 

Functions

template<class _Mydeque >
_Deque_unchecked_const_iterator< _Mydeque > operator+ (typename _Deque_unchecked_const_iterator< _Mydeque >::difference_type _Off, _Deque_unchecked_const_iterator< _Mydeque > _Next)
 
template<class _Mydeque >
_Deque_unchecked_iterator< _Mydeque > operator+ (typename _Deque_unchecked_iterator< _Mydeque >::difference_type _Off, _Deque_unchecked_iterator< _Mydeque > _Next)
 
template<class _Mydeque >
_Deque_const_iterator< _Mydeque >::_Unchecked_type _Unchecked (_Deque_const_iterator< _Mydeque > _Iter)
 
template<class _Mydeque >
_Deque_const_iterator< _Mydeque > & _Rechecked (_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
 
template<class _Mydeque >
_Deque_const_iterator< _Mydeque > operator+ (typename _Deque_const_iterator< _Mydeque >::difference_type _Off, _Deque_const_iterator< _Mydeque > _Next)
 
template<class _Mydeque >
_Deque_iterator< _Mydeque >::_Unchecked_type _Unchecked (_Deque_iterator< _Mydeque > _Iter)
 
template<class _Mydeque >
_Deque_iterator< _Mydeque > & _Rechecked (_Deque_iterator< _Mydeque > &_Iter, typename _Deque_iterator< _Mydeque >::_Unchecked_type _Right)
 
template<class _Mydeque >
_Deque_iterator< _Mydeque > operator+ (typename _Deque_iterator< _Mydeque >::difference_type _Off, _Deque_iterator< _Mydeque > _Next)
 
template<class _Ty , class _Alloc >
void swap (deque< _Ty, _Alloc > &_Left, deque< _Ty, _Alloc > &_Right)
 
template<class _Ty , class _Alloc >
bool operator== (const deque< _Ty, _Alloc > &_Left, const deque< _Ty, _Alloc > &_Right)
 
template<class _Ty , class _Alloc >
bool operator!= (const deque< _Ty, _Alloc > &_Left, const deque< _Ty, _Alloc > &_Right)
 
template<class _Ty , class _Alloc >
bool operator< (const deque< _Ty, _Alloc > &_Left, const deque< _Ty, _Alloc > &_Right)
 
template<class _Ty , class _Alloc >
bool operator<= (const deque< _Ty, _Alloc > &_Left, const deque< _Ty, _Alloc > &_Right)
 
template<class _Ty , class _Alloc >
bool operator> (const deque< _Ty, _Alloc > &_Left, const deque< _Ty, _Alloc > &_Right)
 
template<class _Ty , class _Alloc >
bool operator>= (const deque< _Ty, _Alloc > &_Left, const deque< _Ty, _Alloc > &_Right)
 

Macro Definition Documentation

#define _DEQUE_
#define _DEQUEMAPSIZ   8 /* minimum map size, at least 1 */
#define _DEQUESIZ
Value:
(sizeof (value_type) <= 1 ? 16 \
: sizeof (value_type) <= 2 ? 8 \
: sizeof (value_type) <= 4 ? 4 \
: sizeof (value_type) <= 8 ? 2 \
: 1) /* elements per block (a power of 2) */
#define _PUSH_BACK_BEGIN
Value:
if ((this->_Myoff + this->_Mysize) % _DEQUESIZ == 0 \
&& this->_Mapsize <= (this->_Mysize + _DEQUESIZ) / _DEQUESIZ) \
_Growmap(1); \
this->_Myoff &= this->_Mapsize * _DEQUESIZ - 1; \
size_type _Newoff = this->_Myoff + this->_Mysize; \
size_type _Block = this->_Getblock(_Newoff); \
if (this->_Map[_Block] == pointer()) \
this->_Map[_Block] = this->_Getal().allocate(_DEQUESIZ)
#define _DEQUESIZ
Definition: deque:19
if(__pUnknown!=*__ppTargetUnknown)
Definition: vccorlib.h:394
#define _PUSH_BACK_END   ++this->_Mysize
#define _PUSH_FRONT_BEGIN
Value:
if (this->_Myoff % _DEQUESIZ == 0 \
&& this->_Mapsize <= (this->_Mysize + _DEQUESIZ) / _DEQUESIZ) \
_Growmap(1); \
this->_Myoff &= this->_Mapsize * _DEQUESIZ - 1; \
size_type _Newoff = this->_Myoff != 0 ? this->_Myoff \
: this->_Mapsize * _DEQUESIZ; \
size_type _Block = this->_Getblock(--_Newoff); \
if (this->_Map[_Block] == pointer()) \
this->_Map[_Block] = this->_Getal().allocate(_DEQUESIZ)
#define _DEQUESIZ
Definition: deque:19
if(__pUnknown!=*__ppTargetUnknown)
Definition: vccorlib.h:394
#define _PUSH_FRONT_END
Value:
this->_Myoff = _Newoff; \
++this->_Mysize

Function Documentation

template<class _Mydeque >
_Deque_const_iterator<_Mydeque>& _Rechecked ( _Deque_const_iterator< _Mydeque > &  _Iter,
typename _Deque_const_iterator< _Mydeque >::_Unchecked_type  _Right 
)
inline
550  { // convert to checked
551  return (_Iter._Rechecked(_Right));
552  }
_Myiter & _Rechecked(_Unchecked_type _Right)
Definition: deque:310
const _Ty & _Right
Definition: algorithm:4087
template<class _Mydeque >
_Deque_iterator<_Mydeque>& _Rechecked ( _Deque_iterator< _Mydeque > &  _Iter,
typename _Deque_iterator< _Mydeque >::_Unchecked_type  _Right 
)
inline
683  { // convert to checked
684  return (_Iter._Rechecked(_Right));
685  }
_Myiter & _Rechecked(_Unchecked_type _Right)
Definition: deque:590
const _Ty & _Right
Definition: algorithm:4087
template<class _Mydeque >
_Deque_const_iterator<_Mydeque>::_Unchecked_type _Unchecked ( _Deque_const_iterator< _Mydeque >  _Iter)
inline
541  { // convert to unchecked
542  return (_Iter._Unchecked());
543  }
_Unchecked_type _Unchecked() const
Definition: deque:316
template<class _Mydeque >
_Deque_iterator<_Mydeque>::_Unchecked_type _Unchecked ( _Deque_iterator< _Mydeque >  _Iter)
inline
674  { // convert to unchecked
675  return (_Iter._Unchecked());
676  }
_Unchecked_type _Unchecked() const
Definition: deque:596
template<class _Ty , class _Alloc >
bool operator!= ( const deque< _Ty, _Alloc > &  _Left,
const deque< _Ty, _Alloc > &  _Right 
)
inline
1893  { // test for deque inequality
1894  return (!(_Left == _Right));
1895  }
template<class _Mydeque >
_Deque_unchecked_const_iterator<_Mydeque> operator+ ( typename _Deque_unchecked_const_iterator< _Mydeque >::difference_type  _Off,
_Deque_unchecked_const_iterator< _Mydeque >  _Next 
)
inline
170  { // add offset to iterator
171  return (_Next += _Off);
172  }
template<class _Mydeque >
_Deque_unchecked_iterator<_Mydeque> operator+ ( typename _Deque_unchecked_iterator< _Mydeque >::difference_type  _Off,
_Deque_unchecked_iterator< _Mydeque >  _Next 
)
inline
275  { // add offset to iterator
276  return (_Next += _Off);
277  }
template<class _Mydeque >
_Deque_const_iterator<_Mydeque> operator+ ( typename _Deque_const_iterator< _Mydeque >::difference_type  _Off,
_Deque_const_iterator< _Mydeque >  _Next 
)
inline
558  { // add offset to iterator
559  return (_Next += _Off);
560  }
template<class _Mydeque >
_Deque_iterator<_Mydeque> operator+ ( typename _Deque_iterator< _Mydeque >::difference_type  _Off,
_Deque_iterator< _Mydeque >  _Next 
)
inline
691  { // add offset to iterator
692  return (_Next += _Off);
693  }
template<class _Ty , class _Alloc >
bool operator< ( const deque< _Ty, _Alloc > &  _Left,
const deque< _Ty, _Alloc > &  _Right 
)
inline
1901  { // test if _Left < _Right for deques
1902  return (lexicographical_compare(_Left.begin(), _Left.end(),
1903  _Right.begin(), _Right.end()));
1904  }
iterator end() _NOEXCEPT
Definition: deque:1259
iterator begin() _NOEXCEPT
Definition: deque:1249
bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
Definition: memory:830
template<class _Ty , class _Alloc >
bool operator<= ( const deque< _Ty, _Alloc > &  _Left,
const deque< _Ty, _Alloc > &  _Right 
)
inline
1910  { // test if _Left <= _Right for deques
1911  return (!(_Right < _Left));
1912  }
template<class _Ty , class _Alloc >
bool operator== ( const deque< _Ty, _Alloc > &  _Left,
const deque< _Ty, _Alloc > &  _Right 
)
inline
1884  { // test for deque equality
1885  return (_Left.size() == _Right.size()
1886  && equal(_Left.begin(), _Left.end(), _Right.begin()));
1887  }
iterator end() _NOEXCEPT
Definition: deque:1259
size_type size() const _NOEXCEPT
Definition: deque:1350
iterator begin() _NOEXCEPT
Definition: deque:1249
bool equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
Definition: memory:611
template<class _Ty , class _Alloc >
bool operator> ( const deque< _Ty, _Alloc > &  _Left,
const deque< _Ty, _Alloc > &  _Right 
)
inline
1918  { // test if _Left > _Right for deques
1919  return (_Right < _Left);
1920  }
template<class _Ty , class _Alloc >
bool operator>= ( const deque< _Ty, _Alloc > &  _Left,
const deque< _Ty, _Alloc > &  _Right 
)
inline
1926  { // test if _Left >= _Right for deques
1927  return (!(_Left < _Right));
1928  }
template<class _Ty , class _Alloc >
void swap ( deque< _Ty, _Alloc > &  _Left,
deque< _Ty, _Alloc > &  _Right 
)
inline
1876  { // swap _Left and _Right deques
1877  _Left.swap(_Right);
1878  }
void swap(_Myt &_Right)
Definition: deque:1646