125 int (*comp)(
void *,
void *),
126 unsigned int size_of_value,
127 unsigned int size_of_key);
int bpt_item_del(bpt_t *btree, void *key)
Remove item from B+ tree Function searches key in B+ tree and removes the item from it...
int bpt_list_item_next(bpt_t *tree, bpt_list_item_t *item)
Get next item from list Function sets the iteration structure to next item in the list...
void * bpt_search_or_insert(bpt_t *btree, void *key)
Insert or find item in B+ tree Function tries to find key in the tree. If the key is found...
void bpt_list_clean(bpt_list_item_t *item)
Destroy b+ tree Function deallocates the iteration structure.
unsigned long int bpt_item_cnt(bpt_t *btree)
Items count in B+ tree Function returns count of item in B+ tree. (Getter of btree->count_of_values) ...
int bpt_list_start(bpt_t *tree, bpt_list_item_t *item)
Reset iteration Function reset the iteration structure to point to the first item in the sorted list...
bpt_list_item_t * bpt_list_init(bpt_t *btree)
Initialization of iteration structure. Function allocates structure used for iteration.
Structure - B+ tree - main structure Structure used to keep informations about tree.
int(* compare)(void *, void *)
struct bpt_list_item_t bpt_list_item_t
Structure - B+ tree - list item structure Structure used to create list of items. ...
void * bpt_search(bpt_t *btree, void *key)
Search item in B+ tree Function find item in the tree and returns it's value. If the key is not in th...
unsigned long int count_of_values
Structure - B+ tree - node structure Structure used to keep information about node and pointer to inn...
unsigned int index_of_value
bpt_t * bpt_init(unsigned int size_of_btree_node, int(*comp)(void *, void *), unsigned int size_of_value, unsigned int size_of_key)
Initialization of B+ tree Function creates main structure of the B+ tree.
Structure - B+ tree - list item structure Structure used to create list of items. ...
void * bpt_insert(bpt_t *btree, void *key)
Insert item to B+ tree Function inserts key to the tree and allocates and zeroes space for value...
int bpt_list_item_del(bpt_t *btree, bpt_list_item_t *delete_item)
Remove item Function removes actual item in the iteration structure and sets iteration to next item i...
struct bpt_t bpt_t
Structure - B+ tree - main structure Structure used to keep informations about tree.
void bpt_clean(bpt_t *btree)
Destroy B+ tree Function removes all the keys, values and nodes in the tree. The main structure is th...
unsigned char state_extend