Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Burger::LinkedListPointer Class Reference

Double linked list with pointer class. More...

Inheritance diagram for Burger::LinkedListPointer:
Inheritance graph
[legend]
Collaboration diagram for Burger::LinkedListPointer:
Collaboration graph
[legend]

Public Member Functions

 LinkedListPointer () noexcept
 Initializer for a LinkedListPointer.
 
 LinkedListPointer (void *pData) noexcept
 Initializer for a LinkedListPointer with default data.
 
LinkedListPointerget_next (void) const noexcept
 Get the next pointer in the list.
 
LinkedListPointerget_previous (void) const noexcept
 Get the previous pointer in the list.
 
voidget_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.
 
DoubleLinkedListget_next (void) const noexcept
 Get the next pointer in the list.
 
DoubleLinkedListget_previous (void) const noexcept
 Get the previous pointer in the list.
 

Static Public Member Functions

static LinkedListPointerNew (void *pInput=nullptr) noexcept
 Create a new LinkedListPointer instance.
 
- Static Public Member Functions inherited from Burger::DoubleLinkedList
static DoubleLinkedListNew (void) noexcept
 Create a new DoubleLinkedList instance.
 

Private Member Functions

 LinkedListPointer (const LinkedListPointer &)=delete
 
LinkedListPointeroperator= (const LinkedListPointer &)=delete
 
 LinkedListPointer (LinkedListPointer &&)=delete
 
LinkedListPointeroperator= (LinkedListPointer &&)=delete
 

Private Attributes

voidm_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_tm_pNext
 Pointer to the next entry.
 
DoubleLinkedList_tm_pPrev
 Pointer to the previous entry.
 

Detailed Description

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

See also
LinkedListObjects or DoubleLinkedList

Constructor & Destructor Documentation

◆ LinkedListPointer() [1/4]

Burger::LinkedListPointer::LinkedListPointer ( const LinkedListPointer & )
privatedelete

◆ LinkedListPointer() [2/4]

Burger::LinkedListPointer::LinkedListPointer ( LinkedListPointer && )
privatedelete

◆ LinkedListPointer() [3/4]

Burger::LinkedListPointer::LinkedListPointer ( )
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.

See also
~DoubleLinkedList() or LinkedListPointer(void *)

◆ LinkedListPointer() [4/4]

Burger::LinkedListPointer::LinkedListPointer ( void * pData)
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.

Parameters
pDataPointer to initialize the pointer with.
See also
~DoubleLinkedList() or LinkedListPointer()

Member Function Documentation

◆ get_data()

void * Burger::LinkedListPointer::get_data ( void ) const
inlinenoexcept

Get the pointer stored in this node.


Return the pointer stored in this node.

Returns
Pointer stored in this node.
See also
set_data(void *)

◆ get_next()

const LinkedListPointer * Burger::LinkedListPointer::get_next ( void ) const
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

Returns
Pointer to the next LinkedListPointer object in the chain
See also
get_previous(void) const

◆ get_previous()

const LinkedListPointer * Burger::LinkedListPointer::get_previous ( void ) const
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

Returns
Pointer to the previous LinkedListPointer object in the chain
See also
get_next(void) const

◆ New()

Burger::LinkedListPointer *BURGER_API Burger::LinkedListPointer::New ( void * pInput = nullptr)
staticnoexcept

Create a new LinkedListPointer instance.


Allocate memory using Burger::Alloc() and initialize a LinkedListPointer with it.

Returns
nullptr if out of memory
See also
Delete(const T *)

◆ operator=() [1/2]

LinkedListPointer & Burger::LinkedListPointer::operator= ( const LinkedListPointer & )
privatedelete

◆ operator=() [2/2]

LinkedListPointer & Burger::LinkedListPointer::operator= ( LinkedListPointer && )
privatedelete

◆ set_data()

void Burger::LinkedListPointer::set_data ( void * pInput)
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.

Parameters
pInputPointer to store in this node.
See also
get_data(void) const

Member Data Documentation

◆ m_pData

void* Burger::LinkedListPointer::m_pData
private

Pointer to the data.