Major update: obiarrays with columns containing indices referring to
character strings.
This commit is contained in:
@ -53,13 +53,13 @@ typedef struct OBIDMS_column_header {
|
||||
* - `false` on big endian platforms
|
||||
* @see obi_is_little_endian()
|
||||
*/
|
||||
int header_size; /**< Size of the header in bytes.
|
||||
size_t header_size; /**< Size of the header in bytes.
|
||||
*/
|
||||
size_t line_count; /**< Number of lines of data allocated.
|
||||
index_t line_count; /**< Number of lines of data allocated.
|
||||
*/
|
||||
size_t lines_used; /**< Number of lines of data used.
|
||||
index_t lines_used; /**< Number of lines of data used.
|
||||
*/
|
||||
size_t nb_elements_per_line; /**< Number of elements per line (default: 1).
|
||||
index_t nb_elements_per_line; /**< Number of elements per line (default: 1).
|
||||
*/
|
||||
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).
|
||||
@ -149,7 +149,7 @@ obiversion_t obi_column_get_latest_version_from_name(OBIDMS_p dms, const char* c
|
||||
* The header size is defined as a multiple of the memory page size.
|
||||
* As of now the header size is defined as one time the page size.
|
||||
*
|
||||
* @returns a `size_t` value corresponding to the header size in bytes.
|
||||
* @returns The header size in bytes.
|
||||
*
|
||||
* @since May 2015
|
||||
* @author Eric Coissac (eric.coissac@metabarcoding.org)
|
||||
@ -161,6 +161,7 @@ size_t obi_get_platform_header_size();
|
||||
* @brief Creates a column.
|
||||
*
|
||||
* The minimum data size allocated is one memory page, and the data is initialized to the NA value of the OBIType.
|
||||
* If there is an array associated with the column, it is opened or created if it does not already exist.
|
||||
*
|
||||
* @warning If there is one element per line, elements_names should be equal to column_name. // TODO change this condition?
|
||||
*
|
||||
@ -170,6 +171,7 @@ size_t obi_get_platform_header_size();
|
||||
* @param nb_lines The number of lines to be stored.
|
||||
* @param nb_elements_per_line The number of elements per line.
|
||||
* @param elements_names The names of the elements with ';' as separator.
|
||||
* @param array_name The name of the array if there is one associated with the column.
|
||||
*
|
||||
* @returns A pointer on the newly created column structure.
|
||||
* @retval NULL if an error occurred.
|
||||
@ -180,8 +182,8 @@ size_t obi_get_platform_header_size();
|
||||
OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
const char* column_name,
|
||||
OBIType_t data_type,
|
||||
size_t nb_lines,
|
||||
size_t nb_elements_per_line,
|
||||
index_t nb_lines,
|
||||
index_t nb_elements_per_line,
|
||||
const char* elements_names,
|
||||
const char* array_name);
|
||||
|
||||
@ -287,7 +289,7 @@ int obi_truncate_and_close_column(OBIDMS_column_p column);
|
||||
* @since August 2015
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
void obi_ini_to_NA_values(OBIDMS_column_p column, size_t first_line_nb, size_t nb_lines); // TO make private?
|
||||
void obi_ini_to_NA_values(OBIDMS_column_p column, index_t first_line_nb, index_t nb_lines); // TO make private?
|
||||
|
||||
|
||||
/**
|
||||
@ -333,7 +335,7 @@ int obi_unmap_header(OBIDMS_column_header_p header);
|
||||
* @since July 2015
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
size_t obi_column_get_element_index_from_name(OBIDMS_column_p column, const char* element_name);
|
||||
index_t obi_column_get_element_index_from_name(OBIDMS_column_p column, const char* element_name);
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user