~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_tree.h

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#endif
21
21
 
22
22
#include <drizzled/base.h>              /* get 'enum ha_rkey_function' */
23
 
#include <mysys/my_sys.h>
24
23
 
25
24
/* Worst case tree is half full. This gives use 2^(MAX_TREE_HEIGHT/2) leafs */
26
25
#define MAX_TREE_HEIGHT 64
72
71
#define is_tree_inited(tree) ((tree)->root != 0)
73
72
 
74
73
        /* Functions on leafs */
75
 
TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint32_t key_size,
 
74
TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint32_t key_size, 
76
75
                          void *custom_arg);
77
76
void *tree_search(TREE *tree, void *key, void *custom_arg);
78
77
int tree_walk(TREE *tree,tree_walk_action action,
79
78
              void *argument, TREE_WALK visit);
80
79
int tree_delete(TREE *tree, void *key, uint32_t key_size, void *custom_arg);
81
 
void *tree_search_key(TREE *tree, const void *key,
 
80
void *tree_search_key(TREE *tree, const void *key, 
82
81
                      TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos,
83
82
                      enum ha_rkey_function flag, void *custom_arg);
84
 
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
 
83
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents, 
85
84
                        TREE_ELEMENT ***last_pos, int child_offs);
86
 
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
 
85
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, 
87
86
                       int r_offs);
88
 
ha_rows tree_record_pos(TREE *tree, const void *key,
 
87
ha_rows tree_record_pos(TREE *tree, const void *key, 
89
88
                     enum ha_rkey_function search_flag, void *custom_arg);
90
89
 
91
90
#define TREE_ELEMENT_EXTRA_SIZE (sizeof(TREE_ELEMENT) + sizeof(void*))