Stefan Scholz / ETL
Embed: (wiki syntax)

« Back to documentation index

list_base Class Reference

The base class for all lists. More...

#include <list.h>

Inherited by ilist< T >.

Data Structures

struct  node_t
 The node element in the list. More...

Public Types

typedef size_t size_type
 The type used for determining the size of list.

Public Member Functions

void reverse ()
 Reverses the list.
size_type max_size () const
 Gets the maximum possible size of the list.
size_type size () const
 Gets the size of the list.
bool empty () const
 Checks to see if the list is empty.
bool full () const
 Checks to see if the list is full.
size_t available () const
 Returns the remaining capacity.
bool is_trivial_list () const
 Is the list a trivial length?

Protected Member Functions

node_tget_head ()
 Get the head node.
const node_tget_head () const
 Get the head node.
node_tget_tail ()
 Get the tail node.
const node_tget_tail () const
 Get the tail node.
void insert_node (node_t &position, node_t &node)
 Insert a node before 'position'.
void join (node_t &left, node_t &right)
 Join two nodes.
 list_base (etl::ipool &node_pool_, size_type max_size_)
 The constructor that is called from derived classes.

Protected Attributes

etl::ipool * p_node_pool
 The pool of data nodes used in the list.
node_t terminal_node
 The node that acts as the list start and end.
const size_type MAX_SIZE
 The maximum size of the list.
etl::debug_count construct_count
 Internal debugging.

Detailed Description

The base class for all lists.

Definition at line 139 of file list.h.


Member Typedef Documentation

typedef size_t size_type

The type used for determining the size of list.

Reimplemented in ilist< T >, and list< T, MAX_SIZE_ >.

Definition at line 143 of file list.h.


Constructor & Destructor Documentation

list_base ( etl::ipool &  node_pool_,
size_type  max_size_ 
) [protected]

The constructor that is called from derived classes.

Definition at line 302 of file list.h.


Member Function Documentation

size_t available (  ) const

Returns the remaining capacity.

Returns:
The remaining capacity.

Definition at line 233 of file list.h.

bool empty (  ) const

Checks to see if the list is empty.

Definition at line 216 of file list.h.

bool full (  ) const

Checks to see if the list is full.

Definition at line 224 of file list.h.

node_t& get_head (  ) [protected]

Get the head node.

Definition at line 251 of file list.h.

const node_t& get_head (  ) const [protected]

Get the head node.

Definition at line 259 of file list.h.

const node_t& get_tail (  ) const [protected]

Get the tail node.

Definition at line 275 of file list.h.

node_t& get_tail (  ) [protected]

Get the tail node.

Definition at line 267 of file list.h.

void insert_node ( node_t position,
node_t node 
) [protected]

Insert a node before 'position'.

Definition at line 283 of file list.h.

bool is_trivial_list (  ) const

Is the list a trivial length?

Definition at line 241 of file list.h.

void join ( node_t left,
node_t right 
) [protected]

Join two nodes.

Definition at line 293 of file list.h.

size_type max_size (  ) const

Gets the maximum possible size of the list.

Definition at line 200 of file list.h.

void reverse (  )

Reverses the list.

Definition at line 174 of file list.h.

size_type size (  ) const

Gets the size of the list.

Definition at line 208 of file list.h.


Field Documentation

Internal debugging.

Definition at line 312 of file list.h.

const size_type MAX_SIZE [protected]

The maximum size of the list.

Reimplemented in list< T, MAX_SIZE_ >.

Definition at line 311 of file list.h.

etl::ipool* p_node_pool [protected]

The pool of data nodes used in the list.

Definition at line 309 of file list.h.

node_t terminal_node [protected]

The node that acts as the list start and end.

Definition at line 310 of file list.h.