FlatFile.h
Go to the documentation of this file.
1 /******************************************************************************/
35 /******************************************************************************/
36 
37 #if !defined(PROJECT_FLATFILE_H)
38 #define PROJECT_FLATFILE_H
39 
40 #include "Dictionary.h"
41 #include "../key_value/kv_system.h"
42 #include "../dictionary/flat_file/flat_file_dictionary_handler.h"
43 
44 template<typename K, typename V>
45 class FlatFile:public Dictionary<K, V> {
46 public:
69  ion_dictionary_size_t dictionary_size
70 ) {
71  ffdict_init(&this->handler);
72 
73  this->initializeDictionary(id, key_type, key_size, value_size, dictionary_size);
74 }
75 };
76 
77 #endif /* PROJECT_FLATFILE_H */
ion_key_type_t key_type
Definition: Dictionary.h:53
enum ION_KEY_TYPE ion_key_type_t
This is the available key types for ION_DB. All types will be based on system defines.
int ion_value_size_t
The size (length) of a dictionary value in bytes.
Definition: kv_system.h:256
FlatFile(ion_dictionary_id_t id, ion_key_type_t key_type, ion_key_size_t key_size, ion_value_size_t value_size, ion_dictionary_size_t dictionary_size)
Registers a specific flat file dictionary instance.
Definition: FlatFile.h:64
ion_value_size_t value_size
Definition: Dictionary.h:55
unsigned int ion_dictionary_id_t
A type used to identify dictionaries, specifically in the master table.
unsigned int ion_dictionary_size_t
The implementation specific size of the dictionary.
Definition: kv_system.h:264
void ffdict_init(ion_dictionary_handler_t *handler)
Given the handler instance, bind the appropriate flat file functions.
ion_key_size_t key_size
Definition: Dictionary.h:54
ion_dictionary_handler_t handler
Definition: Dictionary.h:51
Interface describing how user interacts with general dictionaries using C++.
int ion_key_size_t
The size (length) of a dictionary key in bytes.
Definition: kv_system.h:251
ion_err_t initializeDictionary(ion_dictionary_id_t dict_id, ion_key_type_t k_type, ion_key_size_t k_size, ion_value_size_t v_size, ion_dictionary_size_t dictionary_size)
Creates a dictionary with a specific identifier (for use through the master table).
Definition: Dictionary.h:84