Eneboo - Documentación para desarrolladores
Clases | 'defines' | 'typedefs' | Enumeraciones | Funciones
Referencia del Archivo src/libmysql_macosx/include/my_tree.h
#include "my_base.h"

Ir al código fuente de este archivo.

Clases

struct  st_tree_element
struct  st_tree

'defines'

#define MAX_TREE_HEIGHT   64
#define ELEMENT_KEY(tree, element)
#define tree_set_pointer(element, ptr)   *((byte **) (element+1))=((byte*) (ptr))
#define TREE_NO_DUPS   1
#define ELEMENT_CHILD(element, offs)   (*(TREE_ELEMENT**)((char*)element + offs))
#define is_tree_inited(tree)   ((tree)->root != 0)
#define TREE_ELEMENT_EXTRA_SIZE   (sizeof(TREE_ELEMENT) + sizeof(void*))

'typedefs'

typedef uint32 element_count
typedef int(* tree_walk_action )(void *, element_count, void *)
typedef void(* tree_element_free )(void *, TREE_FREE, void *)
typedef struct st_tree_element TREE_ELEMENT
typedef struct st_tree TREE

Enumeraciones

enum  TREE_WALK { left_root_right, right_root_left, left_root_right, right_root_left }
enum  TREE_FREE {
  free_init, free_free, free_end, free_init,
  free_free, free_end
}

Funciones

void init_tree (TREE *tree, uint default_alloc_size, uint memory_limit, int size, qsort_cmp2 compare, my_bool with_delete, tree_element_free free_element, void *custom_arg)
void delete_tree (TREE *)
void reset_tree (TREE *)
TREE_ELEMENTtree_insert (TREE *tree, void *key, uint key_size, void *custom_arg)
void * tree_search (TREE *tree, void *key, void *custom_arg)
int tree_walk (TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit)
int tree_delete (TREE *tree, void *key, void *custom_arg)
void * tree_search_key (TREE *tree, const void *key, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, enum ha_rkey_function flag, 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, void *custom_arg)

Documentación de los 'defines'

#define ELEMENT_CHILD (   element,
  offs 
)    (*(TREE_ELEMENT**)((char*)element + offs))
#define ELEMENT_KEY (   tree,
  element 
)
Valor:
(tree->offset_to_key ? (void*)((byte*) element+tree->offset_to_key) :\
                        *((void**) (element+1)))
#define is_tree_inited (   tree)    ((tree)->root != 0)
#define MAX_TREE_HEIGHT   64
#define TREE_ELEMENT_EXTRA_SIZE   (sizeof(TREE_ELEMENT) + sizeof(void*))
#define TREE_NO_DUPS   1
#define tree_set_pointer (   element,
  ptr 
)    *((byte **) (element+1))=((byte*) (ptr))

Documentación de los 'typedefs'

typedef struct st_tree TREE
typedef struct st_tree_element TREE_ELEMENT
typedef void(* tree_element_free)(void *, TREE_FREE, void *)
typedef int(* tree_walk_action)(void *, element_count, void *)

Documentación de las enumeraciones

enum TREE_FREE
Valores de enumeraciones:
free_init 
free_free 
free_end 
free_init 
free_free 
free_end 
enum TREE_WALK
Valores de enumeraciones:
left_root_right 
right_root_left 
left_root_right 
right_root_left 

Documentación de las funciones

void delete_tree ( TREE )
void init_tree ( TREE tree,
uint  default_alloc_size,
uint  memory_limit,
int  size,
qsort_cmp2  compare,
my_bool  with_delete,
tree_element_free  free_element,
void *  custom_arg 
)
void reset_tree ( TREE )
int tree_delete ( TREE tree,
void *  key,
void *  custom_arg 
)
TREE_ELEMENT* tree_insert ( TREE tree,
void *  key,
uint  key_size,
void *  custom_arg 
)
ha_rows tree_record_pos ( TREE tree,
const void *  key,
enum ha_rkey_function  search_flag,
void *  custom_arg 
)
void* tree_search ( TREE tree,
void *  key,
void *  custom_arg 
)
void* tree_search_edge ( TREE tree,
TREE_ELEMENT **  parents,
TREE_ELEMENT ***  last_pos,
int  child_offs 
)
void* tree_search_key ( TREE tree,
const void *  key,
TREE_ELEMENT **  parents,
TREE_ELEMENT ***  last_pos,
enum ha_rkey_function  flag,
void *  custom_arg 
)
void* tree_search_next ( TREE tree,
TREE_ELEMENT ***  last_pos,
int  l_offs,
int  r_offs 
)
int tree_walk ( TREE tree,
tree_walk_action  action,
void *  argument,
TREE_WALK  visit 
)
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'