Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TLinkedListBase< ContainerType, ElementType, IteratorType > Class Template Reference

#include <List.h>

Public Types

typedef IteratorType< ContainerType, ElementType > TIterator
 
typedef IteratorType< ContainerType, const ElementType > TConstIterator
 

Public Member Functions

 TLinkedListBase ()
 
FORCEINLINE void Unlink ()
 
FORCEINLINE void LinkBefore (ContainerType *Before)
 
FORCEINLINE void LinkAfter (ContainerType *After)
 
FORCEINLINE void LinkReplace (ContainerType *Replace)
 
FORCEINLINE void LinkHead (ContainerType *&Head)
 
FORCEINLINE bool IsLinked ()
 
FORCEINLINE ContainerType ** GetPrevLink () const
 
FORCEINLINE ContainerTypeGetNextLink () const
 
FORCEINLINE ContainerTypeNext ()
 

Private Attributes

ContainerTypeNextLink
 
ContainerType ** PrevLink
 

Friends

FORCEINLINE friend TIterator begin (ContainerType &List)
 
FORCEINLINE friend TConstIterator begin (const ContainerType &List)
 
FORCEINLINE friend TIterator end (ContainerType &List)
 
FORCEINLINE friend TConstIterator end (const ContainerType &List)
 

Detailed Description

template<class ContainerType, class ElementType, template< class, class > class IteratorType>
class TLinkedListBase< ContainerType, ElementType, IteratorType >

Base linked list class, used to implement methods shared by intrusive/non-intrusive linked lists

Definition at line 106 of file List.h.

Member Typedef Documentation

◆ TConstIterator

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
typedef IteratorType<ContainerType, const ElementType> TLinkedListBase< ContainerType, ElementType, IteratorType >::TConstIterator

Definition at line 113 of file List.h.

◆ TIterator

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
typedef IteratorType<ContainerType, ElementType> TLinkedListBase< ContainerType, ElementType, IteratorType >::TIterator

Used to iterate over the elements of a linked list.

Definition at line 112 of file List.h.

Constructor & Destructor Documentation

◆ TLinkedListBase()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
TLinkedListBase< ContainerType, ElementType, IteratorType >::TLinkedListBase ( )
inline

Default constructor (empty list)

Definition at line 119 of file List.h.

Member Function Documentation

◆ GetNextLink()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE ContainerType * TLinkedListBase< ContainerType, ElementType, IteratorType >::GetNextLink ( ) const
inline

Definition at line 252 of file List.h.

◆ GetPrevLink()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE ContainerType ** TLinkedListBase< ContainerType, ElementType, IteratorType >::GetPrevLink ( ) const
inline

Definition at line 247 of file List.h.

◆ IsLinked()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE bool TLinkedListBase< ContainerType, ElementType, IteratorType >::IsLinked ( )
inline

Returns whether element is currently linked.

Returns
true if currently linked, false otherwise

Definition at line 242 of file List.h.

◆ LinkAfter()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE void TLinkedListBase< ContainerType, ElementType, IteratorType >::LinkAfter ( ContainerType * After)
inline

Adds this element to the linked list, after the specified element

Parameters
AfterThe link to insert this element after.

Definition at line 171 of file List.h.

◆ LinkBefore()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE void TLinkedListBase< ContainerType, ElementType, IteratorType >::LinkBefore ( ContainerType * Before)
inline

Adds this element to a list, before the given element.

Parameters
BeforeThe link to insert this element before.

Definition at line 151 of file List.h.

◆ LinkHead()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE void TLinkedListBase< ContainerType, ElementType, IteratorType >::LinkHead ( ContainerType *& Head)
inline

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.

If Head already has an element, this functions like LinkBefore.

Parameters
HeadPointer to the head of the linked list - this pointer should be the main reference point for the linked list

Definition at line 224 of file List.h.

◆ LinkReplace()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE void TLinkedListBase< ContainerType, ElementType, IteratorType >::LinkReplace ( ContainerType * Replace)
inline

Adds this element to the linked list, replacing the specified element. This is equivalent to calling LinkBefore(Replace); Replace->Unlink();

Parameters
ReplacePointer to the element to be replaced

Definition at line 191 of file List.h.

◆ Next()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE ContainerType * TLinkedListBase< ContainerType, ElementType, IteratorType >::Next ( )
inline

Definition at line 257 of file List.h.

◆ Unlink()

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE void TLinkedListBase< ContainerType, ElementType, IteratorType >::Unlink ( )
inline

Removes this element from the list in constant time.

This function is safe to call even if the element is not linked.

Definition at line 130 of file List.h.

Friends And Related Symbol Documentation

◆ begin [1/2]

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE friend TConstIterator begin ( const ContainerType & List)
friend

Definition at line 271 of file List.h.

◆ begin [2/2]

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE friend TIterator begin ( ContainerType & List)
friend

Definition at line 270 of file List.h.

◆ end [1/2]

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE friend TConstIterator end ( const ContainerType & List)
friend

Definition at line 273 of file List.h.

◆ end [2/2]

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
FORCEINLINE friend TIterator end ( ContainerType & List)
friend

Definition at line 272 of file List.h.

Member Data Documentation

◆ NextLink

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
ContainerType* TLinkedListBase< ContainerType, ElementType, IteratorType >::NextLink
private

The next link in the linked list

Definition at line 264 of file List.h.

◆ PrevLink

template<class ContainerType , class ElementType , template< class, class > class IteratorType>
ContainerType** TLinkedListBase< ContainerType, ElementType, IteratorType >::PrevLink
private

Pointer to 'NextLink', within the previous link in the linked list

Definition at line 267 of file List.h.


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