|
| enum | { E_noent = 2
, E_exist = 17
, E_nomem = 12
, E_inval = 22
} |
| | Return status constants. More...
|
|
typedef ITEM_TYPE | Item_type |
| | Type for the items store in the set.
|
|
typedef GET_KEY | Get_key |
| | Key-getter type to derive the sort key of an internal node.
|
|
typedef GET_KEY::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 COMPARE | Item_compare |
| | Type for the comparison functor.
|
|
typedef ALLOC< _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.
|
template<typename ITEM_TYPE, class COMPARE, template< typename A > class ALLOC, typename GET_KEY>
class cxx::Bits::Base_avl_set< ITEM_TYPE, COMPARE, ALLOC, GET_KEY >
AVL set with internally managed nodes.
Definition at line 127 of file avl_set.
template<typename ITEM_TYPE, class COMPARE, template< typename A > class ALLOC, typename GET_KEY>
Return status constants.
These constants are compatible with the L4 error codes, see l4_error_code_t.
| Enumerator |
|---|
| E_noent | Item does not exist.
|
| E_exist | Item exists already.
|
| E_nomem | Memory allocation failed.
|
| E_inval | Internal error.
|
Definition at line 138 of file avl_set.
template<typename ITEM_TYPE, class COMPARE, template< typename A > class ALLOC, typename GET_KEY>
Create a copy of an AVL-tree based set.
- Parameters
-
| o | The set to copy. |
| alloc | Node allocator. |
Creates a deep copy of the set with all its items.
Definition at line 283 of file avl_set.
template<typename ITEM_TYPE, class COMPARE, template< typename A > class ALLOC, typename GET_KEY>
template<typename... Args>
Emplace an item into the set.
- Parameters
-
| args | Constructor arguments for the item constructor. |
- Returns
- A pair of iterator (first) and return value (second). second will be 0 if the element was inserted into the set and -#E_exist if the element was already in the set and the set was therefore not updated. In both cases, first contains an iterator that points to the element. second may also be -#E_nomem when memory for the node could not be allocated. first is then invalid.
The element will always be constructed, even if there is already an existing element in the set. In case of such a collision the newly created element will then be immediately destructed.
template<typename ITEM_TYPE, class COMPARE, template< typename A > class ALLOC, typename GET_KEY>
Insert an item into the set.
- Parameters
-
- Returns
- A pair of iterator (first) and return value (second). second will be 0 if the element was inserted into the set and -#E_exist if the element was already in the set and the set was therefore not updated. In both cases, first contains an iterator that points to the element. second may also be -#E_nomem when memory for the node could not be allocated. first is then invalid.
Insert a new item into the set, each item can only be once in the set.
Definition at line 485 of file avl_set.
References E_exist, E_nomem, end(), cxx::Pair< First, Second >::first, and cxx::Pair< First, Second >::second.
template<typename ITEM_TYPE, class COMPARE, template< typename A > class ALLOC, typename GET_KEY>
Copy assignment operator of an AVL-tree based set.
- Parameters
-
Creates a deep copy of the set with all its items.
Definition at line 295 of file avl_set.