Base linked list class, used to implement methods shared by intrusive/non-intrusive linked lists
更多...
|
| FORCEINLINE bool | IsLinked () |
| | Returns whether element is currently linked. 更多...
|
| |
| FORCEINLINE void | LinkAfter (ContainerType *After) |
| | Adds this element to the linked list, after the specified element 更多...
|
| |
| FORCEINLINE void | LinkBefore (ContainerType *Before) |
| | Adds this element to a list, before the given element. 更多...
|
| |
| FORCEINLINE void | LinkHead (ContainerType *&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 (ContainerType *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. 更多...
|
| |
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
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.
- 参数
-
| Head | Pointer to the head of the linked list - this pointer should be the main reference point for the linked list |
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();
- 参数
-
| Replace | Pointer to the element to be replaced |
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.