Urho3D
Classes | Public Member Functions | Private Member Functions | List of all members
Urho3D::List< T > Class Template Reference

Doubly-linked list template class. More...

#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/Container/List.h>

Inheritance diagram for Urho3D::List< T >:
Urho3D::ListBase

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.
 
Listoperator= (const List< T > &rhs)
 Assign from another list.
 
Listoperator= (List< T > &&rhs) noexcept
 Move-assign from another list.
 
Listoperator+= (const T &rhs)
 Add-assign an element.
 
Listoperator+= (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 (i32 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.
 
i32 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

NodeHead () const
 Return the head node.
 
NodeTail () const
 Return the tail node.
 
void InsertNode (Node *dest, const T &value)
 Allocate and insert a node into the list.
 
NodeEraseNode (Node *node)
 Erase and free a node. Return pointer to the next node, or to the end if could not erase.
 
NodeReserveNode ()
 Reserve a node.
 
NodeReserveNode (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
ListNodeBasehead_
 Head node pointer.
 
ListNodeBasetail_
 Tail node pointer.
 
AllocatorBlockallocator_
 Node allocator.
 
i32 size_
 Number of nodes.
 

Detailed Description

template<class T>
class Urho3D::List< T >

Doubly-linked list template class.


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