GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
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
Definition: rbtree.h:78
void rbtree_clear(struct RB_TREE *)
Definition: rbtree.c:490
void * rbtree_find(struct RB_TREE *, const void *)
Definition: rbtree.c:243
void * rbtree_traverse_start(struct RB_TRAV *, const void *)
Definition: rbtree.c:335
int rbtree_init_trav(struct RB_TRAV *, struct RB_TREE *)
Definition: rbtree.c:264
struct RB_TREE * rbtree_create(rb_compare_fn *, size_t)
Definition: rbtree.c:50
Definition: rbtree.h:93
Definition: rbtree.h:85
int rbtree_insert(struct RB_TREE *, void *)
Definition: rbtree.c:74
int rbtree_debug(struct RB_TREE *, struct RB_NODE *)
Definition: rbtree.c:530
void * rbtree_traverse(struct RB_TRAV *)
Definition: rbtree.c:281
void * rbtree_traverse_backwd(struct RB_TRAV *trav)
Definition: rbtree.c:307
int rb_compare_fn(const void *rb_a, const void *rb_b)
Definition: rbtree.h:76
void rbtree_destroy(struct RB_TREE *)
Definition: rbtree.c:520
int rbtree_remove(struct RB_TREE *, const void *)
Definition: rbtree.c:154