STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | List of all members
_Tree_buy< _Ty, _Alloc > Class Template Reference
Inheritance diagram for _Tree_buy< _Ty, _Alloc >:
_Tree_alloc<!is_empty< _Alloc >::value, _Tree_base_types< _Ty, _Alloc > > _Tree_val< _Tree_base_types< _Ty, _Alloc >::_Val_types > _Container_base0

Public Types

typedef _Tree_alloc<!is_empty< _Alloc >::value, _Tree_base_types< _Ty, _Alloc > > _Mybase
 
typedef _Mybase::_Alty _Alty
 
typedef _Mybase::_Nodeptr _Nodeptr
 
typedef _Mybase::value_type value_type
 
- Public Types inherited from _Tree_alloc<!is_empty< _Alloc >::value, _Tree_base_types< _Ty, _Alloc > >
typedef _Tree_alloc< _Al_has_storage, _Tree_base_types< _Ty, _Alloc > > _Myt
 
typedef _Tree_base_types< _Ty, _Alloc >::_Alloc _Alloc
 
typedef _Tree_base_types< _Ty, _Alloc >::_Alnod_type _Alty
 
typedef _Tree_base_types< _Ty, _Alloc >::_Node _Node
 
typedef _Tree_base_types< _Ty, _Alloc >::_Nodeptr _Nodeptr
 
- Public Types inherited from _Tree_val< _Tree_base_types< _Ty, _Alloc >::_Val_types >
enum  _Redbl
 
typedef _Tree_val< _Tree_base_types< _Ty, _Alloc >::_Val_types > _Myt
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::_Nodeptr _Nodeptr
 
typedef _Nodeptr_Nodepref
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::value_type value_type
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::size_type size_type
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::difference_type difference_type
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::pointer pointer
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::const_pointer const_pointer
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::reference reference
 
typedef _Tree_base_types< _Ty, _Alloc >::_Val_types::const_reference const_reference
 
typedef _Tree_const_iterator< _Mytconst_iterator
 
typedef _Tree_iterator< _Mytiterator
 

Public Member Functions

 _Tree_buy (const _Alloc &_Al=_Alloc())
 
_Nodeptr _Buynode0 ()
 
void _Freenode0 (_Nodeptr _Pnode)
 
template<class... _Valty>
_Nodeptr _Buynode (_Valty &&..._Val)
 
- Public Member Functions inherited from _Tree_alloc<!is_empty< _Alloc >::value, _Tree_base_types< _Ty, _Alloc > >
 _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< _Tree_base_types< _Ty, _Alloc >::_Val_types >
 _Tree_val ()
 
- Public Member Functions inherited from _Container_base0
void _Orphan_all ()
 
void _Swap_all (_Container_base0 &)
 

Additional Inherited Members

- Static Public Member Functions inherited from _Tree_val< _Tree_base_types< _Ty, _Alloc >::_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)
 
- Public Attributes inherited from _Tree_alloc<!is_empty< _Alloc >::value, _Tree_base_types< _Ty, _Alloc > >
_Tree_base_types< _Ty, _Alloc >::_Alnod_type _Alnod
 
- Public Attributes inherited from _Tree_val< _Tree_base_types< _Ty, _Alloc >::_Val_types >
_Nodeptr _Myhead
 
size_type _Mysize
 

Member Typedef Documentation

template<class _Ty, class _Alloc>
typedef _Mybase::_Alty _Tree_buy< _Ty, _Alloc >::_Alty
template<class _Ty, class _Alloc>
typedef _Tree_alloc<!is_empty<_Alloc>::value, _Tree_base_types<_Ty, _Alloc> > _Tree_buy< _Ty, _Alloc >::_Mybase
template<class _Ty, class _Alloc>
typedef _Mybase::_Nodeptr _Tree_buy< _Ty, _Alloc >::_Nodeptr
template<class _Ty, class _Alloc>
typedef _Mybase::value_type _Tree_buy< _Ty, _Alloc >::value_type

Constructor & Destructor Documentation

template<class _Ty, class _Alloc>
_Tree_buy< _Ty, _Alloc >::_Tree_buy ( const _Alloc _Al = _Alloc())
inline
888  : _Mybase(_Al)
889  { // construct from allocator
890  }
_Tree_alloc<!is_empty< _Alloc >::value, _Tree_base_types< _Ty, _Alloc > > _Mybase
Definition: xtree:882

Member Function Documentation

template<class _Ty, class _Alloc>
template<class... _Valty>
_Nodeptr _Tree_buy< _Ty, _Alloc >::_Buynode ( _Valty &&...  _Val)
inline
924  { // allocate a node with defaults and set links and value
925  _Nodeptr _Pnode = _Buynode0();
926 
927  this->_Color(_Pnode) = this->_Red;
928  this->_Isnil(_Pnode) = false;
929 
930  _TRY_BEGIN
931  this->_Getal().construct(
932  _STD addressof(this->_Myval(_Pnode)),
933  _STD forward<_Valty>(_Val)...);
934  _CATCH_ALL
935  _Freenode0(_Pnode);
936  _RERAISE;
937  _CATCH_END
938 
939  return (_Pnode);
940  }
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
#define _CATCH_ALL
Definition: xstddef:62
void _Freenode0(_Nodeptr _Pnode)
Definition: xtree:911
_Nodeptr _Buynode0()
Definition: xtree:892
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
static reference _Myval(_Nodeptr _Pnode)
Definition: xtree:602
_Mybase::_Nodeptr _Nodeptr
Definition: xtree:884
#define _RERAISE
Definition: xstddef:74
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc>
_Nodeptr _Tree_buy< _Ty, _Alloc >::_Buynode0 ( )
inline
893  { // allocate a non-value node
894  _Nodeptr _Pnode = this->_Getal().allocate(1);
895 
896  _TRY_BEGIN
897  this->_Getal().construct(
898  _STD addressof(this->_Left(_Pnode)), this->_Myhead);
899  this->_Getal().construct(
900  _STD addressof(this->_Parent(_Pnode)), this->_Myhead);
901  this->_Getal().construct(
902  _STD addressof(this->_Right(_Pnode)), this->_Myhead);
903  _CATCH_ALL
904  this->_Getal().deallocate(_Pnode, 1);
905  _RERAISE;
906  _CATCH_END
907 
908  return (_Pnode);
909  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
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
_Mybase::_Nodeptr _Nodeptr
Definition: xtree:884
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:597
#define _RERAISE
Definition: xstddef:74
template<class _Ty, class _Alloc>
void _Tree_buy< _Ty, _Alloc >::_Freenode0 ( _Nodeptr  _Pnode)
inline
912  { // free non-value node using current allocator
913  this->_Getal().destroy(
914  _STD addressof(this->_Left(_Pnode)));
915  this->_Getal().destroy(
916  _STD addressof(this->_Parent(_Pnode)));
917  this->_Getal().destroy(
918  _STD addressof(this->_Right(_Pnode)));
919  this->_Getal().deallocate(_Pnode, 1);
920  }
static _Nodepref _Left(_Nodeptr _Pnode)
Definition: xtree:587
static _Nodepref _Parent(_Nodeptr _Pnode)
Definition: xtree:592
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:597

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