DNA sequences and character strings are now handled using AVL trees.
This commit is contained in:
38
src/obidms.h
38
src/obidms.h
@ -25,14 +25,14 @@
|
||||
#include "obierrno.h"
|
||||
|
||||
|
||||
#define OBIDMS_MAX_NAME (2048) /**< The maximum length of an OBIDMS name.
|
||||
*/
|
||||
#define ARRAYS_DIR_NAME "arrays" /**< The name of the arrays directory.
|
||||
*/
|
||||
#define MAX_NB_OPENED_COLUMNS (100) /**< The maximum number of columns open at the same time.
|
||||
*/
|
||||
#define MAX_NB_OPENED_ARRAYS (100) /**< The maximum number of arrays open at the same time.
|
||||
*/
|
||||
#define OBIDMS_MAX_NAME (2048) /**< The maximum length of an OBIDMS name.
|
||||
*/
|
||||
#define AVL_TREES_DIR_NAME "AVL_trees" /**< The name of the AVL trees directory.
|
||||
*/
|
||||
#define MAX_NB_OPENED_COLUMNS (100) /**< The maximum number of columns open at the same time.
|
||||
*/
|
||||
#define MAX_NB_OPENED_AVL_TREES (100) /**< The maximum number of AVL trees open at the same time.
|
||||
*/
|
||||
|
||||
|
||||
struct OBIDMS_column; // TODO
|
||||
@ -43,12 +43,12 @@ typedef struct Opened_columns_list {
|
||||
} Opened_columns_list_t, *Opened_columns_list_p;
|
||||
|
||||
|
||||
struct OBIDMS_array; // TODO
|
||||
struct OBIDMS_avl; // TODO
|
||||
|
||||
typedef struct Opened_arrays_list {
|
||||
size_t nb_opened_arrays;
|
||||
struct OBIDMS_array** arrays;
|
||||
} Opened_arrays_list_t, *Opened_arrays_list_p;
|
||||
typedef struct Opened_avls_list {
|
||||
size_t nb_opened_avls;
|
||||
struct OBIDMS_avl** avls;
|
||||
} Opened_avls_list_t, *Opened_avls_list_p;
|
||||
|
||||
|
||||
/**
|
||||
@ -67,17 +67,17 @@ typedef struct OBIDMS {
|
||||
int dir_fd; /**< The file descriptor of the directory entry
|
||||
* usable to refer and scan the database directory.
|
||||
*/
|
||||
DIR* array_directory; /**< A directory entry usable to
|
||||
* refer and scan the array directory.
|
||||
DIR* avl_directory; /**< A directory entry usable to
|
||||
* refer and scan the AVL trees directory.
|
||||
*/
|
||||
int array_dir_fd; /**< The file descriptor of the directory entry
|
||||
* usable to refer and scan the array directory.
|
||||
int avl_dir_fd; /**< The file descriptor of the directory entry
|
||||
* usable to refer and scan the AVL trees directory.
|
||||
*/
|
||||
bool little_endian; /**< Endianness of the database.
|
||||
*/
|
||||
Opened_columns_list_p opened_columns; /**< List of opened columns.
|
||||
*/
|
||||
Opened_arrays_list_p opened_arrays; /**< List of opened arrays.
|
||||
Opened_avls_list_p opened_avls; /**< List of opened AVL trees.
|
||||
*/
|
||||
} OBIDMS_t, *OBIDMS_p;
|
||||
|
||||
@ -105,7 +105,7 @@ int obi_dms_exists(const char* dms_name);
|
||||
* if a directory with this name does not already exist
|
||||
* before creating the new database.
|
||||
*
|
||||
* A directory to store obiarrays is also created.
|
||||
* A directory to store AVL trees is also created.
|
||||
*
|
||||
* @param dms_name A pointer to a C string containing the name of the database.
|
||||
* The actual directory name used to store the DMS will be
|
||||
|
Reference in New Issue
Block a user