Web Analytics Made Easy - Statcounter
Skip to content

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#

See 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#

See 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#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
Protected constructor.
void removeAllReferenceOwners ()
Stops all the reference owners from referencing this reference target.

Public Functions Documentation#

Retrieves the next link in the list.

SBCReferenceListLink * SBCReferenceListLink::getNextLink () const

Returns:

Pointer to the next SBCReferenceListLink, or nullptr if there is no next link.


Retrieves the previous link in the list.

SBCReferenceListLink * SBCReferenceListLink::getPreviousLink () const

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.

SBCReferenceToTarget * SBCReferenceListLink::getReferenceToTarget () const

Returns:

Pointer to the SBCReferenceToTarget object associated with this link.


Protected Attributes Documentation#

Forward pointer to the next link.

SBCReferenceListLinkPointer* SBCReferenceListLink::nextLink;


Backward pointer to the previous link.

SBCReferenceListLinkPointer* SBCReferenceListLink::previousLink;


variable referenceToTarget#

Pointer to the reference to target.

SBCReferenceToTarget* SBCReferenceListLink::referenceToTarget;


Protected Functions Documentation#

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:

  • r Pointer to the reference to target associated with this link.
  • n Pointer to the next link in the list; may be nullptr if there is no next link.
  • p Pointer to the previous link in the list; may be nullptr if there is no previous link.

Detaches the next link from this link.

void SBCReferenceListLink::detachNextLink () 

Removes the forward connection to the next link and clears the backward link of the detached next link.


Detaches the previous link from this link.

void SBCReferenceListLink::detachPreviousLink () 

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.

unsigned int SBCReferenceListLink::getMemoryFootprint () const

Returns:

The total memory used by this link, including the base target footprint and the memory used by its reference and link pointers.


Prints information about this link to standard output.

void SBCReferenceListLink::printLink () const

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.

void SBCReferenceListLink::printList () const

Traverses the list forward, printing each link using printLink.


Sets the next link of this list link.

void SBCReferenceListLink::setNextLink (
    SBCReferenceListLink * referenceListLink
) 

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:

  • link Pointer to the next SBCReferenceListLink; may be nullptr to detach the next link.

Sets the previous link of this list link.

void SBCReferenceListLink::setPreviousLink (
    SBCReferenceListLink * referenceListLink
) 

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:

  • link Pointer to the previous SBCReferenceListLink; may be nullptr to detach the previous link.

Destroys the reference list link.

virtual SBCReferenceListLink::~SBCReferenceListLink () 

Removes all reference owners associated with this link and deallocates the forward and backward link pointers.