This POD‐like class describes a node suitable for use in a red‐black binary search tree of values of the parameterized 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.
Synopsis
Declared in <bslstl_treenode.h>
template<class VALUE>
class TreeNode
: public bslalg::RbTreeNode
Base Classes
Name |
Description |
This POD‐like |
Enums
Name |
Description |
Enumeration of the two colors used by red‐black tree nodes. |
Member Functions
Name |
Description |
Return the color of this node. |
|
Return |
|
Return |
|
|
|
Set the color of this node to black. Note that this operation is at least as fast as (and potentially faster than) |
|
Set the color of this node to red. Note that this operation is at least as fast as (and potentially faster than) |
|
|
|
Reset this object to have the specified |
|
|
|
Set the color of this node to the specified |
|
Set the left child of this node to the specified |
|
Set the parent of this node to the specified |
|
Set the right child of this node to the specified |
|
Set the color of this node to the alternative color. If this node's color is red, set it to black, and set it to red otherwise. Note that this operation is at least as fast as (and potentially faster than) |
|
|
Created with MrDocs