GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-77aab223bc
defs/rbtree.h
Go to the documentation of this file.
1 #ifndef GRASS_RBTREEDEFS_H
2 #define GRASS_RBTREEDEFS_H
3 
4 /* tree functions */
5 struct RB_TREE *rbtree_create(rb_compare_fn *, size_t);
6 void rbtree_clear(struct RB_TREE *);
7 void rbtree_destroy(struct RB_TREE *);
8 int rbtree_insert(struct RB_TREE *, void *);
9 int rbtree_remove(struct RB_TREE *, const void *);
10 void *rbtree_find(struct RB_TREE *, const void *);
11 
12 /* tree traversal functions */
13 int rbtree_init_trav(struct RB_TRAV *, struct RB_TREE *);
14 void *rbtree_traverse(struct RB_TRAV *);
15 void *rbtree_traverse_backwd(struct RB_TRAV *trav);
16 void *rbtree_traverse_start(struct RB_TRAV *, const void *);
17 
18 /* debug tree from given node downwards */
19 int rbtree_debug(struct RB_TREE *, struct RB_NODE *);
20 
21 #endif
int rbtree_insert(struct RB_TREE *, void *)
Definition: rbtree.c:73
int rbtree_init_trav(struct RB_TRAV *, struct RB_TREE *)
Definition: rbtree.c:264
int rbtree_debug(struct RB_TREE *, struct RB_NODE *)
Definition: rbtree.c:530
void rbtree_clear(struct RB_TREE *)
Definition: rbtree.c:490
void * rbtree_find(struct RB_TREE *, const void *)
Definition: rbtree.c:243
int rbtree_remove(struct RB_TREE *, const void *)
Definition: rbtree.c:154
void * rbtree_traverse_backwd(struct RB_TRAV *trav)
Definition: rbtree.c:307
void * rbtree_traverse(struct RB_TRAV *)
Definition: rbtree.c:281
void rbtree_destroy(struct RB_TREE *)
Definition: rbtree.c:520
void * rbtree_traverse_start(struct RB_TRAV *, const void *)
Definition: rbtree.c:335
struct RB_TREE * rbtree_create(rb_compare_fn *, size_t)
Definition: rbtree.c:49
int rb_compare_fn(const void *rb_a, const void *rb_b)
Definition: rbtree.h:76
Definition: rbtree.h:78
Definition: rbtree.h:92
Definition: rbtree.h:85