_Rb_tree Class Reference

class _Rb_tree : public _Rb_tree_base< _Value, _Alloc >

Inherits from

Public Member Functions
_Rb_tree()
_Rb_tree(const _Compare &)
_Rb_tree(const _Compare &, const allocator_type &)
_Rb_tree(const _Self &)
_Rb_tree(__move_source< _Self >)
~_Rb_tree()
iterator begin()
const_iterator begin()
voidclear()
_STLP_TEMPLATE_FOR_CONT_EXT size_typecount(const _KT &)
boolempty()
iterator end()
const_iterator end()
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator >equal_range(const _KT &)
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator >equal_range(const _KT &)
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator >equal_range_unique(const _KT &)
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator >equal_range_unique(const _KT &)
voiderase(iterator)
size_type erase(const key_type &)
voiderase(iterator, iterator)
voiderase(const key_type *, const key_type *)
size_type erase_unique(const key_type &)
_STLP_TEMPLATE_FOR_CONT_EXT iteratorfind(const _KT &)
_STLP_TEMPLATE_FOR_CONT_EXT const_iteratorfind(const _KT &)
iterator insert_equal(const value_type &)
iterator insert_equal(iterator, const value_type &)
voidinsert_equal(const_iterator, const_iterator)
voidinsert_equal(const value_type *, const value_type *)
pair< iterator, bool >insert_unique(const value_type &)
iterator insert_unique(iterator, const value_type &)
voidinsert_unique(const_iterator, const_iterator)
voidinsert_unique(const value_type *, const value_type *)
_Comparekey_comp()
_STLP_TEMPLATE_FOR_CONT_EXT iteratorlower_bound(const _KT &)
_STLP_TEMPLATE_FOR_CONT_EXT const_iteratorlower_bound(const _KT &)
size_type max_size()
_Self &operator=(const _Self &)
reverse_iterator rbegin()
const_reverse_iteratorrbegin()
reverse_iterator rend()
const_reverse_iteratorrend()
size_type size()
voidswap(_Self &)
_STLP_TEMPLATE_FOR_CONT_EXT iteratorupper_bound(const _KT &)
_STLP_TEMPLATE_FOR_CONT_EXT const_iteratorupper_bound(const _KT &)
Protected Member Functions
_Base_ptr _M_clone_node(_Base_ptr)
_Base_ptr _M_leftmost()
_Base_ptr &_M_leftmost()
_Base_ptr _M_rightmost()
_Base_ptr &_M_rightmost()
_Base_ptr _M_root()
_Base_ptr &_M_root()
_STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
_Color_type &_STLP_CALL_S_color(_Base_ptr)
const _Key &_STLP_CALL_S_key(_Base_ptr)
_Base_ptr &_STLP_CALL_S_left(_Base_ptr)
_Base_ptr _STLP_CALL_S_maximum(_Base_ptr)
_Base_ptr _STLP_CALL_S_minimum(_Base_ptr)
_Base_ptr &_STLP_CALL_S_parent(_Base_ptr)
_Base_ptr &_STLP_CALL_S_right(_Base_ptr)
value_type &_STLP_CALL_S_value(_Base_ptr)
Private Member Functions
_Base_ptr _M_copy(_Base_ptr, _Base_ptr)
void_M_erase(_Base_ptr)
_STLP_TEMPLATE_FOR_CONT_EXT _Base_ptr_M_find(const _KT &)
iterator _M_insert(_Base_ptr, const value_type &, _Base_ptr, _Base_ptr)
_STLP_TEMPLATE_FOR_CONT_EXT _Base_ptr_M_lower_bound(const _KT &)
_STLP_TEMPLATE_FOR_CONT_EXT _Base_ptr_M_upper_bound(const _KT &)
Inherited Functions
_Rb_tree_base< _Value, _Alloc >::_M_empty_initialize()
_Rb_tree_base< _Value, _Alloc >::_M_rebind(_Node_base *)
_Rb_tree_base< _Value, _Alloc >::_Rb_tree_base(__move_source< _Self >)
_Rb_tree_base< _Value, _Alloc >::_Rb_tree_base(const allocator_type &)
_Rb_tree_base< _Value, _Alloc >::_STLP_FORCE_ALLOCATORS(_Value,_Alloc)
_Rb_tree_base< _Value, _Alloc >::get_allocator()const
Public Member Type Definitions
typedef_Traits::_ConstTraits _ConstTraits
typedef bidirectional_iterator_tag _Iterator_category
typedef_Traits::_NonConstTraits _NonConstTraits
typedef _Base::allocator_type allocator_type
typedef _Rb_tree_iterator< value_type, _ConstTraits > const_iterator
typedefconst value_type * const_pointer
typedefconst value_type & const_reference
typedef ptrdiff_t difference_type
typedef _Rb_tree_iterator< value_type, _NonConstTraits > iterator
typedef_Key key_type
typedef_Traits::pointer pointer
typedef_Traits::reference reference
typedef size_t size_type
typedef_Value value_type
Protected Member Type Definitions
typedef _Rb_tree_node_base * _Base_ptr
typedef _Rb_tree_Color_type _Color_type
typedef _Node * _Link_type
typedef _Rb_tree_node< _Value > _Node
Private Member Type Definitions
typedef _Rb_tree_base< _Value, _Alloc > _Base
typedef _Rb_tree< _Key, _Compare, _Value, _KeyOfValue, _Traits, _Alloc > _Self
Public Attributes
_STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS
Protected Attributes
_Compare_M_key_compare
size_type _M_node_count
Inherited Attributes
_Rb_tree_base< _Value, _Alloc >::_M_header

