RTEMS CPU Kit with SuperCore  4.10.99.0
Data Fields
RBTree_Control Struct Reference

This is used to manage a RBT. More...

#include <rbtree.h>

Collaboration diagram for RBTree_Control:
Collaboration graph
[legend]

Data Fields

RBTree_Nodepermanent_null
 This points to a NULL.
RBTree_Noderoot
 This points to the root node of the RBT.
RBTree_Nodefirst [2]
 This points to the min and max nodes of this RBT.
RBTree_Compare_function compare_function
 Comparison function pointer.
bool is_unique
 Determines whether the tree accepts duplicate keys.

Detailed Description

This is used to manage a RBT.

A rbtree consists of a tree of zero or more nodes.

Note:
This implementation does not require special checks for manipulating the root element of the RBT. To accomplish this the RBTree_Control structure can be overlaid with a RBTree_Node structure to act as a "dummy root", which has a NULL parent and its left child is the root.

Field Documentation

Comparison function pointer.

Keys to compare have to be found inside to maintain generality. It has to return 1 if first node has higher key than second, -1 if lower, 0 if equal.

Referenced by _RBTree_Initialize_empty().

This points to the min and max nodes of this RBT.

Referenced by _RBTree_First(), _RBTree_Initialize_empty(), and _RBTree_Get_unprotected().

Determines whether the tree accepts duplicate keys.

Referenced by _RBTree_Initialize_empty(), and _RBTree_Is_unique().

This points to a NULL.

Useful for finding the root.

Referenced by _RBTree_Initialize_empty().

This points to the root node of the RBT.

Referenced by _RBTree_Root(), _RBTree_Is_empty(), _RBTree_Has_only_one_node(), and _RBTree_Initialize_empty().


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