Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TIntrusiveLinkedList< ElementType > Class Template Reference

#include <List.h>

+ Inheritance diagram for TIntrusiveLinkedList< ElementType >:
+ Collaboration diagram for TIntrusiveLinkedList< ElementType >:

Public Member Functions

 TIntrusiveLinkedList ()
 
- Public Member Functions inherited from TLinkedListBase< ElementType, ElementType, TIntrusiveLinkedListIterator >
 TLinkedListBase ()
 
FORCEINLINE void Unlink ()
 
FORCEINLINE void LinkBefore (ElementType *Before)
 
FORCEINLINE void LinkAfter (ElementType *After)
 
FORCEINLINE void LinkReplace (ElementType *Replace)
 
FORCEINLINE void LinkHead (ElementType *&Head)
 
FORCEINLINE bool IsLinked ()
 
FORCEINLINE ElementType ** GetPrevLink () const
 
FORCEINLINE ElementType * GetNextLink () const
 
FORCEINLINE ElementType * Next ()
 

Private Types

typedef TLinkedListBase< ElementType, ElementType, TIntrusiveLinkedListIteratorSuper
 

Additional Inherited Members

- Public Types inherited from TLinkedListBase< ElementType, ElementType, TIntrusiveLinkedListIterator >
typedef TIntrusiveLinkedListIterator< ElementType, ElementType > TIterator
 
typedef TIntrusiveLinkedListIterator< ElementType, const ElementType > TConstIterator
 

Detailed Description

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()) { ... }

Definition at line 346 of file List.h.

Member Typedef Documentation

◆ Super

template<class ElementType >
typedef TLinkedListBase<ElementType, ElementType, TIntrusiveLinkedListIterator> TIntrusiveLinkedList< ElementType >::Super
private

Definition at line 348 of file List.h.

Constructor & Destructor Documentation

◆ TIntrusiveLinkedList()

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

Default constructor (empty list).

Definition at line 352 of file List.h.


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