Constructor & Destructor Documentation

_Rb_tree()

_Rb_tree()[inline]

_Rb_tree(const _Compare &)

_Rb_tree(const _Compare &__comp)[inline]

Parameters

const _Compare & __comp

_Rb_tree(const _Compare &, const allocator_type &)

_Rb_tree(const _Compare &__comp,
const allocator_type &__a
)[inline]

Parameters

const _Compare & __comp
const allocator_type & __a

_Rb_tree(const _Self &)

_Rb_tree(const _Self &__x)[inline]

Parameters

const _Self & __x

_Rb_tree(__move_source< _Self >)

_Rb_tree(__move_source< _Self >src)[inline]

Parameters

__move_source< _Self > src

~_Rb_tree()

~_Rb_tree()[inline]

Member Functions Documentation

_M_clone_node(_Base_ptr)

_Base_ptr _M_clone_node(_Base_ptr__x)[protected, inline]

Parameters

_Base_ptr __x

_M_copy(_Base_ptr, _Base_ptr)

_Base_ptr _M_copy(_Base_ptr__x,
_Base_ptr__p
)[private]

Parameters

_Base_ptr __x
_Base_ptr __p

_M_erase(_Base_ptr)

void_M_erase(_Base_ptr__x)[private]

Parameters

_Base_ptr __x

