UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TDoubleLinkedList< ElementType > Class Template Reference

#include <List.h>

Classes

class  TDoubleLinkedListNode
 

Public Types

typedef TDoubleLinkedListIterator< TDoubleLinkedListNode, ElementType > TIterator
 
typedef TDoubleLinkedListIterator< TDoubleLinkedListNode, const ElementType > TConstIterator
 

Public Member Functions

 TDoubleLinkedList ()
 
virtual ~TDoubleLinkedList ()
 
 TDoubleLinkedList (const TDoubleLinkedList &)=delete
 
TDoubleLinkedListoperator= (const TDoubleLinkedList &)=delete
 
 TDoubleLinkedList (TDoubleLinkedList &&Other)
 
TDoubleLinkedListoperator= (TDoubleLinkedList &&Other)
 
bool AddHead (const ElementType &InElement)
 
bool AddHead (TDoubleLinkedListNode *NewNode)
 
bool AddTail (const ElementType &InElement)
 
bool AddTail (TDoubleLinkedListNode *NewNode)
 
bool InsertNode (const ElementType &InElement, TDoubleLinkedListNode *NodeToInsertBefore=nullptr)
 
bool InsertNode (TDoubleLinkedListNode *NewNode, TDoubleLinkedListNode *NodeToInsertBefore=nullptr)
 
void RemoveNode (const ElementType &InElement)
 
void RemoveNode (TDoubleLinkedListNode *NodeToRemove, bool bDeleteNode=true)
 
void Empty ()
 
TDoubleLinkedListNodeGetHead () const
 
TDoubleLinkedListNodeGetTail () const
 
TDoubleLinkedListNodeFindNode (const ElementType &InElement)
 
bool Contains (const ElementType &InElement)
 
bool IsEmpty () const
 
int32 Num () const
 

Protected Member Functions

virtual void SetListSize (int32 NewListSize)
 

Friends

TIterator begin (TDoubleLinkedList &List)
 
TConstIterator begin (const TDoubleLinkedList &List)
 
TIterator end (TDoubleLinkedList &List)
 
TConstIterator end (const TDoubleLinkedList &List)
 

Detailed Description

template<class ElementType>
class TDoubleLinkedList< ElementType >

Double linked list.

See also
TIntrusiveDoubleLinkedList

Member Typedef Documentation

◆ TConstIterator

template<class ElementType >
typedef TDoubleLinkedListIterator<TDoubleLinkedListNode, const ElementType> TDoubleLinkedList< ElementType >::TConstIterator

◆ TIterator

template<class ElementType >
typedef TDoubleLinkedListIterator<TDoubleLinkedListNode, ElementType> TDoubleLinkedList< ElementType >::TIterator

Used to iterate over the elements of a linked list.

Constructor & Destructor Documentation

◆ TDoubleLinkedList() [1/3]

template<class ElementType >
TDoubleLinkedList< ElementType >::TDoubleLinkedList ( )
inline

Constructors.

◆ ~TDoubleLinkedList()

template<class ElementType >
virtual TDoubleLinkedList< ElementType >::~TDoubleLinkedList ( )
inlinevirtual

Destructor

◆ TDoubleLinkedList() [2/3]

template<class ElementType >
TDoubleLinkedList< ElementType >::TDoubleLinkedList ( const TDoubleLinkedList< ElementType > &  )
delete

◆ TDoubleLinkedList() [3/3]

template<class ElementType >
TDoubleLinkedList< ElementType >::TDoubleLinkedList ( TDoubleLinkedList< ElementType > &&  Other)
inline

Move Constructor/Assignment

Member Function Documentation

◆ AddHead() [1/2]

template<class ElementType >
bool TDoubleLinkedList< ElementType >::AddHead ( const ElementType &  InElement)
inline

Add the specified value to the beginning of the list, making that value the new head of the list.

Parameters
InElementthe value to add to the list.
Returns
whether the node was successfully added into the list.
See also
GetHead, InsertNode, RemoveNode

◆ AddHead() [2/2]

template<class ElementType >
bool TDoubleLinkedList< ElementType >::AddHead ( TDoubleLinkedListNode NewNode)
inline

◆ AddTail() [1/2]

template<class ElementType >
bool TDoubleLinkedList< ElementType >::AddTail ( const ElementType &  InElement)
inline

Append the specified value to the end of the list

Parameters
InElementthe value to add to the list.
Returns
whether the node was successfully added into the list
See also
GetTail, InsertNode, RemoveNode

