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
_Tree_comp_alloc< _Traits > Class Template Reference
Inheritance diagram for _Tree_comp_alloc< _Traits >:
_Tree< _Traits >

Public Types

enum  _Redbl { _Red, _Black }
 
typedef _Tree_comp_alloc< _Traits > _Myt
 
typedef _Traits::allocator_type allocator_type
 
typedef _Traits::key_compare key_compare
 
typedef _Tree_base_types< typename _Traits::value_type, allocator_type_Alloc_types
 
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 _Tree_const_iterator< _Tree_val< _Val_types > > const_iterator
 
typedef _Tree_iterator< _Tree_val< _Val_types > > iterator
 

Public Member Functions

 _Tree_comp_alloc (const key_compare &_Parg)
 
template<class _Any_alloc , class = enable_if_t<!is_same<decay_t<_Any_alloc>, _Myt>::value>>
 _Tree_comp_alloc (const key_compare &_Parg, _Any_alloc &&_Al)
 
void _Construct ()
 
 ~_Tree_comp_alloc () _NOEXCEPT
 
void _Copy_alloc (const _Alty &_Al)
 
void _Move_alloc (_Alty &_Al)
 
void _Orphan_all ()
 
void _Swap_all (_Myt &_Right)
 
_Nodeptr _Buyheadnode ()
 
void _Freeheadnode (_Nodeptr _Pnode)
 
_Nodeptr _Buynode0 ()
 
void _Freenode0 (_Nodeptr _Pnode)
 
template<class... _Valty>
_Nodeptr _Buynode (_Valty &&..._Val)
 
key_compare_Getcomp () _NOEXCEPT
 
const key_compare_Getcomp () const _NOEXCEPT
 
_Alty_Getal () _NOEXCEPT
 
const _Alty_Getal () const _NOEXCEPT
 
_Tree_val< _Val_types > & _Get_data () _NOEXCEPT
 
const _Tree_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 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)
 

Private Attributes

_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
 

Member Typedef Documentation

template<class _Traits>
typedef _Alloc_types::_Alloc _Tree_comp_alloc< _Traits >::_Alloc
template<class _Traits>
typedef _Tree_base_types<typename _Traits::value_type, allocator_type> _Tree_comp_alloc< _Traits >::_Alloc_types
template<class _Traits>
typedef _Alloc_types::_Alnod_type _Tree_comp_alloc< _Traits >::_Alty
template<class _Traits>
typedef _Tree_comp_alloc<_Traits> _Tree_comp_alloc< _Traits >::_Myt
template<class _Traits>
typedef _Alloc_types::_Node _Tree_comp_alloc< _Traits >::_Node
template<class _Traits>
typedef _Nodeptr& _Tree_comp_alloc< _Traits >::_Nodepref
template<class _Traits>
typedef _Alloc_types::_Nodeptr _Tree_comp_alloc< _Traits >::_Nodeptr
template<class _Traits>
typedef _Alloc_types::_Val_types _Tree_comp_alloc< _Traits >::_Val_types
template<class _Traits>
typedef _Traits::allocator_type _Tree_comp_alloc< _Traits >::allocator_type
template<class _Traits>
typedef _Tree_const_iterator<_Tree_val<_Val_types> > _Tree_comp_alloc< _Traits >::const_iterator
template<class _Traits>
typedef _Val_types::const_pointer _Tree_comp_alloc< _Traits >::const_pointer
template<class _Traits>
typedef _Val_types::const_reference _Tree_comp_alloc< _Traits >::const_reference
template<class _Traits>
typedef _Val_types::difference_type _Tree_comp_alloc< _Traits >::difference_type
template<class _Traits>
typedef _Tree_iterator<_Tree_val<_Val_types> > _Tree_comp_alloc< _Traits >::iterator
template<class _Traits>
typedef _Traits::key_compare _Tree_comp_alloc< _Traits >::key_compare
template<class _Traits>
typedef _Val_types::pointer _Tree_comp_alloc< _Traits >::pointer
template<class _Traits>
typedef _Val_types::reference _Tree_comp_alloc< _Traits >::reference
template<class _Traits>
typedef _Val_types::size_type _Tree_comp_alloc< _Traits >::size_type
template<class _Traits>
typedef _Val_types::value_type _Tree_comp_alloc< _Traits >::value_type

Member Enumeration Documentation

template<class _Traits>
enum _Tree_comp_alloc::_Redbl
Enumerator
_Red 
_Black 
657  { // colors for link to parent
658  _Red, _Black
659  };
Definition: xtree:658
Definition: xtree:658

