L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
cxx::Avl_set< ITEM_TYPE, COMPARE, ALLOC > Class Template Reference

AVL set for simple comparable items. More...

#include <avl_set>

Inheritance diagram for cxx::Avl_set< ITEM_TYPE, COMPARE, ALLOC >:
Collaboration diagram for cxx::Avl_set< ITEM_TYPE, COMPARE, ALLOC >:

Additional Inherited Members

Public Types inherited from cxx::Bits::Base_avl_set< ITEM_TYPE, Lt_functor< ITEM_TYPE >, New_allocator, Bits::Avl_set_get_key< ITEM_TYPE > >
enum  
 Return status constants. More...
typedef ITEM_TYPE Item_type
 Type for the items store in the set.
typedef Bits::Avl_set_get_key< ITEM_TYPE > Get_key
 Key-getter type to derive the sort key of an internal node.
typedef Bits::Avl_set_get_key< ITEM_TYPE >::Key_type Key_type
 Type of the sort key used for the items.
typedef Type_traits< Item_type >::Const_type Const_item_type
 Type used for const items within the set.
typedef Lt_functor< ITEM_TYPE > Item_compare
 Type for the comparison functor.
typedef New_allocator< _Node > Node_allocator
 Type for the node allocator.
typedef Avl_set_iter< _Node, Item_type, Fwd > Iterator
 Forward iterator for the set.
typedef Avl_set_iter< _Node, Const_item_type, Fwd > Const_iterator
 Constant forward iterator for the set.
typedef Avl_set_iter< _Node, Item_type, Rev > Rev_iterator
 Backward iterator for the set.
typedef Avl_set_iter< _Node, Const_item_type, Rev > Const_rev_iterator
 Constant backward iterator for the set.
Public Member Functions inherited from cxx::Bits::Base_avl_set< ITEM_TYPE, Lt_functor< ITEM_TYPE >, New_allocator, Bits::Avl_set_get_key< ITEM_TYPE > >
 Base_avl_set (Node_allocator const &alloc=Node_allocator())
 Create a AVL-tree based set.
Base_avl_setoperator= (Base_avl_set const &o)
 Copy assignment operator of an AVL-tree based set.
cxx::Pair< Iterator, int > insert (Item_type const &item)
 Insert an item into the set.
void clear () noexcept
 Remove all items from the set.
int remove (Key_type const &item)
 Remove an item from the set.
int erase (Key_type const &item)
 Erase the item with the given key.
Node find_node (Key_type const &item) const
 Lookup a node equal to item.
Node lower_bound_node (Key_type const &key) const
 Find the first node greater or equal to key.
Const_iterator begin () const
 Get the constant forward iterator for the first element in the set.
Const_iterator end () const
 Get the end marker for the constant forward iterator.
Const_rev_iterator rbegin () const
 Get the constant backward iterator for the last element in the set.
Const_rev_iterator rend () const
 Get the end marker for the constant backward iterator.

Detailed Description

template<typename ITEM_TYPE, template< typename T > class COMPARE = Lt_functor, template< typename A > class ALLOC = New_allocator>
class cxx::Avl_set< ITEM_TYPE, COMPARE, ALLOC >

AVL set for simple comparable items.

The AVL set can store any kind of items where a partial order is defined. The default relation is defined by the '<' operator.

Template Parameters
ITEM_TYPEThe type of the items to be stored in the set.
COMPAREThe relation to define the partial order, default is to use operator '<'.
ALLOCThe allocator to use for the nodes of the AVL set.

Definition at line 538 of file avl_set.


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