[#BloombergLP-bslalg-BidirectionalLink]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::BidirectionalLink
:relfileprefix: ../../
:mrdocs:

A node in a doubly&hyphen;linked (bidirectional) list&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;bidirectionallink&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class BidirectionalLink;
----

== Description

This POD&hyphen;like `class` describes a node suitable for use in a doubly&hyphen; linked (bidirectional) list, holding the addresses of the preceding and succeeding nodes, either or both of which may be 0&period; This class is &quot;POD&hyphen;like&quot; to facilitate efficient allocation and use in the context of a container implementations&period; In order to meet the essential requirements of a POD type, this `class` does not declare a constructor or destructor&period; However its data members are private&period; It satisfies the requirements of a _trivial_ type and a _standard_ _layout_ type defined by the C&plus;&plus;11 standard&period; Note that this type does not contain any &quot;payload&quot; member data&colon; Clients creating a doubly&hyphen;linked list of data must define an appropriate node type that incorporates `BidirectionalLink` (generally via inheritance), and that holds the &quot;value&quot; of any data stored in that node&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/BidirectionalLink/nextLink.adoc[`nextLink`] 
| Return the address of the next node linked from this node&period;
| xref:BloombergLP/bslalg/BidirectionalLink/previousLink.adoc[`previousLink`] 
| Return the address of the preceding node linked from this node&period;
| xref:BloombergLP/bslalg/BidirectionalLink/reset.adoc[`reset`] 
| Set the `nextLink` and `previousLink` attributes of this value to 0&period;
| xref:BloombergLP/bslalg/BidirectionalLink/setNextLink.adoc[`setNextLink`] 
| Set the successor of this node to be the specified `next` link&period;
| xref:BloombergLP/bslalg/BidirectionalLink/setPreviousLink.adoc[`setPreviousLink`] 
| Set the predecessor of this node to be the specified `previous` link&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/BidirectionalNode.adoc[`BidirectionalNode`] 
| POD&hyphen;like node holding a `VALUE` in a doubly&hyphen;linked list&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
