Urho3D
|
Singly-linked list template class. Elements must inherit from LinkedListNode. More...
#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/Container/LinkedList.h>
Public Member Functions | |
LinkedList () | |
Construct empty. | |
LinkedList (const LinkedList< T > &list)=delete | |
Non-copyable. | |
LinkedList (const std::initializer_list< T > &list) | |
Aggregate initialization constructor. | |
LinkedList< T > & | operator= (const LinkedList< T > &list)=delete |
Non-assignable. | |
~LinkedList () | |
Destruct. | |
void | Clear () |
Remove all elements. | |
void | InsertFront (T *element) |
Insert an element at the beginning. | |
void | Insert (T *element) |
Insert an element at the end. | |
bool | Erase (T *element) |
Erase an element. Return true if successful. | |
bool | Erase (T *element, T *previous) |
Erase an element when the previous element is known (optimization). Return true if successful. | |
T * | First () const |
Return first element, or null if empty. | |
T * | Last () const |
Return last element, or null if empty. | |
T * | Next (T *element) const |
Return next element, or null if no more elements. | |
bool | Empty () const |
Return whether is empty. | |
Private Attributes | |
T * | head_ |
First element. | |
Singly-linked list template class. Elements must inherit from LinkedListNode.