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

Encapsulates a link in a single linked list with constant access time. 更多...

#include <List.h>

+ 类 TIntrusiveLinkedList< ElementType > 继承关系图:

Public 成员函数

 TIntrusiveLinkedList ()
 Default constructor (empty list).
 
- Public 成员函数 继承自 TLinkedListBase< ElementType, ElementType, TIntrusiveLinkedListIterator >
FORCEINLINE bool IsLinked ()
 Returns whether element is currently linked. 更多...
 
FORCEINLINE void LinkAfter (ElementType *After)
 Adds this element to the linked list, after the specified element 更多...
 
FORCEINLINE void LinkBefore (ElementType *Before)
 Adds this element to a list, before the given element. 更多...
 
FORCEINLINE void LinkHead (ElementType *&Head)
 Adds this element as the head of the linked list, linking the input Head pointer to this element, so that when the element is linked/unlinked, the Head linked list pointer will be correctly updated. 更多...
 
FORCEINLINE void LinkReplace (ElementType *Replace)
 Adds this element to the linked list, replacing the specified element. 更多...
 
 TLinkedListBase ()
 Default constructor (empty list)
 
FORCEINLINE void Unlink ()
 Removes this element from the list in constant time. 更多...
 

额外继承的成员函数

- Public 类型 继承自 TLinkedListBase< ElementType, ElementType, TIntrusiveLinkedListIterator >
typedef TIntrusiveLinkedListIterator< ElementType, ElementType > TIterator
 Used to iterate over the elements of a linked list.
 

详细描述

template<class ElementType>
class TIntrusiveLinkedList< ElementType >

Encapsulates a link in a single linked list with constant access time.

Structs/classes must inherit this, to use it, e.g: struct FMyStruct : public TIntrusiveLinkedList<FMyStruct>

This linked list is intrusive, i.e. the element is a subclass of this link, so that each link IS the element.

Never reference TIntrusiveLinkedList outside of the above class/struct inheritance, only ever refer to the struct, e.g: FMyStruct* MyLinkedList = NULL;

FMyStruct* StructLink = new FMyStruct(); StructLink->LinkHead(MyLinkedList);

for (FMyStruct::TIterator It(MyLinkedList); It; It.Next()) { ... }


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