|
void | add (T *e) |
| Add element to the front of the list.
|
|
void | push_front (T *e) |
| Add element to the front of the list.
|
|
T * | pop_front () |
| Remove and return the head element of the list. More...
|
|
Iterator | insert (T *e, Iterator const &pred) |
| Insert an element at the iterator position. More...
|
|
bool | empty () const |
| Check if the list is empty.
|
|
Value_type | front () const |
| Return the first element in the list.
|
|
void | clear () |
| Remove all elements from the list. More...
|
|
Iterator | begin () |
| Return an iterator to the beginning of the list.
|
|
Const_iterator | begin () const |
| Return a const iterator to the beginning of the list.
|
|
Const_iterator | end () const |
| Return a const iterator to the end of the list.
|
|
Iterator | end () |
| Return an iterator to the end of the list.
|
|
|
static Iterator | iter (T *c) |
| Return an iterator for an arbitrary list element. More...
|
|
static bool | in_list (T const *e) |
| Check if the given element is currently part of a list.
|
|
static Iterator | insert_after (T *e, Iterator const &pred) |
| Insert an element after the iterator position. More...
|
|
static void | insert_before (T *e, Iterator const &succ) |
| Insert an element before the iterator position. More...
|
|
static void | replace (T *p, T *e) |
| Replace an element in a list with a new element. More...
|
|
static void | remove (T *e) |
| Remove the given element from its list. More...
|
|
static Iterator | erase (Iterator const &e) |
| Remove the element at the given iterator position. More...
|
|
static Const_iterator | iter (Const_value_type c) |
| Return a const iterator that begins at the given element. More...
|
|
template<typename T, typename POLICY = Bits::Basic_list_policy< T, H_list_item>>
class cxx::H_list< T, POLICY >
General double-linked list of unspecified cxx::H_list_item elements.
Most of the time, you want to use H_list_t.
Definition at line 80 of file hlist.
template<typename T , typename POLICY = Bits::Basic_list_policy< T, H_list_item>>
static Iterator cxx::H_list< T, POLICY >::erase |
( |
Iterator const & |
e | ) |
|
|
inlinestatic |
Remove the element at the given iterator position.
- Parameters
-
e | Iterator pointing to the element to be removed. Must not point to end(). |
- Returns
- New iterator pointing to the element after the removed one.
- Note
- The hlist implementation guarantees that the original iterator is still valid after the element has been removed. In fact, the iterator returned is the same as the one supplied in the
e
parameter.
Definition at line 247 of file hlist.
Referenced by L4::Ipc_svr::Timeout_queue::handle_expired_timeouts().
template<typename T , typename POLICY = Bits::Basic_list_policy< T, H_list_item>>
Iterator cxx::H_list< T, POLICY >::insert |
( |
T * |
e, |
|
|
Iterator const & |
pred |
|
) |
| |
|
inline |
template<typename T , typename POLICY = Bits::Basic_list_policy< T, H_list_item>>
static Iterator cxx::H_list< T, POLICY >::insert_after |
( |
T * |
e, |
|
|
Iterator const & |
pred |
|
) |
| |
|
inlinestatic |
Insert an element after the iterator position.
- Parameters
-
e | New element to be inserted. |
pred | Iterator pointing to the element after which the element will be inserted. Must not be end(). |
- Returns
- Iterator pointing to the newly inserted element.
- Precondition
- The list must not be empty.
Definition at line 171 of file hlist.
References cxx::H_list< T, POLICY >::iter().
template<typename T , typename POLICY = Bits::Basic_list_policy< T, H_list_item>>
static Iterator cxx::H_list< T, POLICY >::iter |
( |
T * |
c | ) |
|
|
inlinestatic |
template<typename T , typename POLICY = Bits::Basic_list_policy< T, H_list_item>>
Remove the given element from its list.
- Parameters
-
e | Element to be removed. Must be in a list. |
Definition at line 231 of file hlist.
Referenced by cxx::Base_slab< Obj_size, Slab_size, Max_free, Alloc >::alloc(), cxx::Base_slab< Obj_size, Slab_size, Max_free, Alloc >::free(), cxx::H_list< T, POLICY >::pop_front(), and L4::Ipc_svr::Timeout_queue::remove().
template<typename T , typename POLICY = Bits::Basic_list_policy< T, H_list_item>>
static void cxx::H_list< T, POLICY >::replace |
( |
T * |
p, |
|
|
T * |
e |
|
) |
| |
|
inlinestatic |
Replace an element in a list with a new element.
- Parameters
-
p | Element in list to be replaced. |
e | Replacement element, must not yet be in a list. |
- Precondition
p
and e
must not be NULL.
After the operation the p element is no longer in the list and may be reused.
Definition at line 215 of file hlist.