STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
_List_alloc< _Al_has_storage, _Alloc_types > Class Template Reference
Inheritance diagram for _List_alloc< _Al_has_storage, _Alloc_types >:
_List_val< _Alloc_types::_Val_types > _Container_base0

Public Types

typedef _List_alloc< _Al_has_storage, _Alloc_types > _Myt
 
typedef _Alloc_types::_Alloc _Alloc
 
typedef _Alloc_types::_Alnod_type _Alty
 
typedef _Alloc_types::_Node _Node
 
typedef _Alloc_types::_Nodeptr _Nodeptr
 
- Public Types inherited from _List_val< _Alloc_types::_Val_types >
typedef _List_val< _Alloc_types::_Val_types > _Myt
 
typedef _Alloc_types::_Val_types::_Nodeptr _Nodeptr
 
typedef _Nodeptr_Nodepref
 
typedef _Alloc_types::_Val_types::value_type value_type
 
typedef _Alloc_types::_Val_types::size_type size_type
 
typedef _Alloc_types::_Val_types::difference_type difference_type
 
typedef _Alloc_types::_Val_types::pointer pointer
 
typedef _Alloc_types::_Val_types::const_pointer const_pointer
 
typedef _Alloc_types::_Val_types::reference reference
 
typedef _Alloc_types::_Val_types::const_reference const_reference
 
typedef _List_const_iterator< _Mytconst_iterator
 
typedef _List_iterator< _Mytiterator
 
typedef _List_unchecked_const_iterator< _Myt_Unchecked_const_iterator
 
typedef _List_unchecked_iterator< _Myt_Unchecked_iterator
 

Public Member Functions

 _List_alloc (const _Alloc &_Al=_Alloc())
 
 ~_List_alloc () _NOEXCEPT
 
void _Change_alloc (const _Alty &_Al)
 
void _Swap_alloc (_Myt &_Right)
 
_Nodeptr _Buyheadnode ()
 
void _Freeheadnode (_Nodeptr _Pnode)
 
_Nodeptr _Buynode0 (_Nodeptr _Next, _Nodeptr _Prev)
 
_Alty_Getal ()
 
const _Alty_Getal () const
 
- Public Member Functions inherited from _List_val< _Alloc_types::_Val_types >
 _List_val ()
 
- Public Member Functions inherited from _Container_base0
void _Orphan_all ()
 
void _Swap_all (_Container_base0 &)
 

Public Attributes

_Alloc_types::_Alnod_type _Alnod
 
- Public Attributes inherited from _List_val< _Alloc_types::_Val_types >
_Nodeptr _Myhead
 
size_type _Mysize
 

Additional Inherited Members

- Static Public Member Functions inherited from _List_val< _Alloc_types::_Val_types >
static _Nodepref _Nextnode (_Nodeptr _Pnode)
 
static _Nodepref _Prevnode (_Nodeptr _Pnode)
 
static reference _Myval (_Nodeptr _Pnode)
 

Member Typedef Documentation

template<bool _Al_has_storage, class _Alloc_types>
typedef _Alloc_types::_Alloc _List_alloc< _Al_has_storage, _Alloc_types >::_Alloc
template<bool _Al_has_storage, class _Alloc_types>
typedef _Alloc_types::_Alnod_type _List_alloc< _Al_has_storage, _Alloc_types >::_Alty
template<bool _Al_has_storage, class _Alloc_types>
typedef _List_alloc<_Al_has_storage, _Alloc_types> _List_alloc< _Al_has_storage, _Alloc_types >::_Myt
template<bool _Al_has_storage, class _Alloc_types>
typedef _Alloc_types::_Node _List_alloc< _Al_has_storage, _Alloc_types >::_Node
template<bool _Al_has_storage, class _Alloc_types>
typedef _Alloc_types::_Nodeptr _List_alloc< _Al_has_storage, _Alloc_types >::_Nodeptr

Constructor & Destructor Documentation

