TerraLib 4.1
TeREDBLACK::TeRedBlackNode< T > Class Template Reference

Template class for nodes in a Red-Black tree. More...

#include <TeRedBlackTree.h>

List of all members.

Public Types

typedef T TeRedBlackNodeData
 Export node's data type.

Public Member Functions

 TeRedBlackNode (const TeRBNodeColor &color=TeREDNODE)
 Constructor.
 TeRedBlackNode (T &d, const TeRBNodeColor &color=TeREDNODE)
 Constructor.

Public Attributes

data_
 Node's data.
TeRedBlackNodeleft_
 Pointer to the left sub-tree.
TeRedBlackNoderight_
 Pointer to the right sub-tree.
TeRedBlackNodeparent_
 Pointeir to the father's node.
TeRBNodeColor color_
 Node's color (RED or BLACK).

Detailed Description

template<class T>
class TeREDBLACK::TeRedBlackNode< T >

Template class for nodes in a Red-Black tree.

This class contains the common attributes to a node used by a binary tree. Only used for commom binary trees, if you want a more sophisticated tree, you can continue using the Red-Black Tree framework defined below, it is possible taking care of some default attributes that a node must have to implement (left_, right_, parent_, data_).


Member Typedef Documentation

template<class T >
typedef T TeREDBLACK::TeRedBlackNode< T >::TeRedBlackNodeData

Export node's data type.


Constructor & Destructor Documentation

template<class T >
TeREDBLACK::TeRedBlackNode< T >::TeRedBlackNode ( const TeRBNodeColor color = TeREDNODE) [inline]

Constructor.

template<class T >
TeREDBLACK::TeRedBlackNode< T >::TeRedBlackNode ( T &  d,
const TeRBNodeColor color = TeREDNODE 
) [inline]

Constructor.


Member Data Documentation

Node's color (RED or BLACK).

template<class T >
T TeREDBLACK::TeRedBlackNode< T >::data_

Node's data.

template<class T >
TeRedBlackNode* TeREDBLACK::TeRedBlackNode< T >::left_

Pointer to the left sub-tree.

Pointeir to the father's node.

Pointer to the right sub-tree.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines