Logo Search packages:      
Sourcecode: sofia-sip version File versions

rbtree.h File Reference


Detailed Description

Defined when <sofia-sip/rbtree.h> has been included.

Red-black tree.

This file contain a red-black-tree template for C. The red-black-tree is a balanced binary tree containing structures as nodes.

The prototypes for red-black-tree functions are declared with macro RBTREE_PROTOS(). The implementation is instantiated with macro RBTREE_BODIES().

When a entry with new identical key is added to the tree, it can be either inserted (replacing other node with same key value) or appended.

Example code can be found from <rbtree_test.c>.

Author:
Pekka Pessi <Pekka.Pessi@nokia.com>.
Date:
Created: Tue Sep 7 19:45:11 EEST 2004 ppessi

Definition in file rbtree.h.

Go to the source code of this file.

Defines

#define RBTREE_APPEND(SCOPE, prefix, Type, left, right, parent,IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR, CMP, REMOVE, INSERT)
#define RBTREE_BALANCE_DELETE(prefix, Type, left, right, parent, IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR)
#define RBTREE_BALANCE_INSERT(prefix, Type, left, right, parent, IS_RED, SET_RED, IS_BLACK, SET_BLACK)
#define RBTREE_BALANCE_INSERT1(prefix, Type, left, right, parent, IS_RED, SET_RED, IS_BLACK, SET_BLACK)
#define RBTREE_BODIES(SCOPE, prefix, Type,left, right, parent,IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR, CMP, INSERT, REMOVE)
#define RBTREE_FIRST(SCOPE, prefix, Type, left, right, parent)
#define RBTREE_HEIGHT(SCOPE, prefix, Type, getleft, getright, getparent)
#define RBTREE_INSERT(SCOPE, prefix, Type, left, right, parent,IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR, CMP, REMOVE, INSERT)
#define RBTREE_LAST(SCOPE, prefix, Type, left, right, parent)
#define RBTREE_LEFT_ROTATE(prefix, Type, left, right, parent)
#define RBTREE_PREC(SCOPE, prefix, Type, left, right, parent)
#define RBTREE_PROTOS(SCOPE, prefix, Type)
#define RBTREE_REMOVE(SCOPE, prefix, Type, left, right, parent,IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR, REMOVE, INSERT)
#define RBTREE_RIGHT_ROTATE(prefix, Type, left, right, parent)
#define RBTREE_SUCC(SCOPE, prefix, Type, left, right, parent)


Generated by  Doxygen 1.6.0   Back to index