|
GRPC C++
1.8.0
|
#include <grpc/support/sync.h>Go to the source code of this file.
Data Structures | |
| struct | gpr_avl_node |
| internal node of an AVL tree More... | |
| struct | gpr_avl_vtable |
| vtable for the AVL tree The optional user_data is propagated from the top level gpr_avl_XXX API. More... | |
| struct | gpr_avl |
| "pointer" to an AVL tree - this is a reference counted object - use gpr_avl_ref to add a reference, gpr_avl_unref when done with a reference More... | |
Typedefs | |
| typedef struct gpr_avl_node | gpr_avl_node |
| internal node of an AVL tree More... | |
| typedef struct gpr_avl_vtable | gpr_avl_vtable |
| vtable for the AVL tree The optional user_data is propagated from the top level gpr_avl_XXX API. More... | |
| typedef struct gpr_avl | gpr_avl |
| "pointer" to an AVL tree - this is a reference counted object - use gpr_avl_ref to add a reference, gpr_avl_unref when done with a reference More... | |
Functions | |
| GPRAPI gpr_avl | gpr_avl_create (const gpr_avl_vtable *vtable) |
| Create an immutable AVL tree. More... | |
| GPRAPI gpr_avl | gpr_avl_ref (gpr_avl avl, void *user_data) |
| Add a reference to an existing tree - returns the tree as a convenience. More... | |
| GPRAPI void | gpr_avl_unref (gpr_avl avl, void *user_data) |
| Remove a reference to a tree - destroying it if there are no references left. More... | |
| GPRAPI gpr_avl | gpr_avl_add (gpr_avl avl, void *key, void *value, void *user_data) |
| Return a new tree with (key, value) added to avl. More... | |
| GPRAPI gpr_avl | gpr_avl_remove (gpr_avl avl, void *key, void *user_data) |
| Return a new tree with key deleted implicitly unrefs avl to allow easy chaining. More... | |
| GPRAPI void * | gpr_avl_get (gpr_avl avl, void *key, void *user_data) |
| Lookup key, and return the associated value. More... | |
| GPRAPI int | gpr_avl_maybe_get (gpr_avl avl, void *key, void **value, void *user_data) |
| Return 1 if avl contains key, 0 otherwise; if it has the key, sets *value to its value. More... | |
| GPRAPI int | gpr_avl_is_empty (gpr_avl avl) |
| Return 1 if avl is empty, 0 otherwise. More... | |
"pointer" to an AVL tree - this is a reference counted object - use gpr_avl_ref to add a reference, gpr_avl_unref when done with a reference
| typedef struct gpr_avl_node gpr_avl_node |
internal node of an AVL tree
| typedef struct gpr_avl_vtable gpr_avl_vtable |
vtable for the AVL tree The optional user_data is propagated from the top level gpr_avl_XXX API.
From the same API call, multiple vtable functions may be called multiple times.
Return a new tree with (key, value) added to avl.
implicitly unrefs avl to allow easy chaining. if key exists in avl, the new tree's key entry updated (i.e. a duplicate is not created). The optional user_data will be passed to vtable functions.
| GPRAPI gpr_avl gpr_avl_create | ( | const gpr_avl_vtable * | vtable | ) |
Create an immutable AVL tree.
Lookup key, and return the associated value.
Does not mutate avl. Returns NULL if key is not found. The optional user_data will be passed to vtable functions.
Return 1 if avl contains key, 0 otherwise; if it has the key, sets *value to its value.
THe optional user_data will be passed to vtable functions.
Add a reference to an existing tree - returns the tree as a convenience.
The optional user_data will be passed to vtable functions.
Return a new tree with key deleted implicitly unrefs avl to allow easy chaining.
The optional user_data will be passed to vtable functions.
1.8.6