[#BloombergLP-bslalg-BidirectionalLink] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::BidirectionalLink :relfileprefix: ../../ :mrdocs: This POD‐like `class` describes a node suitable for use in a doubly‐ linked (bidirectional) list, holding the addresses of the preceding and succeeding nodes, either or both of which may be 0. This class is "POD‐like" to facilitate efficient allocation and use in the context of a container implementations. In order to meet the essential requirements of a POD type, this `class` does not declare a constructor or destructor. However its data members are private. It satisfies the requirements of a _trivial_ type and a _standard_ _layout_ type defined by the C++11 standard. Note that this type does not contain any "payload" member data: Clients creating a doubly‐linked list of data must define an appropriate node type that incorporates `BidirectionalLink` (generally via inheritance), and that holds the "value" of any data stored in that node. == Synopsis Declared in `<bslalg_bidirectionallink.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class BidirectionalLink; ---- == 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. | xref:BloombergLP/bslalg/BidirectionalLink/previousLink.adoc[`previousLink`] | Return the address of the preceding node linked from this node. | xref:BloombergLP/bslalg/BidirectionalLink/reset.adoc[`reset`] | Set the `nextLink` and `previousLink` attributes of this value to 0. | xref:BloombergLP/bslalg/BidirectionalLink/setNextLink.adoc[`setNextLink`] | Set the successor of this node to be the specified `next` link. | xref:BloombergLP/bslalg/BidirectionalLink/setPreviousLink.adoc[`setPreviousLink`] | Set the predecessor of this node to be the specified `prev` link. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/BidirectionalNode.adoc[`BidirectionalNode`] | This POD‐like `class` describes a node suitable for use in a doubly‐linked list of values of the template parameter type `VALUE`. This class is a "POD‐like" to facilitate efficient allocation and use in the context of a container implementation. In order to meet the essential requirements of a POD type, this `class` does not define a constructor or destructor. The manipulator, `value`, returns a modifiable reference to `d_value` so that it may be constructed in‐place by the appropriate `bsl::allocator_traits` object. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#