BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslalg::BidirectionalLink Class Reference

#include <bslalg_bidirectionallink.h>

Inheritance diagram for bslalg::BidirectionalLink:
bslalg::BidirectionalNode< VALUE >

Detailed Description

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
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.

See bslalg_bidirectionallink

Public Member Functions

 BidirectionalLink ()=default
 
 BidirectionalLink (const BidirectionalLink &original)=default
 
 ~BidirectionalLink ()=default
 
BidirectionalLinkoperator= (const BidirectionalLink &rhs)=default
 
void setNextLink (BidirectionalLink *next)
 
void setPreviousLink (BidirectionalLink *previous)
 
void reset ()
 
BidirectionalLinknextLink () const
 
BidirectionalLinkpreviousLink () const
 

Constructor & Destructor Documentation

◆ BidirectionalLink() [1/2]

bslalg::BidirectionalLink::BidirectionalLink ( )
default

◆ BidirectionalLink() [2/2]

bslalg::BidirectionalLink::BidirectionalLink ( const BidirectionalLink original)
default

◆ ~BidirectionalLink()

bslalg::BidirectionalLink::~BidirectionalLink ( )
default

Member Function Documentation

◆ nextLink()

BidirectionalLink * bslalg::BidirectionalLink::nextLink ( ) const
inline

Return the address of the next node linked from this node.

◆ operator=()

BidirectionalLink & bslalg::BidirectionalLink::operator= ( const BidirectionalLink rhs)
default

◆ previousLink()

BidirectionalLink * bslalg::BidirectionalLink::previousLink ( ) const
inline

Return the address of the preceding node linked from this node.

◆ reset()

void bslalg::BidirectionalLink::reset ( )
inline

Set the nextLink and previousLink attributes of this value to 0.

◆ setNextLink()

void bslalg::BidirectionalLink::setNextLink ( BidirectionalLink next)
inline

Set the successor of this node to be the specified next link.

◆ setPreviousLink()

void bslalg::BidirectionalLink::setPreviousLink ( BidirectionalLink previous)
inline

Set the predecessor of this node to be the specified prev link.


The documentation for this class was generated from the following file: