Blender V2.61 - r43446
Classes | Typedefs | Enumerations | Functions

BLI_dlrbTree.h File Reference

Go to the source code of this file.

Classes

struct  DLRBT_Node
struct  DLRBT_Tree

Typedefs

typedef struct DLRBT_Node DLRBT_Node
typedef enum eDLRBT_Colors eDLRBT_Colors
typedef struct DLRBT_Tree DLRBT_Tree
typedef short(* DLRBT_Comparator_FP )(void *node, void *data)
typedef DLRBT_Node *(* DLRBT_NAlloc_FP )(void *data)
typedef void(* DLRBT_NUpdate_FP )(void *node, void *data)

Enumerations

enum  eDLRBT_Colors { DLRBT_BLACK = 0, DLRBT_RED }

Functions

DLRBT_TreeBLI_dlrbTree_new (void)
void BLI_dlrbTree_init (DLRBT_Tree *tree)
void BLI_dlrbTree_free (DLRBT_Tree *tree)
void BLI_dlrbTree_linkedlist_sync (DLRBT_Tree *tree)
DLRBT_NodeBLI_dlrbTree_search (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
DLRBT_NodeBLI_dlrbTree_search_exact (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
DLRBT_NodeBLI_dlrbTree_search_prev (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
DLRBT_NodeBLI_dlrbTree_search_next (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
short BLI_dlrbTree_contains (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
DLRBT_NodeBLI_dlrbTree_add (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, DLRBT_NAlloc_FP new_cb, DLRBT_NUpdate_FP update_cb, void *data)
void BLI_dlrbTree_remove (DLRBT_Tree *tree, DLRBT_Node *node)
void BLI_dlrbTree_insert (DLRBT_Tree *tree, DLRBT_Node *node)

Detailed Description

Author:
Joshua Leung

Definition in file BLI_dlrbTree.h.


Typedef Documentation

typedef short(* DLRBT_Comparator_FP)(void *node, void *data)

Definition at line 82 of file BLI_dlrbTree.h.

typedef DLRBT_Node*(* DLRBT_NAlloc_FP)(void *data)

Definition at line 87 of file BLI_dlrbTree.h.

typedef struct DLRBT_Node DLRBT_Node
typedef void(* DLRBT_NUpdate_FP)(void *node, void *data)

Definition at line 93 of file BLI_dlrbTree.h.

typedef struct DLRBT_Tree DLRBT_Tree

Enumeration Type Documentation

Enumerator:
DLRBT_BLACK 
DLRBT_RED 

Definition at line 60 of file BLI_dlrbTree.h.


Function Documentation

DLRBT_Node* BLI_dlrbTree_add ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
DLRBT_NAlloc_FP  new_cb,
DLRBT_NUpdate_FP  update_cb,
void *  data 
)
short BLI_dlrbTree_contains ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)

Definition at line 272 of file DLRB_tree.c.

References BLI_dlrbTree_search_exact(), and NULL.

void BLI_dlrbTree_free ( DLRBT_Tree tree)
void BLI_dlrbTree_init ( DLRBT_Tree tree)
void BLI_dlrbTree_insert ( DLRBT_Tree tree,
DLRBT_Node node 
)

Definition at line 491 of file DLRB_tree.c.

References DLRBT_RED, insert_check_1(), NULL, and DLRBT_Node::tree_col.

Referenced by add_bezt_to_keyblocks_list().

void BLI_dlrbTree_linkedlist_sync ( DLRBT_Tree tree)
DLRBT_Tree* BLI_dlrbTree_new ( void  )

Definition at line 40 of file DLRB_tree.c.

References MEM_callocN().

Referenced by fcurve_to_keylist().

void BLI_dlrbTree_remove ( DLRBT_Tree tree,
DLRBT_Node node 
)
DLRBT_Node* BLI_dlrbTree_search ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)
DLRBT_Node* BLI_dlrbTree_search_exact ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)
DLRBT_Node* BLI_dlrbTree_search_next ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)
DLRBT_Node* BLI_dlrbTree_search_prev ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)