Class SBCReferenceListLink#
ClassList > SBCReferenceListLink
Inherits the following classes: SBCReferenceTarget
Public Functions#
| Type | Name |
|---|---|
| SBCReferenceListLink * | getNextLink () const Retrieves the next link in the list. |
| SBCReferenceListLink * | getPreviousLink () const Retrieves the previous link in the list. |
| SBCReferenceToTarget * | getReferenceToTarget () const Returns the reference to target stored in this link. |
Public Functions inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTarget () Builds the reference target. |
|
| unsigned int | getMemoryFootprint () const Returns the memory footprint. |
| void | printReferencesToOwners () const Prints the references to the owners of this reference target. |
| virtual | ~SBCReferenceTarget () Destructor. |
Protected Attributes#
| Type | Name |
|---|---|
| SBCReferenceListLinkPointer * | nextLink Forward pointer to the next link. |
| SBCReferenceListLinkPointer * | previousLink Backward pointer to the previous link. |
| SBCReferenceToTarget * | referenceToTarget Pointer to the reference to target. |
Protected Attributes inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTargetData * | dataPointer A pointer to the private data. |
Protected Functions#
| Type | Name |
|---|---|
| SBCReferenceListLink (SBCReferenceToTarget * r, SBCReferenceListLink * n=nullptr, SBCReferenceListLink * p=nullptr) Constructs a reference list link. |
|
| void | detachNextLink () Detaches the next link from this link. |
| void | detachPreviousLink () Detaches the previous link from this link. |
| unsigned int | getMemoryFootprint () const Computes the memory footprint of this link. |
| void | printLink () const Prints information about this link to standard output. |
| void | printList () const Prints the list of links starting from this link. |
| void | setNextLink (SBCReferenceListLink * referenceListLink) Sets the next link of this list link. |
| void | setPreviousLink (SBCReferenceListLink * referenceListLink) Sets the previous link of this list link. |
| virtual | ~SBCReferenceListLink () Destroys the reference list link. |
Protected Functions inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTarget (SBCReferenceTargetData * dataPointer) Protected constructor. |
|
| void | removeAllReferenceOwners () Stops all the reference owners from referencing this reference target. |
Public Functions Documentation#
function getNextLink#
Retrieves the next link in the list.
Returns:
Pointer to the next SBCReferenceListLink, or nullptr if there is no next link.
function getPreviousLink#
Retrieves the previous link in the list.
Returns:
Pointer to the previous SBCReferenceListLink, or nullptr if there is no previous link.
function getReferenceToTarget#
Returns the reference to target stored in this link.
Returns:
Pointer to the SBCReferenceToTarget object associated with this link.
Protected Attributes Documentation#
variable nextLink#
Forward pointer to the next link.
variable previousLink#
Backward pointer to the previous link.
variable referenceToTarget#
Pointer to the reference to target.
Protected Functions Documentation#
function SBCReferenceListLink#
Constructs a reference list link.
SBCReferenceListLink::SBCReferenceListLink (
SBCReferenceToTarget * r,
SBCReferenceListLink * n=nullptr,
SBCReferenceListLink * p=nullptr
)
Initializes the link with a reference to a target and optionally connects it to the specified next and previous links.
Parameters:
rPointer to the reference to target associated with this link.nPointer to the next link in the list; may be nullptr if there is no next link.pPointer to the previous link in the list; may be nullptr if there is no previous link.
function detachNextLink#
Detaches the next link from this link.
Removes the forward connection to the next link and clears the backward link of the detached next link.
function detachPreviousLink#
Detaches the previous link from this link.
Removes the backward connection to the previous link and clears the forward link of the detached previous link.
function getMemoryFootprint#
Computes the memory footprint of this link.
Returns:
The total memory used by this link, including the base target footprint and the memory used by its reference and link pointers.
function printLink#
Prints information about this link to standard output.
Includes the address of the link, the associated reference to target, the target it points to, and details of the next and previous links, as well as references to owners of this link.
function printList#
Prints the list of links starting from this link.
Traverses the list forward, printing each link using printLink.
function setNextLink#
Sets the next link of this list link.
Updates the forward pointer to the specified link. If link is nullptr, the next link is cleared. Existing next link is detached if necessary.
Parameters:
linkPointer to the nextSBCReferenceListLink; may be nullptr to detach the next link.
function setPreviousLink#
Sets the previous link of this list link.
Updates the backward pointer to the specified link. If link is nullptr, the previous link is cleared. Existing previous link is detached if necessary.
Parameters:
linkPointer to the previousSBCReferenceListLink; may be nullptr to detach the previous link.
function ~SBCReferenceListLink#
Destroys the reference list link.
Removes all reference owners associated with this link and deallocates the forward and backward link pointers.