Insert the specified newNode before the specified target node.

Synopsis

Declared in <bslalg_bidirectionallinklistutil.h>

static
void
insertLinkBeforeTarget(
    BidirectionalLink* newNode,
    BidirectionalLink* target);

Description

Insert the specified newNode before the specified target node in the linked list that contains target. If target is 0, then the value of the attributes nextLink and previousLink of newNode is set to 0. After successful execution of this function the values of the previousLink and nextLink attributes of all the links in the list appropriately reflect the operation. The behavior is undefined unless 0 == target‐>previousLink() is true or isWellFormed(target‐>previousLink(), target) is true.

Parameters

Name

Description

newNode

node to insert into the list

target

node before which newNode is inserted, or 0

Created with MrDocs