◆ AddTail() [2/2]

template<class ElementType >
bool TDoubleLinkedList< ElementType >::AddTail ( TDoubleLinkedListNode NewNode)
inline

◆ Contains()

template<class ElementType >
bool TDoubleLinkedList< ElementType >::Contains ( const ElementType &  InElement)
inline

◆ Empty()

template<class ElementType >
void TDoubleLinkedList< ElementType >::Empty ( )
inline

Removes all nodes from the list.

◆ FindNode()

template<class ElementType >
TDoubleLinkedListNode * TDoubleLinkedList< ElementType >::FindNode ( const ElementType &  InElement)
inline

Finds the node corresponding to the value specified

Parameters
InElementthe value to find
Returns
a pointer to the node that contains the value specified, or nullptr of the value couldn't be found

◆ GetHead()

template<class ElementType >
TDoubleLinkedListNode * TDoubleLinkedList< ElementType >::GetHead ( ) const
inline

Returns the node at the head of the list.

Returns
Pointer to the first node.
See also
GetTail

◆ GetTail()

template<class ElementType >
TDoubleLinkedListNode * TDoubleLinkedList< ElementType >::GetTail ( ) const
inline

Returns the node at the end of the list.

Returns
Pointer to the last node.
See also
GetHead

◆ InsertNode() [1/2]

template<class ElementType >
bool TDoubleLinkedList< ElementType >::InsertNode ( const ElementType &  InElement,
TDoubleLinkedListNode NodeToInsertBefore = nullptr 
)
inline

Insert the specified value into the list at an arbitrary point.

Parameters
InElementthe value to insert into the list
NodeToInsertBeforethe new node will be inserted into the list at the current location of this node if nullptr, the new node will become the new head of the list
Returns
whether the node was successfully added into the list
See also
Empty, RemoveNode

◆ InsertNode() [2/2]

template<class ElementType >
bool TDoubleLinkedList< ElementType >::InsertNode ( TDoubleLinkedListNode NewNode,
TDoubleLinkedListNode NodeToInsertBefore = nullptr 
)
inline

◆ IsEmpty()

template<class ElementType >
bool TDoubleLinkedList< ElementType >::IsEmpty ( ) const
inline

Returns true if the list is empty and contains no elements.

Returns
True if the list is empty.
See also
Num

◆ Num()

template<class ElementType >
int32 TDoubleLinkedList< ElementType >::Num ( ) const
inline

Returns the number of items in the list.

Returns
Item count.

◆ operator=() [1/2]

template<class ElementType >
TDoubleLinkedList & TDoubleLinkedList< ElementType >::operator= ( const TDoubleLinkedList< ElementType > &  )
delete

◆ operator=() [2/2]

template<class ElementType >
TDoubleLinkedList & TDoubleLinkedList< ElementType >::operator= ( TDoubleLinkedList< ElementType > &&  Other)
inline

◆ RemoveNode() [1/2]

template<class ElementType >
void TDoubleLinkedList< ElementType >::RemoveNode ( const ElementType &  InElement)
inline

Remove the node corresponding to InElement.

Parameters
InElementThe value to remove from the list.
See also
Empty, InsertNode

◆ RemoveNode() [2/2]

template<class ElementType >
void TDoubleLinkedList< ElementType >::RemoveNode ( TDoubleLinkedListNode NodeToRemove,
bool  bDeleteNode = true 
)
inline

Removes the node specified.

Parameters
NodeToRemoveThe node to remove.
See also
Empty, InsertNode

◆ SetListSize()

template<class ElementType >
virtual void TDoubleLinkedList< ElementType >::SetListSize ( int32  NewListSize)
inlineprotectedvirtual

Updates the size reported by Num(). Child classes can use this function to conveniently hook into list additions/removals.

Parameters
NewListSizethe new size for this list

Reimplemented in FEditPropertyChain.

Friends And Related Symbol Documentation

◆ begin [1/2]

template<class ElementType >
TConstIterator begin ( const TDoubleLinkedList< ElementType > &  List)
friend

◆ begin [2/2]

template<class ElementType >
TIterator begin ( TDoubleLinkedList< ElementType > &  List)
friend

◆ end [1/2]

template<class ElementType >
TConstIterator end ( const TDoubleLinkedList< ElementType > &  List)
friend

◆ end [2/2]

template<class ElementType >
TIterator end ( TDoubleLinkedList< ElementType > &  List)
friend

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