BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::TreeNode< VALUE > Class Template Reference

#include <bslstl_treenode.h>

Inheritance diagram for bslstl::TreeNode< VALUE >:
bslalg::RbTreeNode

Public Member Functions

VALUE & value ()
 
const VALUE & value () const
 
- Public Member Functions inherited from bslalg::RbTreeNode
 RbTreeNode ()=default
 
 RbTreeNode (const RbTreeNode &original)=default
 
 ~RbTreeNode ()=default
 
RbTreeNodeoperator= (const RbTreeNode &rhs)=default
 
void makeBlack ()
 
void makeRed ()
 
void setParent (RbTreeNode *address)
 
void setLeftChild (RbTreeNode *address)
 
void setRightChild (RbTreeNode *address)
 
void setColor (Color value)
 Set the color of this node to the specified value.
 
void toggleColor ()
 
void reset (RbTreeNode *parent, RbTreeNode *leftChild, RbTreeNode *rightChild, Color color)
 
RbTreeNodeparent ()
 
RbTreeNodeleftChild ()
 
RbTreeNoderightChild ()
 
const RbTreeNodeparent () const
 
bool isBlack () const
 Return true if this node is black.
 
bool isRed () const
 Return true if this node is red.
 
const RbTreeNodeleftChild () const
 
const RbTreeNoderightChild () const
 
Color color () const
 Return the color of this node.
 

Additional Inherited Members

- Public Types inherited from bslalg::RbTreeNode
enum  Color { BSLALG_RED = 0 , BSLALG_BLACK = 1 }
 

Detailed Description

template<class VALUE>
class bslstl::TreeNode< VALUE >

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.

See bslstl_treenode

Member Function Documentation

◆ value() [1/2]

template<class VALUE >
VALUE & bslstl::TreeNode< VALUE >::value ( )
inline

Return a reference providing modifiable access to the value of this object.

◆ value() [2/2]

template<class VALUE >
const VALUE & bslstl::TreeNode< VALUE >::value ( ) const
inline

Return a reference providing non-modifiable access to the value of this object.


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