U3D
Open-source, cross-platform 2D and 3D game engine built in C++
|
Doubly-linked list template class. More...
#include </var/dev/u3d/stable/Source/Urho3D/Container/List.h>
Classes | |
struct | ConstIterator |
List const iterator. More... | |
struct | Iterator |
List iterator. More... | |
struct | Node |
List node. More... | |
Public Member Functions | |
List () | |
Construct empty. | |
List (const List< T > &list) | |
Construct from another list. | |
List (List< T > &&list) noexcept | |
Move-construct from another list. | |
List (const std::initializer_list< T > &list) | |
Aggregate initialization constructor. | |
~List () | |
Destruct. | |
List & | operator= (const List< T > &rhs) |
Assign from another list. | |
List & | operator= (List< T > &&rhs) noexcept |
Move-assign from another list. | |
List & | operator+= (const T &rhs) |
Add-assign an element. | |
List & | operator+= (const List< T > &rhs) |
Add-assign a list. | |
bool | operator== (const List< T > &rhs) const |
Test for equality with another list. | |
bool | operator!= (const List< T > &rhs) const |
Test for inequality with another list. | |
void | Push (const T &value) |
Insert an element to the end. | |
void | PushFront (const T &value) |
Insert an element to the beginning. | |
void | Insert (const Iterator &dest, const T &value) |
Insert an element at position. | |
void | Insert (const Iterator &dest, const List< T > &list) |
Insert a list at position. | |
void | Insert (const Iterator &dest, const ConstIterator &start, const ConstIterator &end) |
Insert elements by iterators. | |
void | Insert (const Iterator &dest, const T *start, const T *end) |
Insert elements. | |
void | Pop () |
Erase the last element. | |
void | PopFront () |
Erase the first element. | |
Iterator | Erase (Iterator it) |
Erase an element by iterator. Return iterator to the next element. | |
Iterator | Erase (const Iterator &start, const Iterator &end) |
Erase a range by iterators. Return an iterator to the next element. | |
void | Clear () |
Clear the list. | |
void | Resize (unsigned newSize) |
Resize the list by removing or adding items at the end. | |
Iterator | Find (const T &value) |
Return iterator to value, or to the end if not found. | |
ConstIterator | Find (const T &value) const |
Return const iterator to value, or to the end if not found. | |
bool | Contains (const T &value) const |
Return whether contains a specific value. | |
Iterator | Begin () |
Return iterator to the first element. | |
ConstIterator | Begin () const |
Return iterator to the first element. | |
Iterator | End () |
Return iterator to the end. | |
ConstIterator | End () const |
Return iterator to the end. | |
T & | Front () |
Return first element. | |
const T & | Front () const |
Return const first element. | |
T & | Back () |
Return last element. | |
const T & | Back () const |
Return const last element. | |
unsigned | Size () const |
Return number of elements. | |
bool | Empty () const |
Return whether list is empty. | |
Public Member Functions inherited from Urho3D::ListBase | |
ListBase () | |
Construct. | |
void | Swap (ListBase &rhs) |
Swap with another linked list. | |
Private Member Functions | |
Node * | Head () const |
Return the head node. | |
Node * | Tail () const |
Return the tail node. | |
void | InsertNode (Node *dest, const T &value) |
Allocate and insert a node into the list. | |
Node * | EraseNode (Node *node) |
Erase and free a node. Return pointer to the next node, or to the end if could not erase. | |
Node * | ReserveNode () |
Reserve a node. | |
Node * | ReserveNode (const T &value) |
Reserve a node with initial value. | |
void | FreeNode (Node *node) |
Free a node. | |
Additional Inherited Members | |
Protected Attributes inherited from Urho3D::ListBase | |
ListNodeBase * | head_ |
Head node pointer. | |
ListNodeBase * | tail_ |
Tail node pointer. | |
AllocatorBlock * | allocator_ |
Node allocator. | |
unsigned | size_ |
Number of nodes. | |
Doubly-linked list template class.