Major update : views

This commit is contained in:
Celine Mercier
2016-02-18 10:38:51 +01:00
parent cfaf069095
commit a8f03248a8
46 changed files with 3207 additions and 1070 deletions

View File

@ -57,11 +57,7 @@ typedef struct OBIDMS_column_header {
*/
index_t lines_used; /**< Number of lines of data used.
*/
index_t returned_nb_elements_per_line; /**< Number of elements per line returned when getting a
* line from the column.
*/
index_t stored_nb_elements_per_line; /**< Number of elements per line that is actually stored
* in the data part of the column.
index_t nb_elements_per_line; /**< Number of elements per line.
*/
char elements_names[ELEMENTS_NAMES_MAX+1]; /**< Names of the line elements with ';' as separator
* (should be the column name if one element per line).
@ -80,10 +76,6 @@ typedef struct OBIDMS_column_header {
* was cloned from (-1 if it was not created by cloning
* another column).
*/
bool referring; /**< Whether the column contains indices referring to another column.
*/
obiversion_t referred_column_version; /**< Version of the column to which this column is referring.
*/
char name[OBIDMS_COLUMN_MAX_NAME+1]; /**< The column name as a NULL terminated string.
*/
char avl_name[AVL_MAX_NAME+1]; /**< If there is one, the AVL tree name as a NULL terminated string.
@ -108,14 +100,12 @@ typedef struct OBIDMS_column {
*/
OBIDMS_avl_p avl; /**< A pointer to the AVL tree associated with the column if there is one.
*/
struct OBIDMS_column* referred_column; /**< A pointer to the referred column if the column is referring.
*/
void* data; /**< A `void` pointer to the beginning of the data.
*
* @warning Never use this member directly outside of the code of the
* low level functions of the OBIDMS.
*/
bool writable; /**< Indicates if the column is writable or not. TODO delete?
bool writable; /**< Indicates if the column is writable or not.
* - `true` the column is writable
* - `false` the column is read-only
*
@ -186,7 +176,6 @@ size_t obi_get_platform_header_size();
* @param elements_names The names of the elements with ';' as separator.
* @param avl_name The name of the AVL tree if there is one associated with the column.
* @param comments Optional comments associated with the column.
* @param referring
*
* @returns A pointer on the newly created column structure.
* @retval NULL if an error occurred.
@ -201,8 +190,8 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
index_t nb_elements_per_line,
const char* elements_names,
const char* avl_name,
const char* comments,
bool referring);
const char* comments
);
/**
@ -235,7 +224,7 @@ OBIDMS_column_p obi_open_column(OBIDMS_p dms, const char* column_name, obiversio
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
OBIDMS_column_p obi_clone_column(OBIDMS_p dms, const char* column_name, obiversion_t version_number, bool referring, bool clone_data);
OBIDMS_column_p obi_clone_column(OBIDMS_p dms, OBIDMS_column_p line_selection, const char* column_name, obiversion_t version_number, bool clone_data);
/**
@ -372,7 +361,7 @@ index_t obi_column_get_element_index_from_name(OBIDMS_column_p column, const cha
char* obi_column_format_date(time_t date);
int obi_grep_line(OBIDMS_column_p referring_column, index_t line_to_grep);
int obi_select(OBIDMS_column_p lines_column, index_t line_to_grep);