Embedded Template Library  1.0
 All Classes Files Functions Variables Typedefs Friends Modules Pages
etl::ilist< T > Class Template Reference

#include <ilist.h>

Classes

class  const_iterator
 const_iterator More...
 
struct  Data_Node
 The data node element in the list. More...
 
class  iterator
 iterator. More...
 
struct  Node
 The node element in the list. More...
 

Public Types

typedef T value_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T & reference
 
typedef const T & const_reference
 
typedef size_t size_type
 
typedef std::iterator_traits
< iterator >::difference_type 
difference_type
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 
- Public Types inherited from etl::list_base
typedef size_t size_type
 The type used for determining the size of list.
 

Public Member Functions

ilistoperator= (const ilist &rhs)
 Assignment operator.
 
iterator begin ()
 Gets the beginning of the list.
 
const_iterator begin () const
 Gets the beginning of the list.
 
iterator end ()
 Gets the end of the list.
 
const_iterator end () const
 Gets the end of the list.
 
const_iterator cbegin () const
 Gets the beginning of the list.
 
const_iterator cend () const
 Gets the end of the list.
 
reverse_iterator rbegin ()
 Gets the reverse beginning of the list.
 
const_reverse_iterator rbegin () const
 Gets the reverse beginning of the list.
 
reverse_iterator rend ()
 Gets the reverse end of the list.
 
const_reverse_iterator crbegin () const
 Gets the reverse beginning of the list.
 
const_reverse_iterator crend () const
 Gets the reverse end of the list.
 
reference front ()
 Gets a reference to the first element.
 
const_reference front () const
 Gets a const reference to the first element.
 
reference back ()
 Gets a reference to the last element.
 
const_reference back () const
 Gets a reference to the last element.
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws list_iterator if the iterators are reversed. More...
 
void assign (size_t n, parameter_t value)
 Assigns 'n' copies of a value to the list.
 
void push_front ()
 Adds a node to the front of the list so a new value can be assigned to front().
 
void push_front (parameter_t value)
 Pushes a value to the front of the list.
 
void pop_front ()
 Removes a value from the front of the list.
 
void push_back ()
 Adds a node to the back of the list so a new value can be assigned to back().
 
void push_back (parameter_t value)
 Pushes a value to the back of the list..
 
void pop_back ()
 Removes a value from the back of the list.
 
iterator insert (iterator position, const value_type &value)
 Inserts a value to the list at the specified position.
 
void insert (iterator position, size_t n, const value_type &value)
 Inserts 'n' copies of a value to the list at the specified position.
 
template<typename TIterator >
void insert (iterator position, TIterator first, TIterator last)
 Inserts a range of values to the list at the specified position.
 
iterator erase (iterator position)
 Erases the value at the specified position.
 
iterator erase (iterator first, iterator last)
 Erases a range of elements.
 
void resize (size_t n)
 Resizes the list.
 
void resize (size_t n, parameter_t value)
 Resizes the list.
 
void clear ()
 Clears the list.
 
void remove (const value_type &value)
 
template<typename TPredicate >
void remove_if (TPredicate predicate)
 Removes according to a predicate.
 
void unique ()
 
template<typename TIsEqual >
void unique (TIsEqual isEqual)
 
void sort ()
 
template<typename TCompare >
void sort (TCompare compare)
 
void reverse ()
 Reverses the list.
 
- Public Member Functions inherited from etl::list_base
size_type size () const
 Gets the size of the list.
 
size_type max_size () const
 Gets the maximum possible 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
 

Protected Types

typedef parameter_type< T,
is_fundamental< T >::value||is_pointer
< T >::value >::type 
parameter_t
 

Protected Member Functions

 ilist (Data_Node *node_pool, size_t max_size_)
 Constructor.
 
- Protected Member Functions inherited from etl::list_base
 list_base (size_type max_size)
 The constructor that is called from derived classes.
 

Protected Attributes

Node terminal_node
 The node that acts as the list start and end.
 
- Protected Attributes inherited from etl::list_base
size_type next_free
 The index of the next free node.
 
size_type current_size
 The number of the used nodes.
 
const size_type MAX_SIZE
 The maximum size of the list.
 

Detailed Description

template<typename T>
class etl::ilist< T >

A templated base for all etl::list types.

Member Function Documentation

template<typename T>
template<typename TIterator >
void etl::ilist< T >::assign ( TIterator  first,
TIterator  last 
)
inline

If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws list_iterator if the iterators are reversed.

Assigns a range of values to the list. If ETL_THROW_EXCEPTIONS is defined throws etl::list_full if the list does not have enough free space.

template<typename T>
void etl::ilist< T >::sort ( )
inline

Sort using in-place merge sort algorithm. Uses 'less-than operator as the predicate.

template<typename T>
template<typename TCompare >
void etl::ilist< T >::sort ( TCompare  compare)
inline

Sort using in-place merge sort algorithm. Uses a supplied predicate function or functor. This is not my algorithm. I got it off the web somewhere.

template<typename T>
void etl::ilist< T >::unique ( )
inline

Removes all but the first element from every consecutive group of equal elements in the container.

template<typename T>
template<typename TIsEqual >
void etl::ilist< T >::unique ( TIsEqual  isEqual)
inline

Removes all but the first element from every consecutive group of equal elements in the container.


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