|
BDE 4.14.0 Production release
|
#include <bslalg_rbtreeanchor.h>
Public Member Functions | |
| RbTreeAnchor () | |
| RbTreeAnchor (RbTreeNode *rootNode, RbTreeNode *firstNode, int numNodes) | |
| ~RbTreeAnchor () | |
| Destroy this object. | |
| void | reset (RbTreeNode *rootNode, RbTreeNode *firstNode, int numNodes) |
| void | setFirstNode (RbTreeNode *value) |
| void | setRootNode (RbTreeNode *value) |
| void | setNumNodes (int value) |
| void | incrementNumNodes () |
| void | decrementNumNodes () |
| RbTreeNode * | rootNode () |
| RbTreeNode * | firstNode () |
| RbTreeNode * | sentinel () |
| const RbTreeNode * | firstNode () const |
| const RbTreeNode * | rootNode () const |
| const RbTreeNode * | sentinel () const |
Return the address referred to by the sentinel node for this tree. | |
| int | numNodes () const |
Return the numNodes attribute of this object. | |
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.
This class:
const thread-safe For terminology see bsldoc_glossary .
|
inline |
|
inline |
Create a RbTreeAnchor object having the specified rootNode, firstNode, and numNodes attribute values.
|
inline |
|
inline |
Decrement, by 1, the numNodes attribute of this object. The behavior is undefined unless 1 <= numNodes.
|
inline |
Return the address of the (modifiable) node referred to by the firstNode attribute of this object.
|
inline |
Return the address referred to by the firstNode attribute of this object.
|
inline |
Increment, by 1, the numNodes attribute of this object. The behavior is undefined unless numNodes <= INT_MAX - 1.
|
inline |
|
inline |
Set the rootNode, firstNode, and numNodes attributes to the specified rootNodeValue, firstNodeValue, and numNodes respectively.
|
inline |
Return the address of the (modifiable) node referred to by the rootNode attribute of this object.
|
inline |
Return the address referred to by the rootNode attribute of this object.
|
inline |
Return the address of the (modifiable) node referred to by the sentinel node for this tree.
|
inline |
|
inline |
Set the firstNode attribute of this object to the specified value.
|
inline |
Set the numNodes attribute of this object to the specified value. The behavior is undefined unless 0 <= value.
|
inline |
Set the rootNode attribute of this object to the specified value.