Indexers are now cloned if needed to modify them after they've been
closed. Obligatory indexers' names now follow the same pattern as other indexers (columnname_version). Closes #46 and #49.
This commit is contained in:
33
src/obiavl.h
33
src/obiavl.h
@ -160,7 +160,7 @@ typedef struct OBIDMS_avl {
|
||||
typedef struct OBIDMS_avl_group {
|
||||
OBIDMS_avl_p sub_avls[MAX_NB_OF_AVLS_IN_GROUP]; /**< Array containing the pointers to the AVL trees of the group.
|
||||
*/
|
||||
int current_avl_idx; /**< Index in the sub_avls array of the AVL tree currently being filled.
|
||||
int last_avl_idx; /**< Index in the sub_avls array of the AVL tree currently being filled.
|
||||
*/
|
||||
char name[AVL_MAX_NAME+1]; /**< Base name of the AVL group. The AVL trees in it have names of the form basename_idx.
|
||||
*/
|
||||
@ -290,6 +290,37 @@ OBIDMS_avl_group_p obi_create_avl_group(OBIDMS_p dms, const char* avl_name);
|
||||
OBIDMS_avl_group_p obi_open_avl_group(OBIDMS_p dms, const char* avl_name);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Clones an AVL.
|
||||
*
|
||||
* The tree and the data are both cloned into the new AVL.
|
||||
*
|
||||
* @param avl A pointer on the AVL to clone.
|
||||
* @param new_avl A pointer on the new AVL to fill.
|
||||
*
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
void obi_clone_avl(OBIDMS_avl_p avl, OBIDMS_avl_p new_avl);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Clones an AVL group.
|
||||
*
|
||||
* @warning The AVL group that has be cloned is closed by the function.
|
||||
*
|
||||
* @param avl_group A pointer on the AVL group to clone.
|
||||
* @param new_avl_name The name of the new AVL group.
|
||||
*
|
||||
* @returns A pointer on the new AVL group structure.
|
||||
* @retval NULL if an error occurred.
|
||||
*
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
OBIDMS_avl_group_p obi_clone_avl_group(OBIDMS_avl_group_p avl_group, const char* new_avl_name);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Closes an AVL tree.
|
||||
*
|
||||
|
Reference in New Issue
Block a user