Files
obitools3/src/obidmscolumn_idx.h

69 lines
2.3 KiB
C
Raw Normal View History

2016-02-18 10:38:51 +01:00
/****************************************************************************
* OBIDMS_column_idx header file *
****************************************************************************/
/**
* @file obidsmcolumn_idx.h
* @author Celine Mercier
* @date February 14th 2016
* @brief Header file for the functions handling OBIColumns containing data with the OBIType OBI_IDX.
*
* Note: OBI_IDX columns contain indices referring to data stored elsewhere
* (for example lines in other columns) and contain only one element (index) per line.
2016-02-18 10:38:51 +01:00
*/
#ifndef OBIDMSCOLUMN_IDX_H_
#define OBIDMSCOLUMN_IDX_H_
#include <stdlib.h>
#include <stdio.h>
#include "obidmscolumn.h"
#include "obitypes.h"
/**
* @brief Sets a value in an OBIDMS column containing data with the type OBI_IDX.
*
* Note: OBI_IDX columns contain indices referring to data stored elsewhere
* (for example lines in other columns) and contain only one element (index) per 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 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 February 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
2016-02-18 10:38:51 +01:00
int obi_column_set_index(OBIDMS_column_p column, index_t line_nb, index_t value);
/**
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_IDX.
*
* Note: OBI_IDX columns contain indices referring to data stored elsewhere
* (for example lines in other columns) and contain only one element (index) per 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.
*
* @returns The recovered value.
* @retval OBIIdx_NA the NA value of the type if an error occurred and obi_errno is set.
*
* @since February 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
2016-02-18 10:38:51 +01:00
index_t obi_column_get_index(OBIDMS_column_p column, index_t line_nb);
#endif /* OBIDMSCOLUMN_IDX_H_ */