Added functions to recover the indexes themselves from any column
referring to indexed values
This commit is contained in:
@@ -64,5 +64,38 @@ int obi_column_set_index(OBIDMS_column_p column, index_t line_nb, index_t value)
|
||||
index_t obi_column_get_index(OBIDMS_column_p column, index_t line_nb);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_IDX.
|
||||
*
|
||||
* @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 OBIIdx_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since November 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
index_t obi_column_get_index_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_IDX,
|
||||
* 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.
|
||||
*
|
||||
* @returns The recovered value.
|
||||
* @retval OBIIdx_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since November 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
index_t obi_column_get_index_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