Stefan Scholz / ETL
Embed: (wiki syntax)

« Back to documentation index

forward_list_base Class Reference

The base class for all forward_lists. More...

#include <forward_list.h>

Inherited by iforward_list< T >.

Data Structures

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

Public Types

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

Public Member Functions

size_type size () const
 Gets the size of the forward_list.
size_type max_size () const
 Gets the maximum possible size of the forward_list.
bool empty () const
 Checks to see if the forward_list is empty.
bool full () const
 Checks to see if the forward_list is full.
size_t available () const
 Returns the remaining capacity.
void reverse ()
 Reverses the forward_list.

Protected Member Functions

 forward_list_base (etl::ipool &node_pool_, size_type max_size_)
 The constructor that is called from derived classes.
node_tget_head ()
 Get the head node.
const node_tget_head () const
 Get the head node.
void insert_node_after (node_t &position, node_t &node)
 Insert a node.
bool is_trivial_list () const
 Is the forward_list a trivial length?
void join (node_t *left, node_t *right)
 Join two nodes.

Protected Attributes

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

Detailed Description

The base class for all forward_lists.

Definition at line 124 of file forward_list.h.


Member Typedef Documentation

typedef size_t size_type

The type used for determining the size of forward_list.

Reimplemented in iforward_list< T >, and forward_list< T, MAX_SIZE_ >.

Definition at line 143 of file forward_list.h.


Constructor & Destructor Documentation

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

The constructor that is called from derived classes.

Definition at line 219 of file forward_list.h.


Member Function Documentation

size_t available (  ) const

Returns the remaining capacity.

Returns:
The remaining capacity.

Definition at line 181 of file forward_list.h.

bool empty (  ) const

Checks to see if the forward_list is empty.

Definition at line 164 of file forward_list.h.

bool full (  ) const

Checks to see if the forward_list is full.

Definition at line 172 of file forward_list.h.

const node_t& get_head (  ) const [protected]

Get the head node.

Definition at line 236 of file forward_list.h.

node_t& get_head (  ) [protected]

Get the head node.

Definition at line 228 of file forward_list.h.

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

Insert a node.

Definition at line 244 of file forward_list.h.

bool is_trivial_list (  ) const [protected]

Is the forward_list a trivial length?

Definition at line 254 of file forward_list.h.

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

Join two nodes.

Definition at line 262 of file forward_list.h.

size_type max_size (  ) const

Gets the maximum possible size of the forward_list.

Definition at line 156 of file forward_list.h.

void reverse (  )

Reverses the forward_list.

Definition at line 189 of file forward_list.h.

size_type size (  ) const

Gets the size of the forward_list.

Definition at line 148 of file forward_list.h.


Field Documentation

Internal debugging.

Definition at line 270 of file forward_list.h.

const size_type MAX_SIZE [protected]

The maximum size of the forward_list.

Reimplemented in forward_list< T, MAX_SIZE_ >.

Definition at line 269 of file forward_list.h.

etl::ipool* p_node_pool [protected]

The pool of data nodes used in the list.

Definition at line 268 of file forward_list.h.

node_t start_node [protected]

The node that acts as the forward_list start.

Definition at line 267 of file forward_list.h.