Double linked list with pointer class. More...
Public Member Functions | |
LinkedListPointer () noexcept | |
Initializer for a LinkedListPointer. | |
LinkedListPointer (void *pData) noexcept | |
Initializer for a LinkedListPointer with default data. | |
LinkedListPointer * | get_next (void) const noexcept |
Get the next pointer in the list. | |
LinkedListPointer * | get_previous (void) const noexcept |
Get the previous pointer in the list. | |
void * | get_data (void) const noexcept |
Get the pointer stored in this node. | |
void | set_data (void *pInput) noexcept |
Set the pointer to store in this node. | |
Public Member Functions inherited from Burger::DoubleLinkedList | |
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 LinkedListPointer * | New (void *pInput=nullptr) noexcept |
Create a new LinkedListPointer instance. | |
Static Public Member Functions inherited from Burger::DoubleLinkedList | |
static DoubleLinkedList * | New (void) noexcept |
Create a new DoubleLinkedList instance. | |
Private Member Functions | |
LinkedListPointer (const LinkedListPointer &)=delete | |
LinkedListPointer & | operator= (const LinkedListPointer &)=delete |
LinkedListPointer (LinkedListPointer &&)=delete | |
LinkedListPointer & | operator= (LinkedListPointer &&)=delete |
Private Attributes | |
void * | m_pData |
Pointer to the data. | |
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. | |
Double linked list with pointer class.
This derived class from DoubleLinkedList adds an application supplied pointer so the linked list objects point to parent data. It's intended to be a simple extension to a linked list class.
If more robustness is needed, consider using LinkedListObjects instead
|
privatedelete |
|
privatedelete |
|
inlinenoexcept |
Initializer for a LinkedListPointer.
Set the links to point to itself. The object is not attached to another list. The data is set to nullptr.
|
inlinenoexcept |
Initializer for a LinkedListPointer with default data.
Set the links to point to itself. The object is not attached to another list. The data is set to to the input value.
pData | Pointer to initialize the pointer with. |
|
inlinenoexcept |
Get the pointer stored in this node.
Return the pointer stored in this node.
|
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
|
staticnoexcept |
Create a new LinkedListPointer instance.
Allocate memory using Burger::Alloc() and initialize a LinkedListPointer with it.
|
privatedelete |
|
privatedelete |
|
inlinenoexcept |
Set the pointer to store in this node.
Change the pointer stored in this node with the new pointer. The previous pointer is discarded.
pInput | Pointer to store in this node. |
|
private |
Pointer to the data.