STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
_List_alloc< _Alloc_types > Class Template Reference

Public Types

typedef _List_alloc< _Alloc_types > _Myt
 
typedef _Alloc_types::_Alloc _Alloc
 
typedef _Alloc_types::_Alnod_type _Alty
 
typedef _Alloc_types::_Node _Node
 
typedef _Alloc_types::_Nodeptr _Nodeptr
 
typedef _Alloc_types::_Val_types _Val_types
 
typedef _Nodeptr_Nodepref
 
typedef _Val_types::value_type value_type
 
typedef _Val_types::size_type size_type
 
typedef _Val_types::difference_type difference_type
 
typedef _Val_types::pointer pointer
 
typedef _Val_types::const_pointer const_pointer
 
typedef _Val_types::reference reference
 
typedef _Val_types::const_reference const_reference
 
typedef _List_const_iterator< _List_val< _Val_types > > const_iterator
 
typedef _List_iterator< _List_val< _Val_types > > iterator
 
typedef _List_unchecked_const_iterator< _List_val< _Val_types > > _Unchecked_const_iterator
 
typedef _List_unchecked_iterator< _List_val< _Val_types > > _Unchecked_iterator
 

Public Member Functions

 _List_alloc ()
 
template<class _Any_alloc , class = enable_if_t<!is_same<decay_t<_Any_alloc>, _Myt>::value>>
 _List_alloc (_Any_alloc &&_Al)
 
 ~_List_alloc () _NOEXCEPT
 
void _Alloc_proxy ()
 
void _Free_proxy ()
 
void _Copy_alloc (const _Alty &_Al)
 
void _Move_alloc (_Alty &_Al)
 
_Nodeptr _Buyheadnode ()
 
void _Freeheadnode (_Nodeptr _Pnode)
 
_Nodeptr _Buynode0 (_Nodeptr _Next, _Nodeptr _Prev)
 
void _Orphan_all ()
 
void _Swap_all (_Myt &_Right)
 
_Alty_Getal () _NOEXCEPT
 
const _Alty_Getal () const _NOEXCEPT
 
_List_val< _Val_types > & _Get_data () _NOEXCEPT
 
const _List_val< _Val_types > & _Get_data () const _NOEXCEPT
 
_Nodeptr_Myhead () _NOEXCEPT
 
const _Nodeptr_Myhead () const _NOEXCEPT
 
size_type_Mysize () _NOEXCEPT
 
const size_type_Mysize () const _NOEXCEPT
 

Static Public Member Functions

static _Nodepref _Nextnode (_Nodeptr _Pnode)
 
static _Nodepref _Prevnode (_Nodeptr _Pnode)
 
static reference _Myval (_Nodeptr _Pnode)
 

Private Attributes

_Compressed_pair< _Alty, _List_val< _Val_types > > _Mypair
 

Member Typedef Documentation

template<class _Alloc_types>
typedef _Alloc_types::_Alloc _List_alloc< _Alloc_types >::_Alloc
template<class _Alloc_types>
typedef _Alloc_types::_Alnod_type _List_alloc< _Alloc_types >::_Alty
template<class _Alloc_types>
typedef _List_alloc<_Alloc_types> _List_alloc< _Alloc_types >::_Myt
template<class _Alloc_types>
typedef _Alloc_types::_Node _List_alloc< _Alloc_types >::_Node
template<class _Alloc_types>
typedef _Nodeptr& _List_alloc< _Alloc_types >::_Nodepref
template<class _Alloc_types>
typedef _Alloc_types::_Nodeptr _List_alloc< _Alloc_types >::_Nodeptr
template<class _Alloc_types>
typedef _List_unchecked_const_iterator<_List_val<_Val_types> > _List_alloc< _Alloc_types >::_Unchecked_const_iterator
template<class _Alloc_types>
typedef _List_unchecked_iterator<_List_val<_Val_types> > _List_alloc< _Alloc_types >::_Unchecked_iterator
template<class _Alloc_types>
typedef _Alloc_types::_Val_types _List_alloc< _Alloc_types >::_Val_types
template<class _Alloc_types>
typedef _List_const_iterator<_List_val<_Val_types> > _List_alloc< _Alloc_types >::const_iterator
template<class _Alloc_types>
typedef _Val_types::const_pointer _List_alloc< _Alloc_types >::const_pointer
template<class _Alloc_types>
typedef _Val_types::const_reference _List_alloc< _Alloc_types >::const_reference
template<class _Alloc_types>
typedef _Val_types::difference_type _List_alloc< _Alloc_types >::difference_type
template<class _Alloc_types>
typedef _List_iterator<_List_val<_Val_types> > _List_alloc< _Alloc_types >::iterator
template<class _Alloc_types>
typedef _Val_types::pointer _List_alloc< _Alloc_types >::pointer
template<class _Alloc_types>
typedef _Val_types::reference _List_alloc< _Alloc_types >::reference
template<class _Alloc_types>
typedef _Val_types::size_type _List_alloc< _Alloc_types >::size_type
template<class _Alloc_types>
typedef _Val_types::value_type _List_alloc< _Alloc_types >::value_type

