engine
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Protected 成员函数 | 所有成员列表
TDoubleLinkedList< ElementType > 模板类 参考

Double linked list. 更多...

#include <List.h>

Public 类型

typedef TDoubleLinkedListIterator< TDoubleLinkedListNode, ElementType > TIterator
 Used to iterate over the elements of a linked list.
 

Public 成员函数

bool AddHead (const ElementType &InElement)
 Add the specified value to the beginning of the list, making that value the new head of the list. 更多...
 
bool AddTail (const ElementType &InElement)
 Append the specified value to the end of the list 更多...
 
void Empty ()
 Removes all nodes from the list.
 
TDoubleLinkedListNode * FindNode (const ElementType &InElement)
 Finds the node corresponding to the value specified 更多...
 
TDoubleLinkedListNode * GetHead () const
 Returns the node at the head of the list. 更多...
 
TDoubleLinkedListNode * GetTail () const
 Returns the node at the end of the list. 更多...
 
bool InsertNode (const ElementType &InElement, TDoubleLinkedListNode *NodeToInsertBefore=nullptr)
 Insert the specified value into the list at an arbitrary point. 更多...
 
int32 Num () const
 Returns the number of items in the list. 更多...
 
void RemoveNode (const ElementType &InElement)
 Remove the node corresponding to InElement. 更多...
 
void RemoveNode (TDoubleLinkedListNode *NodeToRemove, bool bDeleteNode=true)
 Removes the node specified. 更多...
 
 TDoubleLinkedList ()
 Constructors.
 
virtual ~TDoubleLinkedList ()
 Destructor
 

Protected 成员函数

virtual void SetListSize (int32 NewListSize)
 Updates the size reported by Num(). 更多...
 

详细描述

template<class ElementType>
class TDoubleLinkedList< ElementType >

Double linked list.

成员函数说明

◆ AddHead()

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.

参数
InElementthe value to add to the list.
返回
whether the node was successfully added into the list.
参见
GetHead, InsertNode, RemoveNode

◆ AddTail()

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

Append the specified value to the end of the list

参数
InElementthe value to add to the list.
返回
whether the node was successfully added into the list
参见
GetTail, InsertNode, RemoveNode

◆ FindNode()

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

Finds the node corresponding to the value specified

参数
InElementthe value to find
返回
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.

返回
Pointer to the first node.
参见
GetTail

◆ GetTail()

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

Returns the node at the end of the list.

返回
Pointer to the last node.
参见
GetHead

◆ InsertNode()

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.

参数
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
返回
whether the node was successfully added into the list
参见
Empty, RemoveNode

◆ Num()

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

Returns the number of items in the list.

返回
Item count.

◆ RemoveNode() [1/2]

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

Remove the node corresponding to InElement.

参数
InElementThe value to remove from the list.
参见
Empty, InsertNode

◆ RemoveNode() [2/2]

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

Removes the node specified.

参数
NodeToRemoveThe node to remove.
参见
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.

参数
NewListSizethe new size for this list

被 FEditPropertyChain 重载.


该类的文档由以下文件生成: