Major update: obiarrays with columns containing indices referring to
character strings.
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
/****************************************************************************
|
||||
* OBIDMS_column_idx header file *
|
||||
* OBIDMS_column_str header file *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file obidsmcolumn_idx.h
|
||||
* @file obidsmcolumn_str.h
|
||||
* @author Celine Mercier
|
||||
* @date August 10th 2015
|
||||
* @brief Header file for the functions handling OBIColumns containing data with the OBIType OBI_IDX.
|
||||
* @date October 28th 2015
|
||||
* @brief Header file for the functions handling OBIColumns containing data in the form of indices referring to character strings.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef OBIDMSCOLUMN_IDX_H_
|
||||
#define OBIDMSCOLUMN_IDX_H_
|
||||
#ifndef OBIDMSCOLUMN_STR_H_
|
||||
#define OBIDMSCOLUMN_STR_H_
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -22,7 +22,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets a value in an OBIDMS column containing data with the type OBI_IDX, using the index of the element in the line.
|
||||
* @brief Sets a value in an OBIDMS column containing data in the form of indices referring
|
||||
* to character strings in an obiarray, using the index of the element in the line.
|
||||
*
|
||||
* @warning Pointers returned by obi_open_column() don't allow writing.
|
||||
*
|
||||
@ -35,66 +36,65 @@
|
||||
* @retval 0 on success.
|
||||
* @retval -1 if an error occurred.
|
||||
*
|
||||
* @since July 2015
|
||||
* @since October 2015
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
int obi_column_set_obiidx_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx, void* value);
|
||||
int obi_column_set_obistr_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, char* value);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_IDX.
|
||||
* @brief Recovers a value in an OBIDMS column containing data in the form of indices referring
|
||||
* to character strings in an obiarray, using the index of the element in the line.
|
||||
*
|
||||
* @param column A pointer as returned by obi_create_column().
|
||||
* @param line_nb The number of the line where the value should be recovered.
|
||||
* @param element_idx The index of the element that should be recovered in the line.
|
||||
*
|
||||
* @returns The recovered value.
|
||||
* @retval OBIBool_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
* @retval '\0' the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since July 2015
|
||||
* @since October 2015
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
const char* obi_column_get_obiidx_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx);
|
||||
const char* obi_column_get_obistr_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets a value in an OBIDMS column containing data with the type OBI_IDX,
|
||||
* using the name of the element in the line.
|
||||
* @brief Sets a value in an OBIDMS column containing data in the form of indices referring
|
||||
* to character strings in an obiarray, using the name of the element in the line.
|
||||
*
|
||||
* @warning Pointers returned by obi_open_column() don't allow writing.
|
||||
*
|
||||
* @param column A pointer as returned by obi_create_column() or obi_clone_column().
|
||||
* @param line_nb The number of the line where the value should be set.
|
||||
* @param element_name The name of the element that should be set in the line.
|
||||
* If empty, it is checked that there is only one element per line.
|
||||
* @param value The value that should be set.
|
||||
*
|
||||
* @returns An integer value indicating the success of the operation.
|
||||
* @retval 0 on success.
|
||||
* @retval -1 if an error occurred.
|
||||
*
|
||||
* @since August 2015
|
||||
* @since October 2015
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
int obi_column_set_obiidx_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name, void* value);
|
||||
int obi_column_set_obistr_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name, char* value);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_IDX,
|
||||
* using the name of the element in the line.
|
||||
* @brief Recovers a value in an OBIDMS column containing data in the form of indices referring
|
||||
* to character strings in an obiarray, using the name of the element in the line.
|
||||
*
|
||||
* @param column A pointer as returned by obi_create_column() or obi_clone_column().
|
||||
* @param line_nb The number of the line where the value should be recovered.
|
||||
* @param element_name The name of the element that should be recovered in the line.
|
||||
* If empty, it is checked that there is only one element per line.
|
||||
*
|
||||
* @returns The recovered value.
|
||||
* @retval OBIBool_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
* @retval '\0' the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since August 2015
|
||||
* @since October 2015
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
const char* obi_column_get_obiidx_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name);
|
||||
const char* obi_column_get_obistr_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name);
|
||||
|
||||
|
||||
#endif /* OBIDMSCOLUMN_IDX_H_ */
|
||||
|
Reference in New Issue
Block a user