Constructor & Destructor Documentation

template<class _Alloc_types>
_List_alloc< _Alloc_types >::_List_alloc ( )
inline
596  { // default construct head node
597  _Myhead() = _Buyheadnode();
598  }
_Nodeptr _Buyheadnode()
Definition: list:729
_Compressed_pair< _Alty, _List_val< _Val_types > > _Mypair
Definition: list:817
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
Definition: xutility:278
template<class _Alloc_types>
template<class _Any_alloc , class = enable_if_t<!is_same<decay_t<_Any_alloc>, _Myt>::value>>
_List_alloc< _Alloc_types >::_List_alloc ( _Any_alloc &&  _Al)
inline
604  _STD forward<_Any_alloc>(_Al))
605  { // construct head node, allocator from _Al
606  _Myhead() = _Buyheadnode();
607  }
_Nodeptr _Buyheadnode()
Definition: list:729
_Compressed_pair< _Alty, _List_val< _Val_types > > _Mypair
Definition: list:817
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
Definition: xutility:282
template<class _Alloc_types>
_List_alloc< _Alloc_types >::~_List_alloc ( )
inline
610  { // destroy head node
612  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
void _Freeheadnode(_Nodeptr _Pnode)
Definition: list:734

Member Function Documentation

template<class _Alloc_types>
void _List_alloc< _Alloc_types >::_Alloc_proxy ( )
inline
615  { // do nothing
616  }
template<class _Alloc_types>
_Nodeptr _List_alloc< _Alloc_types >::_Buyheadnode ( )
inline
730  { // get head node using current allocator
731  return (_Buynode0(_Nodeptr(), _Nodeptr()));
732  }
_Nodeptr _Buynode0(_Nodeptr _Next, _Nodeptr _Prev)
Definition: list:743
_Alloc_types::_Nodeptr _Nodeptr
Definition: list:556
template<class _Alloc_types>
_Nodeptr _List_alloc< _Alloc_types >::_Buynode0 ( _Nodeptr  _Next,
_Nodeptr  _Prev 
)
inline
745  { // allocate a node and set links
746  _Nodeptr _Pnode = _Getal().allocate(1);
747 
748  if (_Next == _Nodeptr())
749  { // point at self
750  _Next = _Pnode;
751  _Prev = _Pnode;
752  }
753  _TRY_BEGIN
754  _Getal().construct(
755  _STD addressof(_Nextnode(_Pnode)), _Next);
756  _Getal().construct(
757  _STD addressof(_Prevnode(_Pnode)), _Prev);
758  _CATCH_ALL
759  _Getal().deallocate(_Pnode, 1);
760  _RERAISE;
761  _CATCH_END
762 
763  return (_Pnode);
764  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
#define _CATCH_ALL
Definition: xstddef:28
_Alty & _Getal() _NOEXCEPT
Definition: list:776
_Alloc_types::_Nodeptr _Nodeptr
Definition: list:556
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
#define _RERAISE
Definition: xstddef:32
template<class _Alloc_types>
void _List_alloc< _Alloc_types >::_Copy_alloc ( const _Alty _Al)
inline
692  { // replace old allocator
693  const bool _Reload = _Alty::propagate_on_container_copy_assignment::value && _Getal() != _Al;
694 
695  if (_Reload)
696  {
697  _Free_proxy();
699  }
700 
701  _Pocca(_Getal(), _Al);
702 
703  if (_Reload)
704  {
705  _Myhead() = _Buyheadnode();
706  _Alloc_proxy();
707  }
708  }
void _Free_proxy()
Definition: list:618
_Nodeptr _Buyheadnode()
Definition: list:729
void _Alloc_proxy()
Definition: list:614
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
void _Freeheadnode(_Nodeptr _Pnode)
Definition: list:734
void _Pocca(_Alty &_Left, const _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1131
_Alty & _Getal() _NOEXCEPT
Definition: list:776
template<class _Alloc_types>
void _List_alloc< _Alloc_types >::_Free_proxy ( )
inline
619  { // do nothing
620  }
template<class _Alloc_types>
void _List_alloc< _Alloc_types >::_Freeheadnode ( _Nodeptr  _Pnode)
inline
735  { // free head node using current allocator
736  _Getal().destroy(
737  _STD addressof(_Nextnode(_Pnode)));
738  _Getal().destroy(
739  _STD addressof(_Prevnode(_Pnode)));
740  _Getal().deallocate(_Pnode, 1);
741  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
_Alty & _Getal() _NOEXCEPT
Definition: list:776
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Alloc_types>
_List_val<_Val_types>& _List_alloc< _Alloc_types >::_Get_data ( )
inline
787  { // return reference to _List_val
788  return (_Mypair._Get_second());
789  }
_Ty2 & _Get_second() _NOEXCEPT
Definition: xutility:336
_Compressed_pair< _Alty, _List_val< _Val_types > > _Mypair
Definition: list:817
template<class _Alloc_types>
const _List_val<_Val_types>& _List_alloc< _Alloc_types >::_Get_data ( ) const
inline
792  { // return const reference to _List_val
793  return (_Mypair._Get_second());
794  }
_Ty2 & _Get_second() _NOEXCEPT
Definition: xutility:336
_Compressed_pair< _Alty, _List_val< _Val_types > > _Mypair
Definition: list:817
template<class _Alloc_types>
_Alty& _List_alloc< _Alloc_types >::_Getal ( )
inline
777  { // return reference to allocator
778  return (_Mypair._Get_first());
779  }
_Ty1 & _Get_first() _NOEXCEPT
Definition: xutility:316
_Compressed_pair< _Alty, _List_val< _Val_types > > _Mypair
Definition: list:817
template<class _Alloc_types>
const _Alty& _List_alloc< _Alloc_types >::_Getal ( ) const
inline
782  { // return const reference to allocator
783  return (_Mypair._Get_first());
784  }
_Ty1 & _Get_first() _NOEXCEPT
Definition: xutility:316
_Compressed_pair< _Alty, _List_val< _Val_types > > _Mypair
Definition: list:817
template<class _Alloc_types>
void _List_alloc< _Alloc_types >::_Move_alloc ( _Alty _Al)
inline
711  { // replace old allocator
712  const bool _Reload = _Alty::propagate_on_container_move_assignment::value && _Getal() != _Al;
713 
714  if (_Reload)
715  {
716  _Free_proxy();
718  }
719 
720  _Pocma(_Getal(), _Al);
721 
722  if (_Reload)
723  {
724  _Myhead() = _Buyheadnode();
725  _Alloc_proxy();
726  }
727  }
void _Free_proxy()
Definition: list:618
_Nodeptr _Buyheadnode()
Definition: list:729
void _Alloc_proxy()
Definition: list:614
void _Pocma(_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1150
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
void _Freeheadnode(_Nodeptr _Pnode)
Definition: list:734
_Alty & _Getal() _NOEXCEPT
Definition: list:776
template<class _Alloc_types>
_Nodeptr& _List_alloc< _Alloc_types >::_Myhead ( )
inline
797  { // return reference to _Myhead
798  return (_Get_data()._Myhead);
799  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Alloc_types>
const _Nodeptr& _List_alloc< _Alloc_types >::_Myhead ( ) const
inline
802  { // return const reference to _Myhead
803  return (_Get_data()._Myhead);
804  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Alloc_types>
size_type& _List_alloc< _Alloc_types >::_Mysize ( )
inline
807  { // return reference to _Mysize
808  return (_Get_data()._Mysize);
809  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Alloc_types>
const size_type& _List_alloc< _Alloc_types >::_Mysize ( ) const
inline
812  { // return const reference to _Mysize
813  return (_Get_data()._Mysize);
814  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Alloc_types>
static reference _List_alloc< _Alloc_types >::_Myval ( _Nodeptr  _Pnode)
inlinestatic
589  { // return reference to value in node
590  return (_List_val<_Val_types>::_Myval(_Pnode));
591  }
Definition: list:499
template<class _Alloc_types>
static _Nodepref _List_alloc< _Alloc_types >::_Nextnode ( _Nodeptr  _Pnode)
inlinestatic
579  { // return reference to successor pointer in node
580  return (_List_val<_Val_types>::_Nextnode(_Pnode));
581  }
Definition: list:499
template<class _Alloc_types>
void _List_alloc< _Alloc_types >::_Orphan_all ( )
inline
767  { // orphan all iterators
768  _Get_data()._Orphan_all();
769  }
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Alloc_types>
static _Nodepref _List_alloc< _Alloc_types >::_Prevnode ( _Nodeptr  _Pnode)
inlinestatic
584  { // return reference to predecessor pointer in node
585  return (_List_val<_Val_types>::_Prevnode(_Pnode));
586  }
Definition: list:499
template<class _Alloc_types>
void _List_alloc< _Alloc_types >::_Swap_all ( _Myt _Right)
inline
772  { // swap all iterators
773  _Get_data()._Swap_all(_Right._Get_data());
774  }
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
constexpr const _Ty &() _Right
Definition: algorithm:3723

Member Data Documentation

template<class _Alloc_types>
_Compressed_pair<_Alty, _List_val<_Val_types> > _List_alloc< _Alloc_types >::_Mypair
private

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