template<bool _Al_has_storage, class _Alloc_types>
_List_alloc< _Al_has_storage, _Alloc_types >::_List_alloc ( const _Alloc _Al = _Alloc())
inline
567  : _Alnod(_Al)
568  { // construct head node, allocator from _Al
569  this->_Myhead = _Buyheadnode();
570  }
_Nodeptr _Myhead
Definition: list:546
_Alloc_types::_Alnod_type _Alnod
Definition: list:557
_Nodeptr _Buyheadnode()
Definition: list:639
template<bool _Al_has_storage, class _Alloc_types>
_List_alloc< _Al_has_storage, _Alloc_types >::~_List_alloc ( )
inline
573  { // destroy head node
574  _Freeheadnode(this->_Myhead);
575  }
_Nodeptr _Myhead
Definition: list:546
void _Freeheadnode(_Nodeptr _Pnode)
Definition: list:644

Member Function Documentation

template<bool _Al_has_storage, class _Alloc_types>
_Nodeptr _List_alloc< _Al_has_storage, _Alloc_types >::_Buyheadnode ( )
inline
640  { // get head node using current allocator
641  return (_Buynode0(_Nodeptr(), _Nodeptr()));
642  }
_Nodeptr _Buynode0(_Nodeptr _Next, _Nodeptr _Prev)
Definition: list:653
_Alloc_types::_Nodeptr _Nodeptr
Definition: list:563
template<bool _Al_has_storage, class _Alloc_types>
_Nodeptr _List_alloc< _Al_has_storage, _Alloc_types >::_Buynode0 ( _Nodeptr  _Next,
_Nodeptr  _Prev 
)
inline
655  { // allocate a node and set links
656  _Nodeptr _Pnode = this->_Alnod.allocate(1);
657 
658  if (_Next == _Nodeptr())
659  { // point at self
660  _Next = _Pnode;
661  _Prev = _Pnode;
662  }
663  _TRY_BEGIN
664  this->_Alnod.construct(
665  _STD addressof(this->_Nextnode(_Pnode)), _Next);
666  this->_Alnod.construct(
667  _STD addressof(this->_Prevnode(_Pnode)), _Prev);
668  _CATCH_ALL
669  this->_Alnod.deallocate(_Pnode, 1);
670  _RERAISE;
671  _CATCH_END
672 
673  return (_Pnode);
674  }
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:531
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:536
#define _CATCH_ALL
Definition: xstddef:62
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
_Alloc_types::_Nodeptr _Nodeptr
Definition: list:563
_Alloc_types::_Alnod_type _Alnod
Definition: list:557
#define _RERAISE
Definition: xstddef:74
template<bool _Al_has_storage, class _Alloc_types>
void _List_alloc< _Al_has_storage, _Alloc_types >::_Change_alloc ( const _Alty _Al)
inline
578  { // replace old allocator
579  this->_Alnod = _Al;
580  }
_Alloc_types::_Alnod_type _Alnod
Definition: list:557
template<bool _Al_has_storage, class _Alloc_types>
void _List_alloc< _Al_has_storage, _Alloc_types >::_Freeheadnode ( _Nodeptr  _Pnode)
inline
645  { // free head node using current allocator
646  this->_Alnod.destroy(
647  _STD addressof(this->_Nextnode(_Pnode)));
648  this->_Alnod.destroy(
649  _STD addressof(this->_Prevnode(_Pnode)));
650  this->_Alnod.deallocate(_Pnode, 1);
651  }
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:531
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:536
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
_Alloc_types::_Alnod_type _Alnod
Definition: list:557
template<bool _Al_has_storage, class _Alloc_types>
_Alty& _List_alloc< _Al_has_storage, _Alloc_types >::_Getal ( )
inline
677  { // get reference to allocator
678  return (this->_Alnod);
679  }
_Alloc_types::_Alnod_type _Alnod
Definition: list:557
template<bool _Al_has_storage, class _Alloc_types>
const _Alty& _List_alloc< _Al_has_storage, _Alloc_types >::_Getal ( ) const
inline
682  { // get reference to allocator
683  return (this->_Alnod);
684  }
_Alloc_types::_Alnod_type _Alnod
Definition: list:557
template<bool _Al_has_storage, class _Alloc_types>
void _List_alloc< _Al_has_storage, _Alloc_types >::_Swap_alloc ( _Myt _Right)
inline
583  { // swap allocators
584  _Swap_adl(this->_Alnod, _Right._Alnod);
585  }
_Alloc_types::_Alnod_type _Alnod
Definition: list:557
const _Ty & _Right
Definition: algorithm:4087

Member Data Documentation

template<bool _Al_has_storage, class _Alloc_types>
_Alloc_types::_Alnod_type _List_alloc< _Al_has_storage, _Alloc_types >::_Alnod

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