linear_hash_types.h
Go to the documentation of this file.
1 /******************************************************************************/
35 /******************************************************************************/
36 
37 #include <stdio.h>
38 #include "../../key_value/kv_system.h"
39 #include "../dictionary.h"
40 #include "../../file/sd_stdio_c_iface.h"
41 
43 
44 #define linear_hash_end_of_list -1
45 #define linear_hash_record_status_empty 0
46 #define linear_hash_record_status_full 1
47 
48 /* SIMPLE ARRAY_LIST FOR BUCKET MAP */
49 typedef struct {
52 } array_list_t;
53 
54 /* definition of linear hash record, with a type and pointer instance declared for later use */
55 typedef struct {
59 
60 /* buckets */
61 typedef struct {
62  int idx;
66 
67 /* function pointer syntax: return_type (*function_name) (arg_type) */
68 /* linear hash structure definition, with a type and pointer instance declared for later use */
69 typedef struct {
80  FILE *database;
81  FILE *state;
82 
83  /* maps the location of the head of the linked list of buckets corresponding to its index */
85 
86  /* generic cache */
89 
90  /* pointer location of the next record to swap-on-delete*/
93 
94 /* typedef struct { */
95 /* ion_fpos_t next; */
96 /* ion_fpos_t current_bucket_loc; */
97 /* } linear_hash_record_iterator_t; */
unsigned char ion_byte_t
A byte type.
Definition: kv_system.h:232
ion_fpos_t * data
unsigned int ion_dictionary_size_t
The implementation specific size of the dictionary.
Definition: kv_system.h:264
ion_dictionary_size_t dictionary_size
ion_dictionary_parent_t super
This is the super type for all dictionaries.
void * ion_key_t
A dictionary key.
Definition: kv_system.h:241
void * ion_value_t
A dictionary value.
Definition: kv_system.h:246
ion_fpos_t record_total_size
ion_byte_t * linear_hash_record_status_t
long ion_fpos_t
A file position type.
Definition: kv_system.h:237
array_list_t * bucket_map