An RbTreeAnchor provides the addresses of the first and root nodes of a binary search tree. An RbTreeAnchor is similar to an in‐core simply constrained (value‐semantic) attribute class, except that it does not supply equality‐comparison, copy‐construction, and copy‐assignment operations. Note that a node may not be copied because sentinel returns an address unique to each RbTreeAnchor object.

Synopsis

Declared in <bslalg_rbtreeanchor.h>

class RbTreeAnchor;

Description

This class: * is exception‐neutral * is alias‐safe * is const thread‐safe For terminology see bsldoc_glossary.

Member Functions

Name

Description

RbTreeAnchor [constructor]

Constructors

~RbTreeAnchor [destructor]

Destroy this object.

decrementNumNodes

Decrement, by 1, the numNodes attribute of this object. The behavior is undefined unless 1 <= numNodes.

firstNode

firstNode overloads

incrementNumNodes

Increment, by 1, the numNodes attribute of this object. The behavior is undefined unless numNodes <= INT_MAX ‐ 1.

numNodes

Return the numNodes attribute of this object.

reset

Set the rootNode, firstNode, and numNodes attributes to the specified rootNodeValue, firstNodeValue, and numNodes respectively.

rootNode

rootNode overloads

sentinel

sentinel overloads

setFirstNode

Set the firstNode attribute of this object to the specified value.

setNumNodes

Set the numNodes attribute of this object to the specified value. The behavior is undefined unless 0 <= value.

setRootNode

Set the rootNode attribute of this object to the specified value.

Created with MrDocs