L4Re - L4 Runtime Environment
cxx::List_item Class Reference

Basic list item. More...

Inherited by cxx::T_list_item< T >.

+ Collaboration diagram for cxx::List_item:

Data Structures

class  Iter
 Iterator for a list of ListItem-s. More...
 
class  T_iter
 Iterator for derived classes from ListItem. More...
 

Public Member Functions

List_itemget_prev_item () const throw ()
 Get previous item. More...
 
List_itemget_next_item () const throw ()
 Get next item. More...
 
void insert_prev_item (List_item *p) throw ()
 Insert item p before this item. More...
 
void insert_next_item (List_item *p) throw ()
 Insert item p after this item. More...
 
void remove_me () throw ()
 Remove this item from the list. More...
 

Static Public Member Functions

template<typename C , typename N >
static C * push_back (C *head, N *p) throw ()
 Append item to a list. More...
 
template<typename C , typename N >
static C * push_front (C *head, N *p) throw ()
 Prepend item to a list. More...
 
template<typename C , typename N >
static C * remove (C *head, N *p) throw ()
 Remove item from a list. More...
 

Detailed Description

Basic list item.

Basic item that can be member of a doubly linked, cyclic list.

Definition at line 37 of file list.

Member Function Documentation

◆ get_next_item()

List_item* cxx::List_item::get_next_item ( ) const
throw (
)
inline

Get next item.

Definition at line 176 of file list.

◆ get_prev_item()

List_item* cxx::List_item::get_prev_item ( ) const
throw (
)
inline

Get previous item.

Definition at line 173 of file list.

◆ insert_next_item()

void cxx::List_item::insert_next_item ( List_item p)
throw (
)
inline

Insert item p after this item.

Definition at line 189 of file list.

◆ insert_prev_item()

void cxx::List_item::insert_prev_item ( List_item p)
throw (
)
inline

Insert item p before this item.

Definition at line 179 of file list.

◆ push_back()

template<typename C , typename N >
C * cxx::List_item::push_back ( C *  head,
N *  p 
)
throw (
)
inlinestatic

Append item to a list.

Convenience function for empty-head corner case.

Parameters
headPointer to the current list head.
pPointer to new item.
Returns
the pointer to the new head.

Definition at line 248 of file list.

◆ push_front()

template<typename C , typename N >
C * cxx::List_item::push_front ( C *  head,
N *  p 
)
throw (
)
inlinestatic

Prepend item to a list.

Convenience function for empty-head corner case.

Parameters
headpointer to the current list head.
ppointer to new item.
Returns
the pointer to the new head.

Definition at line 259 of file list.

◆ remove()

template<typename C , typename N >
C * cxx::List_item::remove ( C *  head,
N *  p 
)
throw (
)
inlinestatic

Remove item from a list.

Convenience function for remove-head corner case.

Parameters
headpointer to the current list head.
ppointer to the item to remove.
Returns
the pointer to the new head.

Definition at line 269 of file list.

◆ remove_me()

void cxx::List_item::remove_me ( )
throw (
)
inline

Remove this item from the list.

Definition at line 198 of file list.


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