Partilhar via


CRBTree Class

This class provides methods for creating and utilizing a Red-Black tree.

template<
   typename K,
   typename V,
   class KTraits = CElementTraits< K >,
   class VTraits = CElementTraits< V >
> class CRBTree

Parameters

  • K
    The key element type.

  • V
    The value element type.

  • KTraits
    The code used to copy or move key elements. See CElementTraits Class for more details.

  • VTraits
    The code used to copy or move value elements.

Remarks

A Red-Black tree is a binary search tree that uses an extra bit of information per node to ensure that it remains "balanced," that is, the tree height doesn't grow disproportionately large and affect performance.

This template class is designed to be used by CRBMap and CRBMultiMap. The bulk of the methods that make up these derived classes are provided by CRBTree.

For a more complete discussion of the various collection classes and their features and performance characteristics, see ATL Collection Classes.

Requirements

Header: atlcoll.h

See Also

Other Resources

CRBTree Members

ATL Class Overview