Constructor & Destructor Documentation

template<class _Traits>
_Tree_comp_alloc< _Traits >::_Tree_comp_alloc ( const key_compare _Parg)
inline
704  { // construct from comparator
705  _Construct();
706  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
Definition: xutility:255
void _Construct()
Definition: xtree:719
Definition: xutility:259
template<class _Traits>
template<class _Any_alloc , class = enable_if_t<!is_same<decay_t<_Any_alloc>, _Myt>::value>>
_Tree_comp_alloc< _Traits >::_Tree_comp_alloc ( const key_compare _Parg,
_Any_alloc &&  _Al 
)
inline
713  _STD forward<_Any_alloc>(_Al))
714  { // construct from comparator, allocator
715  _Construct();
716  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
void _Construct()
Definition: xtree:719
Definition: xutility:259
template<class _Traits>
_Tree_comp_alloc< _Traits >::~_Tree_comp_alloc ( )
inline
725  { // destroy head node
727  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: xtree:928
void _Freeheadnode(_Nodeptr _Pnode)
Definition: xtree:837

Member Function Documentation

template<class _Traits>
_Nodeptr _Tree_comp_alloc< _Traits >::_Buyheadnode ( )
inline
817  { // get head node using current allocator
818  _Nodeptr _Pnode = _Getal().allocate(1);
819 
820  _TRY_BEGIN
821  _Getal().construct(
822  _STD addressof(_Left(_Pnode)), _Pnode);
823  _Getal().construct(
824  _STD addressof(_Parent(_Pnode)), _Pnode);
825  _Getal().construct(
826  _STD addressof(_Right(_Pnode)), _Pnode);
827  _CATCH_ALL
828  _Getal().deallocate(_Pnode, 1);
829  _RERAISE;
830  _CATCH_END
831 
832  _Color(_Pnode) = _Black;
833  _Isnil(_Pnode) = true;
834  return (_Pnode);
835  }
static _Nodepref _Left(_Nodeptr _Pnode)
Definition: xtree:671
_Alloc_types::_Nodeptr _Nodeptr
Definition: xtree:640
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:681
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
static _Nodepref _Parent(_Nodeptr _Pnode)
Definition: xtree:676
Definition: xtree:658
_Alty & _Getal() _NOEXCEPT
Definition: xtree:908
static char & _Isnil(_Nodeptr _Pnode)
Definition: xtree:666
static char & _Color(_Nodeptr _Pnode)
Definition: xtree:661
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
template<class _Traits>
template<class... _Valty>
_Nodeptr _Tree_comp_alloc< _Traits >::_Buynode ( _Valty &&...  _Val)
inline
880  { // allocate a node with defaults and set links and value
881  _Nodeptr _Pnode = _Buynode0();
882 
883  this->_Color(_Pnode) = _Red;
884  this->_Isnil(_Pnode) = false;
885 
886  _TRY_BEGIN
887  this->_Getal().construct(
888  _STD addressof(_Myval(_Pnode)),
889  _STD forward<_Valty>(_Val)...);
890  _CATCH_ALL
891  _Freenode0(_Pnode);
892  _RERAISE;
893  _CATCH_END
894 
895  return (_Pnode);
896  }
void _Freenode0(_Nodeptr _Pnode)
Definition: xtree:867
_Alloc_types::_Nodeptr _Nodeptr
Definition: xtree:640
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
#define _TRY_BEGIN
Definition: xstddef:60
Definition: xtree:658
#define _CATCH_END
Definition: xstddef:63
_In_ int _Val
Definition: vcruntime_string.h:62
_Alty & _Getal() _NOEXCEPT
Definition: xtree:908
_Nodeptr _Buynode0()
Definition: xtree:848
static char & _Isnil(_Nodeptr _Pnode)
Definition: xtree:666
static char & _Color(_Nodeptr _Pnode)
Definition: xtree:661
#define _CATCH_ALL
Definition: xstddef:62
static reference _Myval(_Nodeptr _Pnode)
Definition: xtree:686
#define _RERAISE
Definition: xstddef:74
template<class _Traits>
_Nodeptr _Tree_comp_alloc< _Traits >::_Buynode0 ( )
inline
849  { // allocate a non-value node
850  _Nodeptr _Pnode = _Getal().allocate(1);
851 
852  _TRY_BEGIN
853  _Getal().construct(
854  _STD addressof(_Left(_Pnode)), _Myhead());
855  _Getal().construct(
856  _STD addressof(_Parent(_Pnode)), _Myhead());
857  _Getal().construct(
858  _STD addressof(_Right(_Pnode)), _Myhead());
859  _CATCH_ALL
860  _Getal().deallocate(_Pnode, 1);
861  _RERAISE;
862  _CATCH_END
863 
864  return (_Pnode);
865  }
static _Nodepref _Left(_Nodeptr _Pnode)
Definition: xtree:671
_Alloc_types::_Nodeptr _Nodeptr
Definition: xtree:640
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
_Nodeptr & _Myhead() _NOEXCEPT
Definition: xtree:928
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:681
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
static _Nodepref _Parent(_Nodeptr _Pnode)
Definition: xtree:676
_Alty & _Getal() _NOEXCEPT
Definition: xtree:908
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
template<class _Traits>
static char& _Tree_comp_alloc< _Traits >::_Color ( _Nodeptr  _Pnode)
inlinestatic
662  { // return reference to color in node
663  return (_Tree_val<_Val_types>::_Color(_Pnode));
664  }
Definition: xtree:546
template<class _Traits>
void _Tree_comp_alloc< _Traits >::_Construct ( )
inline
720  { // construct head node
721  _Myhead() = _Buyheadnode();
722  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: xtree:928
_Nodeptr _Buyheadnode()
Definition: xtree:816
template<class _Traits>
void _Tree_comp_alloc< _Traits >::_Copy_alloc ( const _Alty _Al)
inline
730  { // replace old allocator
731  _Pocca(_Getal(), _Al);
732  }
_Alty & _Getal() _NOEXCEPT
Definition: xtree:908
void _Pocca(_Alty &_Left, const _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1031
template<class _Traits>
void _Tree_comp_alloc< _Traits >::_Freeheadnode ( _Nodeptr  _Pnode)
inline
838  { // free head node using current allocator
839  _Getal().destroy(
840  _STD addressof(_Left(_Pnode)));
841  _Getal().destroy(
842  _STD addressof(_Parent(_Pnode)));
843  _Getal().destroy(
844  _STD addressof(_Right(_Pnode)));
845  _Getal().deallocate(_Pnode, 1);
846  }
static _Nodepref _Left(_Nodeptr _Pnode)
Definition: xtree:671
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:681
static _Nodepref _Parent(_Nodeptr _Pnode)
Definition: xtree:676
_Alty & _Getal() _NOEXCEPT
Definition: xtree:908
template<class _Traits>
void _Tree_comp_alloc< _Traits >::_Freenode0 ( _Nodeptr  _Pnode)
inline
868  { // free non-value node using current allocator
869  _Getal().destroy(
870  _STD addressof(_Left(_Pnode)));
871  _Getal().destroy(
872  _STD addressof(_Parent(_Pnode)));
873  _Getal().destroy(
874  _STD addressof(_Right(_Pnode)));
875  _Getal().deallocate(_Pnode, 1);
876  }
static _Nodepref _Left(_Nodeptr _Pnode)
Definition: xtree:671
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:681
static _Nodepref _Parent(_Nodeptr _Pnode)
Definition: xtree:676
_Alty & _Getal() _NOEXCEPT
Definition: xtree:908
template<class _Traits>
_Tree_val<_Val_types>& _Tree_comp_alloc< _Traits >::_Get_data ( )
inline
919  { // return reference to _Tree_val
920  return (_Mypair._Get_second()._Get_second());
921  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
template<class _Traits>
const _Tree_val<_Val_types>& _Tree_comp_alloc< _Traits >::_Get_data ( ) const
inline
924  { // return const reference to _Tree_val
925  return (_Mypair._Get_second()._Get_second());
926  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
template<class _Traits>
_Alty& _Tree_comp_alloc< _Traits >::_Getal ( )
inline
909  { // return reference to allocator
910  return (_Mypair._Get_second()._Get_first());
911  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
template<class _Traits>
const _Alty& _Tree_comp_alloc< _Traits >::_Getal ( ) const
inline
914  { // return const reference to allocator
915  return (_Mypair._Get_second()._Get_first());
916  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
template<class _Traits>
key_compare& _Tree_comp_alloc< _Traits >::_Getcomp ( )
inline
899  { // return reference to ordering predicate
900  return (_Mypair._Get_first());
901  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
template<class _Traits>
const key_compare& _Tree_comp_alloc< _Traits >::_Getcomp ( ) const
inline
904  { // return const reference to ordering predicate
905  return (_Mypair._Get_first());
906  }
_Compressed_pair< key_compare, _Compressed_pair< _Alty, _Tree_val< _Val_types > > > _Mypair
Definition: xtree:950
template<class _Traits>
static char& _Tree_comp_alloc< _Traits >::_Isnil ( _Nodeptr  _Pnode)
inlinestatic
667  { // return reference to nil flag in node
668  return (_Tree_val<_Val_types>::_Isnil(_Pnode));
669  }
Definition: xtree:546
template<class _Traits>
static _Nodepref _Tree_comp_alloc< _Traits >::_Left ( _Nodeptr  _Pnode)
inlinestatic
672  { // return reference to left pointer in node
673  return (_Tree_val<_Val_types>::_Left(_Pnode));
674  }
Definition: xtree:546
template<class _Traits>
static _Nodeptr _Tree_comp_alloc< _Traits >::_Max ( _Nodeptr  _Pnode)
inlinestatic
692  { // return rightmost node in subtree at _Pnode
693  return (_Tree_val<_Val_types>::_Max(_Pnode));
694  }
Definition: xtree:546
template<class _Traits>
static _Nodeptr _Tree_comp_alloc< _Traits >::_Min ( _Nodeptr  _Pnode)
inlinestatic
697  { // return leftmost node in subtree at _Pnode
698  return (_Tree_val<_Val_types>::_Min(_Pnode));
699  }
Definition: xtree:546
template<class _Traits>
void _Tree_comp_alloc< _Traits >::_Move_alloc ( _Alty _Al)
inline
735  { // replace old allocator
736  _Pocma(_Getal(), _Al);
737  }
void _Pocma(_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1050
_Alty & _Getal() _NOEXCEPT
Definition: xtree:908
template<class _Traits>
_Nodeptr& _Tree_comp_alloc< _Traits >::_Myhead ( )
inline
929  { // return reference to _Myhead
930  return (_Get_data()._Myhead);
931  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: xtree:928
_Tree_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: xtree:918
template<class _Traits>
const _Nodeptr& _Tree_comp_alloc< _Traits >::_Myhead ( ) const
inline
934  { // return const reference to _Myhead
935  return (_Get_data()._Myhead);
936  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: xtree:928
_Tree_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: xtree:918
template<class _Traits>
size_type& _Tree_comp_alloc< _Traits >::_Mysize ( )
inline
939  { // return reference to _Mysize
940  return (_Get_data()._Mysize);
941  }
size_type & _Mysize() _NOEXCEPT
Definition: xtree:938
_Tree_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: xtree:918
template<class _Traits>
const size_type& _Tree_comp_alloc< _Traits >::_Mysize ( ) const
inline
944  { // return const reference to _Mysize
945  return (_Get_data()._Mysize);
946  }
size_type & _Mysize() _NOEXCEPT
Definition: xtree:938
_Tree_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: xtree:918
template<class _Traits>
static reference _Tree_comp_alloc< _Traits >::_Myval ( _Nodeptr  _Pnode)
inlinestatic
687  { // return reference to value in node
688  return (_Tree_val<_Val_types>::_Myval(_Pnode));
689  }
Definition: xtree:546
template<class _Traits>
void _Tree_comp_alloc< _Traits >::_Orphan_all ( )
inline
807  { // orphan all iterators
808  _Get_data()._Orphan_all();
809  }
_Tree_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: xtree:918
template<class _Traits>
static _Nodepref _Tree_comp_alloc< _Traits >::_Parent ( _Nodeptr  _Pnode)
inlinestatic
677  { // return reference to parent pointer in node
678  return (_Tree_val<_Val_types>::_Parent(_Pnode));
679  }
Definition: xtree:546
template<class _Traits>
static _Nodepref _Tree_comp_alloc< _Traits >::_Right ( _Nodeptr  _Pnode)
inlinestatic
682  { // return reference to right pointer in node
683  return (_Tree_val<_Val_types>::_Right(_Pnode));
684  }
Definition: xtree:546
template<class _Traits>
void _Tree_comp_alloc< _Traits >::_Swap_all ( _Myt _Right)
inline
812  { // swap all iterators
813  _Get_data()._Swap_all(_Right._Get_data());
814  }
static _Nodepref _Right(_Nodeptr _Pnode)
Definition: xtree:681
_Tree_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: xtree:918

Member Data Documentation

template<class _Traits>
_Compressed_pair<key_compare, _Compressed_pair<_Alty, _Tree_val<_Val_types> > > _Tree_comp_alloc< _Traits >::_Mypair
private

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