L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
cxx::List_item Class Reference

Basic list item. More...

#include <list>

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 noexcept
 Get previous item.
 
List_itemget_next_item () const noexcept
 Get next item.
 
void insert_prev_item (List_item *p) noexcept
 Insert item p before this item.
 
void insert_next_item (List_item *p) noexcept
 Insert item p after this item.
 
void remove_me () noexcept
 Remove this item from the list.
 

Static Public Member Functions

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

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

◆ push_back()

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

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.

References insert_prev_item().

Referenced by cxx::List< D, Alloc >::push_back().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ push_front()

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

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.

Referenced by cxx::List< D, Alloc >::push_front().

+ Here is the caller graph for this function:

◆ remove()

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

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.

Referenced by cxx::List< D, Alloc >::remove().

+ Here is the caller graph for this function:

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