Simple double linked list manager. More...
Public Member Functions | |
DoubleLinkedList () noexcept | |
Initializer for a DoubleLinkedList. | |
~DoubleLinkedList () | |
Destructor for a DoubleLinkedList. | |
void | detach (void) noexcept |
Detach this object from any attached linked list. | |
void | insert_after (DoubleLinkedList *pInput) noexcept |
Attach the input object after this one in the list. | |
void | insert_before (DoubleLinkedList *pInput) noexcept |
Attach the input object before this one in the list. | |
DoubleLinkedList * | get_next (void) const noexcept |
Get the next pointer in the list. | |
DoubleLinkedList * | get_previous (void) const noexcept |
Get the previous pointer in the list. | |
Static Public Member Functions | |
static DoubleLinkedList * | New (void) noexcept |
Create a new DoubleLinkedList instance. | |
Private Member Functions | |
DoubleLinkedList (const DoubleLinkedList &)=delete | |
DoubleLinkedList & | operator= (const DoubleLinkedList &)=delete |
DoubleLinkedList (DoubleLinkedList &&)=delete | |
DoubleLinkedList & | operator= (DoubleLinkedList &&)=delete |
Additional Inherited Members | |
Protected Member Functions inherited from Burger::DoubleLinkedList_t | |
void | init (void) noexcept |
Double linked list initialization. | |
void | detach (void) noexcept |
Detach entry from connected list. | |
void | insert_after (DoubleLinkedList_t *pInput) noexcept |
Insert the supplied object after this object. | |
void | insert_before (DoubleLinkedList_t *pInput) noexcept |
Insert the supplied object before this object. | |
Protected Attributes inherited from Burger::DoubleLinkedList_t | |
DoubleLinkedList_t * | m_pNext |
Pointer to the next entry. | |
DoubleLinkedList_t * | m_pPrev |
Pointer to the previous entry. | |
Simple double linked list manager.
Using inlined code, this class handles all the tasks needed to manage a circular doubly linked list. All objects when created point to themselves and can be added and removed to other linked list objects at will.
|
privatedelete |
|
privatedelete |
|
inlinenoexcept |
Initializer for a DoubleLinkedList.
Set the links to point to itself. The object is not attached to another list
|
inline |
Destructor for a DoubleLinkedList.
By calling detach(), this object will remove itself from any other list and then be ready for memory disposal
|
inlinenoexcept |
Detach this object from any attached linked list.
This object will remove itself from any other list and both pointers will point to itself
|
inlinenoexcept |
Get the next pointer in the list.
Return the pointer to the next object in the list. Since the list is circular, it's the caller's responsibility to ensure that the start and end are detected properly
|
inlinenoexcept |
Get the previous pointer in the list.
Return the pointer to the previous object in the list. Since the list is circular, it's the caller's responsibility to ensure that the start and end are detected properly
|
inlinenoexcept |
Attach the input object after this one in the list.
Detach the input object from any linked list and then attach the input object after this one in the current list.
pInput | Pointer to a DoubleLinkedList object to link after this one |
|
inlinenoexcept |
Attach the input object before this one in the list.
Detach the input object from any linked list and then attach the input object before this one in the current list.
pInput | Pointer to a DoubleLinkedList object to link before this one |
|
staticnoexcept |
Create a new DoubleLinkedList instance.
Allocate memory using Burger::Alloc() and initialize a DoubleLinkedList with it.
|
privatedelete |
|
privatedelete |