#include <stddef.h>
#include <sys/types.h>
#include "my_alloc.h"
#include "my_base.h"
#include "my_inttypes.h"
#include "my_sys.h"
Go to the source code of this file.
|
void | init_tree (TREE *tree, ulong memory_limit, int element_size, qsort2_cmp compare, bool with_delete, tree_element_free free_element, const void *custom_arg) |
|
void | delete_tree (TREE *) |
|
void | reset_tree (TREE *) |
|
TREE_ELEMENT * | tree_insert (TREE *tree, void *key, uint key_size, const void *custom_arg) |
|
void * | tree_search (TREE *tree, void *key, const void *custom_arg) |
|
int | tree_walk (TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit) |
|
int | tree_delete (TREE *tree, void *key, uint key_size, const void *custom_arg) |
|
void * | tree_search_key (TREE *tree, const void *key, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, enum ha_rkey_function flag, const void *custom_arg) |
|
void * | tree_search_edge (TREE *tree, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, int child_offs) |
|
void * | tree_search_next (TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, int r_offs) |
|
ha_rows | tree_record_pos (TREE *tree, const void *key, enum ha_rkey_function search_flag, const void *custom_arg) |
|
◆ ELEMENT_CHILD
#define ELEMENT_CHILD |
( |
|
element, |
|
|
|
offs |
|
) |
| (*(TREE_ELEMENT **)((char *)element + offs)) |
◆ ELEMENT_KEY
#define ELEMENT_KEY |
( |
|
tree, |
|
|
|
element |
|
) |
| |
Value: (tree->offset_to_key ? (
void *)((
uchar *)element + tree->offset_to_key) \
: *((void **)(element + 1)))
unsigned char uchar
Definition: my_inttypes.h:52
◆ is_tree_inited
#define is_tree_inited |
( |
|
tree | ) |
((tree)->root != 0) |
◆ MAX_TREE_HEIGHT
#define MAX_TREE_HEIGHT 64 |
◆ TREE_ELEMENT_EXTRA_SIZE
#define TREE_ELEMENT_EXTRA_SIZE (sizeof(TREE_ELEMENT) + sizeof(void *)) |
◆ TREE_NO_DUPS
◆ tree_set_pointer
#define tree_set_pointer |
( |
|
element, |
|
|
|
ptr |
|
) |
| *((uchar **)(element + 1)) = ((uchar *)(ptr)) |
◆ element_count
◆ tree_element_free
typedef void(* tree_element_free) (void *, TREE_FREE, const void *) |
◆ tree_walk_action
◆ TREE_FREE
Enumerator |
---|
free_init | |
free_free | |
free_end | |
◆ TREE_WALK
Enumerator |
---|
left_root_right | |
right_root_left | |
◆ delete_tree()
void delete_tree |
( |
TREE * |
tree | ) |
|
◆ init_tree()
void init_tree |
( |
TREE * |
tree, |
|
|
ulong |
memory_limit, |
|
|
int |
element_size, |
|
|
qsort2_cmp |
compare, |
|
|
bool |
with_delete, |
|
|
tree_element_free |
free_element, |
|
|
const void * |
custom_arg |
|
) |
| |
◆ reset_tree()
void reset_tree |
( |
TREE * |
tree | ) |
|
◆ tree_delete()
int tree_delete |
( |
TREE * |
tree, |
|
|
void * |
key, |
|
|
uint |
key_size, |
|
|
const void * |
custom_arg |
|
) |
| |
◆ tree_insert()
◆ tree_record_pos()
◆ tree_search()
void * tree_search |
( |
TREE * |
tree, |
|
|
void * |
key, |
|
|
const void * |
custom_arg |
|
) |
| |
◆ tree_search_edge()
◆ tree_search_key()
◆ tree_search_next()
void * tree_search_next |
( |
TREE * |
tree, |
|
|
TREE_ELEMENT *** |
last_pos, |
|
|
int |
l_offs, |
|
|
int |
r_offs |
|
) |
| |
◆ tree_walk()