|
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 >
Internal: AVL set with internally managed nodes.
Use Avl_set, Avl_map, or Avl_tree in applications.
- Template Parameters
-
ITEM_TYPE | The type of the items to be stored in the set. |
COMPARE | The relation to define the partial order, default is to use operator '<'. |
ALLOC | The allocator to use for the nodes of the AVL set. |
GET_KEY | Sort-key getter (must provide the Key_type and sort-key for an item (of ITEM_TYPE ). |
Definition at line 117 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 126 of file avl_set.
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 397 of file avl_set.