Loading...
Searching...
No Matches
cxx::List_item Class Reference
Small C++ Template Library

Basic list item. More...

`#include <list>`

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_item * | get_prev_item () const noexcept
| Get previous item.
List_item * | get_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 26 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

  head | Pointer to the current list head.
  p | Pointer to new item.

Returns
  the pointer to the new head.

Definition at line 237 of file list.

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

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

  head | pointer to the current list head.
  p | pointer to new item.

Returns
  the pointer to the new head.

Definition at line 248 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

  head | pointer to the current list head.
  p | pointer to the item to remove.

Returns
  the pointer to the new head.

Definition at line 258 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:

- l4/cxx/list