_M_find(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT _Base_ptr_M_find(const _KT &__k)const [private, inline]

Parameters

const _KT & __k

_M_insert(_Base_ptr, const value_type &, _Base_ptr, _Base_ptr)

iterator _M_insert(_Base_ptr__parent,
const value_type &__val,
_Base_ptr__on_left = 0,
_Base_ptr__on_right = 0
)[private]

Parameters

_Base_ptr __parent
const value_type & __val
_Base_ptr __on_left = 0
_Base_ptr __on_right = 0

_M_leftmost()

_Base_ptr _M_leftmost()const [protected, inline]

_M_leftmost()

_Base_ptr &_M_leftmost()[protected, inline]

_M_lower_bound(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT _Base_ptr_M_lower_bound(const _KT &__k)const [private, inline]

Parameters

const _KT & __k

_M_rightmost()

_Base_ptr _M_rightmost()const [protected, inline]

_M_rightmost()

_Base_ptr &_M_rightmost()[protected, inline]

_M_root()

_Base_ptr _M_root()const [protected, inline]

_M_root()

_Base_ptr &_M_root()[protected, inline]

_M_upper_bound(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT _Base_ptr_M_upper_bound(const _KT &__k)const [private, inline]

Parameters

const _KT & __k

_STLP_KEY_TYPE_FOR_CONT_EXT(key_type)

_STLP_KEY_TYPE_FOR_CONT_EXT(key_type)const [protected, inline]

Parameters

key_type

_S_color(_Base_ptr)

_Color_type &_STLP_CALL_S_color(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

_S_key(_Base_ptr)

const _Key &_STLP_CALL_S_key(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

_S_left(_Base_ptr)

_Base_ptr &_STLP_CALL_S_left(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

_S_maximum(_Base_ptr)

_Base_ptr _STLP_CALL_S_maximum(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

_S_minimum(_Base_ptr)

_Base_ptr _STLP_CALL_S_minimum(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

_S_parent(_Base_ptr)

_Base_ptr &_STLP_CALL_S_parent(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

_S_right(_Base_ptr)

_Base_ptr &_STLP_CALL_S_right(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

_S_value(_Base_ptr)

value_type &_STLP_CALL_S_value(_Base_ptr__x)[protected, static, inline]

Parameters

_Base_ptr __x

begin()

iterator begin()[inline]

begin()

const_iterator begin()const [inline]

clear()

voidclear()[inline]

count(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT size_typecount(const _KT &__x)const [inline]

Parameters

const _KT & __x

empty()

boolempty()const [inline]

end()

iterator end()[inline]

end()

const_iterator end()const [inline]

equal_range(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator >equal_range(const _KT &__x)[inline]

Parameters

const _KT & __x

equal_range(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator >equal_range(const _KT &__x)const [inline]

Parameters

const _KT & __x

equal_range_unique(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator >equal_range_unique(const _KT &__x)[inline]

Parameters

const _KT & __x

equal_range_unique(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator >equal_range_unique(const _KT &__x)const [inline]

Parameters

const _KT & __x

erase(iterator)

voiderase(iterator__pos)[inline]

Parameters

iterator __pos

erase(const key_type &)

size_type erase(const key_type &__x)[inline]

Parameters

const key_type & __x

erase(iterator, iterator)

voiderase(iterator__first,
iterator__last
)[inline]

Parameters

iterator __first
iterator __last

erase(const key_type *, const key_type *)

voiderase(const key_type *__first,
const key_type *__last
)[inline]

Parameters

const key_type * __first
const key_type * __last

erase_unique(const key_type &)

size_type erase_unique(const key_type &__x)[inline]

Parameters

const key_type & __x

find(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT iteratorfind(const _KT &__k)[inline]

Parameters

const _KT & __k

find(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT const_iteratorfind(const _KT &__k)const [inline]

Parameters

const _KT & __k

insert_equal(const value_type &)

iterator insert_equal(const value_type &__x)

Parameters

const value_type & __x

insert_equal(iterator, const value_type &)

iterator insert_equal(iterator__pos,
const value_type &__x
)

Parameters

iterator __pos
const value_type & __x

insert_equal(const_iterator, const_iterator)

voidinsert_equal(const_iterator__first,
const_iterator__last
)[inline]

Parameters

const_iterator __first
const_iterator __last

insert_equal(const value_type *, const value_type *)

voidinsert_equal(const value_type *__first,
const value_type *__last
)[inline]

Parameters

const value_type * __first
const value_type * __last

insert_unique(const value_type &)

pair< iterator, bool >insert_unique(const value_type &__x)

Parameters

const value_type & __x

insert_unique(iterator, const value_type &)

iterator insert_unique(iterator__pos,
const value_type &__x
)

Parameters

iterator __pos
const value_type & __x

insert_unique(const_iterator, const_iterator)

voidinsert_unique(const_iterator__first,
const_iterator__last
)[inline]

Parameters

const_iterator __first
const_iterator __last

insert_unique(const value_type *, const value_type *)

voidinsert_unique(const value_type *__first,
const value_type *__last
)[inline]

Parameters

const value_type * __first
const value_type * __last

key_comp()

_Comparekey_comp()const [inline]

lower_bound(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT iteratorlower_bound(const _KT &__x)[inline]

Parameters

const _KT & __x

lower_bound(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT const_iteratorlower_bound(const _KT &__x)const [inline]

Parameters

const _KT & __x

max_size()

size_type max_size()const [inline]

operator=(const _Self &)

_Self &operator=(const _Self &__x)

Parameters

const _Self & __x

rbegin()

reverse_iterator rbegin()[inline]

rbegin()

const_reverse_iteratorrbegin()const [inline]

rend()

reverse_iterator rend()[inline]

rend()

const_reverse_iteratorrend()const [inline]

size()

size_type size()const [inline]

swap(_Self &)

voidswap(_Self &__t)[inline]

Parameters

_Self & __t

upper_bound(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT iteratorupper_bound(const _KT &__x)[inline]

Parameters

const _KT & __x

upper_bound(const _KT &)

_STLP_TEMPLATE_FOR_CONT_EXT const_iteratorupper_bound(const _KT &__x)const [inline]

Parameters

const _KT & __x

Member Type Definitions Documentation

Typedef _Base

typedef _Rb_tree_base< _Value, _Alloc >_Base[private]

Typedef _Base_ptr

typedef _Rb_tree_node_base *_Base_ptr[protected]

Typedef _Color_type

typedef _Rb_tree_Color_type _Color_type[protected]

Typedef _ConstTraits

typedef _Traits::_ConstTraits_ConstTraits

Typedef _Iterator_category

typedef bidirectional_iterator_tag _Iterator_category

Typedef _Link_type

typedef _Node *_Link_type[protected]

Typedef _Node

typedef _Rb_tree_node< _Value >_Node[protected]

Typedef _NonConstTraits

typedef _Traits::_NonConstTraits_NonConstTraits

Typedef _Self

typedef _Rb_tree< _Key, _Compare, _Value, _KeyOfValue, _Traits, _Alloc >_Self[private]

Typedef allocator_type

typedef _Base::allocator_type allocator_type

Typedef const_iterator

typedef _Rb_tree_iterator< value_type, _ConstTraits >const_iterator

Typedef const_pointer

typedef const value_type *const_pointer

Typedef const_reference

typedef const value_type &const_reference

Typedef difference_type

typedef ptrdiff_t difference_type

Typedef iterator

typedef _Rb_tree_iterator< value_type, _NonConstTraits >iterator

Typedef key_type

typedef _Keykey_type

Typedef pointer

typedef _Traits::pointerpointer

Typedef reference

typedef _Traits::referencereference

Typedef size_type

typedef size_t size_type

Typedef value_type

typedef _Valuevalue_type

Member Data Documentation

_Compare _M_key_compare

_Compare_M_key_compare[protected]

size_type _M_node_count

size_type _M_node_count[protected]

_STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS

_STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS