IntrusiveForwardList class is an intrusive linear singly linked list.
More...
#include "estd/IntrusiveForwardList.hpp"
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
class estd::IntrusiveForwardList< T, NodePointer, U >
IntrusiveForwardList class is an intrusive linear singly linked list.
This class tries to provide an interface similar to std::forward_list.
- Template Parameters
-
T | is the type that has the IntrusiveForwardListNode variable |
NodePointer | is a pointer-to-member to IntrusiveForwardListNode variable in T |
U | is the type that will be stored on the list; it can be different from T, but U* must be implicitly convertible to T* (so usually a type derived from T); default - T; using different type than T can be used to break circular dependencies, because T must be fully defined to instantiate this class, but it is enough to forward declare U - it only needs to be fully defined to use member functions |
◆ const_iterator
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
const iterator of elements on the list
◆ const_pointer
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
const pointer to value linked in the list
◆ const_reference
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
const reference to value linked in the list
◆ iterator
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
iterator of elements on the list
◆ pointer
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
pointer to value linked in the list
◆ reference
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
reference to value linked in the list
◆ value_type
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
◆ IntrusiveForwardList()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
◆ before_begin() [1/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- iterator of "one before the first" element on the list
◆ before_begin() [2/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- const iterator of "one before the first" element on the list
◆ begin() [1/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- iterator of first element on the list
◆ begin() [2/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- const iterator of first element on the list
◆ cbefore_begin()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- const iterator of "one before the first" element on the list
◆ cbegin()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- const iterator of first element on the list
◆ cend()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- const iterator of "one past the last" element on the list
◆ clear()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
Unlinks all elements from the list.
◆ empty()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- true is the list is empty, false otherwise
◆ end() [1/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- iterator of "one past the last" element on the list
◆ end() [2/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- const iterator of "one past the last" element on the list
◆ erase_after()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
Unlinks the element following position from the list.
- Note
- No instance of the list is needed for this operation.
- Parameters
-
[in] | position | is an iterator preceding the element which will be unlinked from the list |
- Returns
- iterator of the element that was following the element which was unlinked
◆ front() [1/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- reference to first element on the list
◆ front() [2/2]
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
- Returns
- const reference to first element on the list
◆ insert_after()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
Links the element in the list after position.
- Note
- No instance of the list is needed for this operation.
- Parameters
-
[in] | position | is an iterator of the element after which newNode will be linked |
[in] | newElement | is a reference to the element that will be linked in the list |
- Returns
- iterator of newElement
◆ pop_front()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
Unlinks the first element from the list.
◆ push_front()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
Links the element at the beginning of the list.
- Parameters
-
[in] | newElement | is a reference to the element that will be linked in the list |
◆ splice_after()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
Transfers the element from one list to another list after position.
- Note
- No instance of any list is needed for this operation.
- Parameters
-
[in] | position | is an iterator of the element after which spliced element will be linked |
[in] | beforeSplicedElement | is an iterator of the element preceding the one which will be spliced from one list to another |
◆ swap()
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
Swaps contents with another list.
- Parameters
-
◆ intrusiveForwardListBase_
template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
internal IntrusiveForwardListBase object
The documentation for this class was generated from the following file: