arduino-audio-tools
Loading...
Searching...
No Matches
List< T > Class Template Reference

Double linked list. More...

#include <List.h>

Classes

class  Iterator
struct  Node

Public Member Functions

 List (Allocator &allocator=DefaultAllocator)
 Default constructor.
template<size_t N>
 List (const T(&a)[N], Allocator &allocator=DefaultAllocator)
 Constructor using array.
 List (List &ref)=default
 copy constructor
 ~List ()
T & back ()
 Provides the last element.
Iterator begin ()
bool clear ()
bool empty ()
Iterator end ()
bool erase (Iterator it)
T & front ()
 Provides the first element.
bool insert (Iterator it, const T &data)
T & operator[] (int index)
bool pop_back ()
bool pop_back (T &data)
bool pop_front ()
bool pop_front (T &data)
bool push_back (T data)
bool push_front (T data)
Iterator rbegin ()
Iterator rend ()
void setAllocator (Allocator &allocator)
size_t size ()
bool swap (List< T > &ref)

Protected Member Functions

Node * createNode ()
void deleteNode (Node *p_delete)
Node * firstDataNode ()
Node * lastDataNode ()
void link ()
void validate ()

Protected Attributes

Node first
Node last
Allocator * p_allocator = &DefaultAllocator
size_t record_count =0

Detailed Description

template<class T>
class audio_tools::List< T >

Double linked list.

Author
Phil Schatzmann
Template Parameters
T

Constructor & Destructor Documentation

◆ List() [1/3]

template<class T>
List ( Allocator & allocator = DefaultAllocator)
inline

Default constructor.

◆ List() [2/3]

template<class T>
List ( List< T > & ref)
default

copy constructor

◆ List() [3/3]

template<class T>
template<size_t N>
List ( const T(&) a[N],
Allocator & allocator = DefaultAllocator )
inline

Constructor using array.

◆ ~List()

template<class T>
~List ( )
inline

Member Function Documentation

◆ back()

template<class T>
T & back ( )
inline

Provides the last element.

◆ begin()

template<class T>
Iterator begin ( )
inline

◆ clear()

template<class T>
bool clear ( )
inline

◆ createNode()

template<class T>
Node * createNode ( )
inlineprotected

◆ deleteNode()

template<class T>
void deleteNode ( Node * p_delete)
inlineprotected

◆ empty()

template<class T>
bool empty ( )
inline

◆ end()

template<class T>
Iterator end ( )
inline

◆ erase()

template<class T>
bool erase ( Iterator it)
inline

◆ firstDataNode()

template<class T>
Node * firstDataNode ( )
inlineprotected

◆ front()

template<class T>
T & front ( )
inline

Provides the first element.

◆ insert()

template<class T>
bool insert ( Iterator it,
const T & data )
inline

◆ lastDataNode()

template<class T>
Node * lastDataNode ( )
inlineprotected

◆ link()

template<class T>
void link ( )
inlineprotected

◆ operator[]()

template<class T>
T & operator[] ( int index)
inline

◆ pop_back() [1/2]

template<class T>
bool pop_back ( )
inline

◆ pop_back() [2/2]

template<class T>
bool pop_back ( T & data)
inline

◆ pop_front() [1/2]

template<class T>
bool pop_front ( )
inline

◆ pop_front() [2/2]

template<class T>
bool pop_front ( T & data)
inline

◆ push_back()

template<class T>
bool push_back ( T data)
inline

◆ push_front()

template<class T>
bool push_front ( T data)
inline

◆ rbegin()

template<class T>
Iterator rbegin ( )
inline

◆ rend()

template<class T>
Iterator rend ( )
inline

◆ setAllocator()

template<class T>
void setAllocator ( Allocator & allocator)
inline

◆ size()

template<class T>
size_t size ( )
inline

◆ swap()

template<class T>
bool swap ( List< T > & ref)
inline

◆ validate()

template<class T>
void validate ( )
inlineprotected

Member Data Documentation

◆ first

template<class T>
Node first
protected

◆ last

template<class T>
Node last
protected

◆ p_allocator

template<class T>
Allocator* p_allocator = &DefaultAllocator
protected

◆ record_count

template<class T>
size_t record_count =0
protected

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