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

Public Types

typedef _Tree_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 _Tree_val< _Alloc_types::_Val_types >
enum  _Redbl
 
typedef _Tree_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 _Tree_const_iterator< _Mytconst_iterator
 
typedef _Tree_iterator< _Mytiterator
 

Public Member Functions

 _Tree_alloc (const _Alloc &_Al=_Alloc())
 
 ~_Tree_alloc () _NOEXCEPT
 
void _Change_alloc (const _Alty &_Al)
 
void _Swap_alloc (_Myt &_Right)
 
_Nodeptr _Buyheadnode ()
 
void _Freeheadnode (_Nodeptr _Pnode)
 
_Alty_Getal ()
 
const _Alty_Getal () const
 
- Public Member Functions inherited from _Tree_val< _Alloc_types::_Val_types >
 _Tree_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 _Tree_val< _Alloc_types::_Val_types >
_Nodeptr _Myhead
 
size_type _Mysize
 

Additional Inherited Members

- Static Public Member Functions inherited from _Tree_val< _Alloc_types::_Val_types >
static char & _Color (_Nodeptr _Pnode)
 
static char & _Isnil (_Nodeptr _Pnode)
 
static _Nodepref _Left (_Nodeptr _Pnode)
 
static _Nodepref _Parent (_Nodeptr _Pnode)
 
static _Nodepref _Right (_Nodeptr _Pnode)
 
static reference _Myval (_Nodeptr _Pnode)
 
static _Nodeptr _Max (_Nodeptr _Pnode)
 
static _Nodeptr _Min (_Nodeptr _Pnode)
 

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<bool _Al_has_storage, class _Alloc_types>
_Tree_alloc< _Al_has_storage, _Alloc_types >::_Tree_alloc ( const _Alloc _Al = _Alloc())
inline
642  : _Alnod(_Al)
643  { // construct head node, allocator from _Al
644  this->_Myhead = _Buyheadnode();
645  }
_Nodeptr _Myhead
Definition: xtree:621
_Alloc_types::_Alnod_type _Alnod
Definition: xtree:632
_Nodeptr _Buyheadnode()
Definition: xtree:714
template<bool _Al_has_storage, class _Alloc_types>
_Tree_alloc< _Al_has_storage, _Alloc_types >::~_Tree_alloc ( )
inline
648  { // destroy head node
649  _Freeheadnode(this->_Myhead);
650  }
_Nodeptr _Myhead
Definition: xtree:621
void _Freeheadnode(_Nodeptr _Pnode)
Definition: xtree:735

Member Function Documentation

template<bool _Al_has_storage, class _Alloc_types>
_Nodeptr _Tree_alloc< _Al_has_storage, _Alloc_types >::_Buyheadnode ( )
inline
715  { // get head node using current allocator
716  _Nodeptr _Pnode = this->_Alnod.allocate(1);
717 
718  _TRY_BEGIN
719  this->_Alnod.construct(
720  _STD addressof(this->_Left(_Pnode)), _Pnode);
721  this->_Alnod.construct(
722  _STD addressof(this->_Parent(_Pnode)), _Pnode);
723  this->_Alnod.construct(
724  _STD addressof(this->_Right(_Pnode)), _Pnode);
725  _CATCH_ALL
726  this->_Alnod.deallocate(_Pnode, 1);
727  _RERAISE;
728  _CATCH_END
729 
730  this->_Color(_Pnode) = this->_Black;
731  this->_Isnil(_Pnode) = true;
732  return (_Pnode);
733  }
static char & _Color(_Nodeptr _Pnode)
Definition: xtree:577
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
static char & _Isnil(_Nodeptr _Pnode)
Definition: xtree:582
static _Nodepref _Left(_Nodeptr _Pnode)
Definition: xtree:587
static _Nodepref _Parent(_Nodeptr _Pnode)
Definition: xtree:592
#define _CATCH_ALL
Definition: xstddef:62
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
_Alloc_types::_Alnod_type _Alnod
Definition: xtree:632
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:597
#define _RERAISE
Definition: xstddef:74
_Alloc_types::_Nodeptr _Nodeptr
Definition: xtree:638
template<bool _Al_has_storage, class _Alloc_types>
void _Tree_alloc< _Al_has_storage, _Alloc_types >::_Change_alloc ( const _Alty _Al)
inline
653  { // replace old allocator
654  this->_Alnod = _Al;
655  }
_Alloc_types::_Alnod_type _Alnod
Definition: xtree:632
template<bool _Al_has_storage, class _Alloc_types>
void _Tree_alloc< _Al_has_storage, _Alloc_types >::_Freeheadnode ( _Nodeptr  _Pnode)
inline
736  { // free head node using current allocator
737  this->_Alnod.destroy(
738  _STD addressof(this->_Left(_Pnode)));
739  this->_Alnod.destroy(
740  _STD addressof(this->_Parent(_Pnode)));
741  this->_Alnod.destroy(
742  _STD addressof(this->_Right(_Pnode)));
743  this->_Alnod.deallocate(_Pnode, 1);
744  }
static _Nodepref _Left(_Nodeptr _Pnode)
Definition: xtree:587
static _Nodepref _Parent(_Nodeptr _Pnode)
Definition: xtree:592
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
_Alloc_types::_Alnod_type _Alnod
Definition: xtree:632
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:597
template<bool _Al_has_storage, class _Alloc_types>
_Alty& _Tree_alloc< _Al_has_storage, _Alloc_types >::_Getal ( )
inline
747  { // get reference to allocator
748  return (this->_Alnod);
749  }
_Alloc_types::_Alnod_type _Alnod
Definition: xtree:632
template<bool _Al_has_storage, class _Alloc_types>
const _Alty& _Tree_alloc< _Al_has_storage, _Alloc_types >::_Getal ( ) const
inline
752  { // get reference to allocator
753  return (this->_Alnod);
754  }
_Alloc_types::_Alnod_type _Alnod
Definition: xtree:632
template<bool _Al_has_storage, class _Alloc_types>
void _Tree_alloc< _Al_has_storage, _Alloc_types >::_Swap_alloc ( _Myt _Right)
inline
658  { // swap allocators
659  _Swap_adl(this->_Alnod, _Right._Alnod);
660  }
_Alloc_types::_Alnod_type _Alnod
Definition: xtree:632
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:597

Member Data Documentation

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

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