Blender  V2.93
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_insert (DLRBT_Tree *tree, DLRBT_Node *node)
 

Typedef Documentation

◆ DLRBT_Comparator_FP

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

Definition at line 80 of file BLI_dlrbTree.h.

◆ DLRBT_NAlloc_FP

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

Definition at line 85 of file BLI_dlrbTree.h.

◆ DLRBT_Node

typedef struct DLRBT_Node DLRBT_Node

◆ DLRBT_NUpdate_FP

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

Definition at line 92 of file BLI_dlrbTree.h.

◆ DLRBT_Tree

typedef struct DLRBT_Tree DLRBT_Tree

◆ eDLRBT_Colors

Enumeration Type Documentation

◆ eDLRBT_Colors

Enumerator
DLRBT_BLACK 
DLRBT_RED 

Definition at line 56 of file BLI_dlrbTree.h.

Function Documentation

◆ BLI_dlrbTree_add()

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 
)

◆ BLI_dlrbTree_contains()

short BLI_dlrbTree_contains ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)

Definition at line 287 of file DLRB_tree.c.

References BLI_dlrbTree_search_exact(), NULL, and tree.

◆ BLI_dlrbTree_free()

void BLI_dlrbTree_free ( DLRBT_Tree tree)

◆ BLI_dlrbTree_init()

void BLI_dlrbTree_init ( DLRBT_Tree tree)

◆ BLI_dlrbTree_insert()

void BLI_dlrbTree_insert ( DLRBT_Tree tree,
DLRBT_Node node 
)

Definition at line 526 of file DLRB_tree.c.

References DLRBT_RED, insert_check_1(), node, NULL, and tree.

◆ BLI_dlrbTree_linkedlist_sync()

void BLI_dlrbTree_linkedlist_sync ( DLRBT_Tree tree)

Definition at line 113 of file DLRB_tree.c.

References linkedlist_sync_add_node(), NULL, and tree.

Referenced by update_keyblocks().

◆ BLI_dlrbTree_new()

DLRBT_Tree* BLI_dlrbTree_new ( void  )

Definition at line 33 of file DLRB_tree.c.

References MEM_callocN.

◆ BLI_dlrbTree_search()

DLRBT_Node* BLI_dlrbTree_search ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)

Definition at line 131 of file DLRB_tree.c.

References if(), node, NULL, and tree.

Referenced by BLI_dlrbTree_add(), BLI_dlrbTree_search_next(), and BLI_dlrbTree_search_prev().

◆ BLI_dlrbTree_search_exact()

DLRBT_Node* BLI_dlrbTree_search_exact ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)

◆ BLI_dlrbTree_search_next()

DLRBT_Node* BLI_dlrbTree_search_next ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)

◆ BLI_dlrbTree_search_prev()

DLRBT_Node* BLI_dlrbTree_search_prev ( DLRBT_Tree tree,
DLRBT_Comparator_FP  cmp_cb,
void *  search_data 
)