FlatFile< K, V > Class Template Reference

#include <FlatFile.h>

Inheritance diagram for FlatFile< K, V >:
Collaboration diagram for FlatFile< K, V >:

Public Member Functions

 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. More...
 
 FlatFile (ion_dictionary_config_info_t config)
 
- Public Member Functions inherited from Dictionary< K, V >
 ~Dictionary ()
 
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). More...
 
ion_status_t insert (K key, V value)
 Insert a value into a dictionary. More...
 
get (K key)
 Retrieve a value given a key. More...
 
ion_status_t deleteRecord (K key)
 Delete a value given a key. More...
 
ion_status_t update (K key, V value)
 Update all records with a given key. More...
 
ion_err_t deleteDictionary ()
 Deletes dictionary. More...
 
ion_err_t destroyDictionary (ion_dictionary_id_t id)
 Destroys dictionary. More...
 
ion_err_t open (ion_dictionary_config_info_t config_info)
 Opens a dictionary, given the desired config. More...
 
ion_err_t close ()
 Closes a dictionary. More...
 
Cursor< K, V > * range (K min_key, K max_key)
 Sets up cursor and predicate to perform a range query on a dictionary. More...
 
Cursor< K, V > * equality (K key)
 Sets up cursor and predicate perform an equality query on a dictionary for a given key. More...
 
Cursor< K, V > * allRecords ()
 Sets up cursor and predicate in order to find all records present in the dictionary. More...
 

Static Public Member Functions

static FlatFile< K, V > * openDictionary (ion_dictionary_config_info_t config_info, K key_type, V value_type)
 

Additional Inherited Members

- Public Attributes inherited from Dictionary< K, V >
ion_dictionary_handler_t handler
 
ion_dictionary_t dict
 
ion_key_type_t key_type
 
ion_key_size_t key_size
 
ion_value_size_t value_size
 
ion_dictionary_size_t dict_size
 
ion_status_t last_status
 

Detailed Description

template<typename K, typename V>
class FlatFile< K, V >

Definition at line 45 of file FlatFile.h.

Constructor & Destructor Documentation

template<typename K, typename V>
FlatFile< K, V >::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 
)
inline

Registers a specific flat file dictionary instance.

Registers functions for dictionary.

Parameters
idA unique identifier important for use of the dictionary through the master table. If the dictionary is being created without the master table, this identifier can be 0.
key_typeThe type of keys to be stored in the dictionary.
key_sizeThe size of keys to be stored in the dictionary.
value_sizeThe size of the values to be stored in the dictionary.
dictionary_sizeThe size desired for the dictionary.

Definition at line 64 of file FlatFile.h.

70  {
71  ffdict_init(&this->handler);
72 
73  this->initializeDictionary(id, key_type, key_size, value_size, dictionary_size);
74 }
ion_key_type_t key_type
Definition: Dictionary.h:54
ion_value_size_t value_size
Definition: Dictionary.h:56
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:55
ion_dictionary_handler_t handler
Definition: Dictionary.h:52
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:85

Here is the call graph for this function:

template<typename K, typename V>
FlatFile< K, V >::FlatFile ( ion_dictionary_config_info_t  config)
inline

Definition at line 76 of file FlatFile.h.

78  {
79  ffdict_init(&this->handler);
80 
81  this->open(config);
82 }
ion_err_t open(ion_dictionary_config_info_t config_info)
Opens a dictionary, given the desired config.
Definition: Dictionary.h:230
void ffdict_init(ion_dictionary_handler_t *handler)
Given the handler instance, bind the appropriate flat file functions.
ion_dictionary_handler_t handler
Definition: Dictionary.h:52

Here is the call graph for this function:

Member Function Documentation

template<typename K, typename V>
static FlatFile<K, V>* FlatFile< K, V >::openDictionary ( ion_dictionary_config_info_t  config_info,
key_type,
value_type 
)
inlinestatic

Definition at line 85 of file FlatFile.h.

89  {
91  UNUSED(value_type);
92 
93  return new FlatFile<K, V>(config_info);
94 }
ion_key_type_t key_type
Definition: Dictionary.h:54
#define UNUSED(x)
Definition: kv_system.h:102

The documentation for this class was generated from the following file: