![]() |
ULIS
dev4.0.7
Utility Library for Imaging Systems
|
The TForwardList class provides a simple dynamic singly linked list class for ULIS interfaces. More...
Public Types | |
typedef TForwardListNode< T > | tNode |
Public Member Functions | |
TForwardList () | |
TForwardList (const TForwardList< T > &iOther)=delete | |
TForwardList (TForwardList< T > &&iOther) | |
~TForwardList () | |
T & | At (uint64 iIndex) |
const T & | At (uint64 iIndex) const |
T & | Back () |
const T & | Back () const |
void | Clear () |
template<class... Args> | |
void | EmplaceBack (Args &&... args) |
template<class... Args> | |
void | EmplaceFront (Args &&... args) |
bool | Erase (const tNode *iNode) |
T & | Front () |
const T & | Front () const |
bool | IsEmpty () const |
tNode * | NodeAt (uint64 iIndex) |
const tNode * | NodeAt (uint64 iIndex) const |
tNode * | NodeBack () |
const tNode * | NodeBack () const |
tNode * | NodeFindFirst (const T &iValue) |
const tNode * | NodeFindFirst (const T &iValue) const |
tNode * | NodeFindFrom (const T &iValue, uint64 iFrom=0) |
const tNode * | NodeFindFrom (const T &iValue, uint64 iFrom=0) const |
tNode * | NodeFront () |
const tNode * | NodeFront () const |
TForwardList< T > & | operator= (const TForwardList< T > &iOther)=delete |
TForwardList< T > & | operator= (TForwardList< T > &&iOther)=delete |
T & | operator[] (uint64 iIndex) |
const T & | operator[] (uint64 iIndex) const |
void | PopFront () |
void | PushBack (const T &iValue) |
void | PushBack (T &&iValue) |
void | PushFront (const T &iValue) |
void | PushFront (T &&iValue) |
uint64 | Size () const |
Protected Attributes | |
tNode * | mBack |
The back of the list. Although traversal is one way, this is here to allow easy push back on the list. More... | |
tNode * | mFront |
The head of the list, start iterating from there. More... | |
uint64 | mSize |
The list size. More... | |
The need of a custom TForwardList class rose from the fact that std:: classes cannot be exported easily accross dll boundaries when ULIS is compiled as a shared library.
typedef TForwardListNode< T > TForwardList< T >::tNode |
|
inline |
Destroy the list and cleanup memory.
|
inline |
Default constructor ( empty ).
|
delete |
Copy constructor, explicitly removed.
|
inline |
Move constructor. The first object is left in a valid but empty state. The second object steals the state.
|
inline |
Access component at index. Alias of operator[]()
|
inline |
Access component at index. Alias of operator[]()
|
inline |
Access component at back. The behaviour is undefined if the list is empty.
|
inline |
Access const component at back. The behaviour is undefined if the list is empty.
|
inline |
Clear the list, deallocating everything.
|
inline |
EmplaceBack, emplace a new element at back of the list.
|
inline |
EmplaceFront, emplace a new element at front end of the list.
|
inline |
Erase element.
|
inline |
Access component at front. The behaviour is undefined if the list is empty.
|
inline |
Access const component at front. The behaviour is undefined if the list is empty.
|
inline |
Returns wether the list is empty or not.
|
inline |
Access node at index.
|
inline |
Access node at index.
|
inline |
Access node at back. The behaviour is undefined if the list is empty.
|
inline |
Access const node at back. The behaviour is undefined if the list is empty.
|
inline |
Find node with associated value starting from index.
|
inline |
Find const node with associated value starting from index.
|
inline |
Find node with associated value starting from index.
|
inline |
Find const node with associated value starting from index.
|
inline |
Access node at front. The behaviour is undefined if the list is empty.
|
inline |
Access const node at front. The behaviour is undefined if the list is empty.
|
delete |
Copy Assignment Operator, explicitly removed.
|
delete |
Move Assignment Operator, explicitly removed.
|
inline |
Access component at index. The behaviour is undefined if the list has no size. The behaviour is undefined if the index is greater than the size. The behaviour is undefined if the underlying buffer is nullptr, which indicates a corrupted states anyway.
|
inline |
Access const component at index. The behaviour is undefined if the list has no size. The behaviour is undefined if the index is greater than the size. The behaviour is undefined if the underlying buffer is nullptr, which indicates a corrupted states anyway.
|
inline |
PopFront, pop the front element. The behaviour is undefined is the list is empty.
|
inline |
PushBack, insert a new element at the back of the list.
|
inline |
PushBack, insert a new element at the back of the list.
|
inline |
PushFront, insert a new element at the front of the list.
|
inline |
PushFront, insert a new element at the front of the list.
|
inline |
Returns the list size.
|
protected |
|
protected |
|
protected |