Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Intrusive doubly-linked list. More...
#include <list.h>
Public Types | |
typedef OwnershipPolicy< T >::Pointer | Pointer |
Pointer type. More... | |
Public Member Functions | |
List () | |
Initialize empty list. More... | |
~List () | |
Release ownership of containing objects. More... | |
size_t | size () const |
Get number of elements in list. More... | |
bool | is_empty () const |
Check if size is zero. More... | |
bool | contains (const T &elem) |
Check if element belongs to list. More... | |
Pointer | front () const |
Get first list element. More... | |
Pointer | back () const |
Get last list element. More... | |
Pointer | nextof (T &elem) const |
Get list element next to given one. More... | |
Pointer | prevof (T &elem) const |
Get list element previous to given one. More... | |
void | push_front (T &elem) |
Prepend element to list. More... | |
void | push_back (T &elem) |
Append element to list. More... | |
void | pop_front () |
Pop first element from list. More... | |
void | pop_back () |
Pop last element from list. More... | |
void | insert_before (T &elem, T &before) |
Insert element into list. More... | |
void | insert_after (T &elem, T &after) |
Insert element into list. More... | |
void | remove (T &elem) |
Remove element from list. More... | |
Intrusive doubly-linked list.
Does not perform allocations. Provides O(1) size check, membership check, insertion, and removal.
T | defines object type, it must inherit ListNode. |
OwnershipPolicy | defines ownership policy which is used to acquire an element ownership when it's added to the list and release ownership when it's removed from the list. |
Node | defines base class of list nodes. It is needed if ListNode is used with non-default tag. |
typedef OwnershipPolicy<T>::Pointer roc::core::List< T, OwnershipPolicy, Node >::Pointer |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |