Commit 4b7f2d26 by Celine Mercier

Doxygen documentation corrected and completed.

parent 45af8396
/*
* obidebug.h
*
* Created on: June 25th 2015
* Author: Celine Mercier (celine.mercier@metabarcoding.org)
/****************************************************************************
* Header file for the debugging code *
****************************************************************************/
/**
* @file obidebug.h
* @author Celine Mercier (celine.mercier@metabarcoding.org)
* @date 25 June 2015
* @brief Header file for the debugging code.
*/
......@@ -12,7 +16,7 @@
#include <limits.h>
//#ifndef DEBUG_LEVEL
//#ifndef DEBUG_LEVEL // TODO
//#define DEBUG_LEVEL MAXINT
//#endif
......
/*
* obidms.c
*
* @date 23 May 2015
* @Author: coissac
/********************************************************************
* OBIDMS functions *
********************************************************************/
/**
* @file obidms.c
* @author Eric Coissac (eric.coissac@metabarcoding.org)
* @date 23 May 2015
* @brief OBIDMS functions.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......@@ -18,7 +23,7 @@
#include "obidmscolumn.h"
#define DEBUG_LEVEL 0
#define DEBUG_LEVEL 0 // TODO has to be defined somewhere else (cython compil flag?)
/**************************************************************************
......@@ -29,27 +34,22 @@
/**
* Internal function building the directory name from an OBIDMS name.
* Internal function building the OBIDMS directory name from an OBIDMS name.
*
* The function builds the directory name corresponding to an OBIDMS.
* It checks also that the name is not too long.
* It also checks that the name is not too long.
*
* @warning The returned pointer has to be freed by the caller.
*
* @param dms_name the name of the OBIDMS
*
* @return a pointer to the directory name
* @retvalue <directory_name> if everything is ok
* @retvalue NULL if an error occurs
* @param dms_name The name of the OBIDMS.
*
* ###Error values
* - OBIDMS_MEMORY_ERROR : something wrong occurred during memory allocation.
* - OBIDMS_LONG_NAME_ERROR : the database name exceeds the limit.
* @returns A pointer to the directory name.
* @retval NULL if an error occurred.
*
* @since May 2015
* @author Eric Coissac (eric.coissac@metabarcoding.org)
*/
static char *build_directory_name(const char *dms_name);
static char* build_directory_name(const char* dms_name);
/************************************************************************
......@@ -58,9 +58,9 @@ static char *build_directory_name(const char *dms_name);
*
************************************************************************/
static char *build_directory_name(const char *dms_name)
static char* build_directory_name(const char* dms_name)
{
char *directory_name;
char* directory_name;
// Build the database directory name
if (asprintf(&directory_name, "%s.obidms", dms_name) < 0)
......
/*
* obidms.h
*
* Created on: 23 mai 2015
* Author: coissac
/********************************************************************
* OBIDMS header file *
********************************************************************/
/**
* @file obidmscolumn.h
* @author Eric Coissac (eric.coissac@metabarcoding.org)
* @date 23 May 2015
* @brief Header file for the OBIDMS functions and structures.
*/
#ifndef OBIDMS_H_
#define OBIDMS_H_
#include <stdlib.h>
#include <sys/stat.h>
#include <errno.h>
......@@ -17,38 +23,37 @@
#include "obierrno.h"
#define OBIDMS_MAX_NAME (2048) /**< The maximum length of an OBIDMS name
*/
/** @brief A structure describing an OBIDMS instance
/**
* @brief A structure describing an OBIDMS instance
*
* A pointer to this structure is returned on creation
* and opening of an OBITools Data Management System (DMS)
*/
typedef struct OBIDMS {
char directory_name[OBIDMS_MAX_NAME+1]; /**< The name of the directory
* containing the DMS
* containing the DMS.
*/
DIR* directory; /**< A directory entry usable to
* refer and scan the database directory
* refer and scan the database directory.
*/
} OBIDMS_t, *OBIDMS_p;
/*@
* @brief Checks if an OBIDMS exists
/**
* @brief Checks if an OBIDMS exists.
*
* @param dms_name a pointer to a C string containing the name of the database.
* The actual directory name used to store the DMS will be
* `<dms_name>.obidms`.
* @param dms_name A pointer to a C string containing the name of the database.
*
* @return an integer value indicating the status of the database
* @retvalue 1 the database exist
* @retvalue 0 the database does not exist
* @retvalue -1 an error occurred
* @returns An integer value indicating the status of the database
* @retval 1 if the database exists.
* @retval 0 if the database does not exist.
* @retval -1 if an error occurred.
*
* @see obi_close_dms()
* @since May 2015
* @author Eric Coissac (eric.coissac@metabarcoding.org)
*/
......@@ -62,79 +67,62 @@ int obi_dms_exists(const char* dms_name);
* if a directory with this name does not already exist
* before creating the new database.
*
* @param dms_name a pointer to a C string containing the name of the database.
* The actual directory name used to store the DMS will be
* `<name>.obidms`
* @param dms_name A pointer to a C string containing the name of the database.
* The actual directory name used to store the DMS will be
* `<dms_name>.obidms`.
*
* @return a pointer to an OBIDMS structure describing the newly created DMS
* @retval NULL on error and the `obi_errno` variable is set.
*
* ###Error values
* - OBIDMS_EXIST_ERROR : a database with the same name already exists.
* - OBIDMS_LONG_NAME_ERROR : the database name exceeds the limit.
* - OBIDMS_MEMORY_ERROR : something wrong occurred during memory allocation.
* @returns A pointer to an OBIDMS structure describing the newly created DMS.
* @retval NULL if an error occurred.
*
* @see obi_close_dms()
* @since May 2015
* @author Eric Coissac (eric.coissac@metabarcoding.org)
*/
OBIDMS_p obi_create_dms(const char *dms_name);
OBIDMS_p obi_create_dms(const char* dms_name);
/**
* @brief Opens an existing OBITools Data Management instance (OBIDMS).
*
* @param dms_name a pointer to a C string containing the name of the database.
* The actual directory name used to store the DMS will be
* `<name>.obidms`
*
* @return a pointer to an OBIDMS structure describing the newly created DMS
* @retval NULL on error and the `obi_errno`variable is set.
* @param dms_name A pointer to a C string containing the name of the database.
*
* ###Error values
* - OBIDMS_LONG_NAME_ERROR : the database name exceeds the limit.
* - OBIDMS_MEMORY_ERROR : something wrong occurred during memory allocation.
* @returns A pointer to an OBIDMS structure describing the opened DMS.
* @retval NULL if an error occurred.
*
* @see obi_close_dms()
* @since May 2015
* @author Eric Coissac (eric.coissac@metabarcoding.org)
*/
OBIDMS_p obi_open_dms(const char *dms_name);
OBIDMS_p obi_open_dms(const char* dms_name);
/**
* @brief Creates a new OBIDMS instance.
* @brief Creates or opens a new OBIDMS instance.
*
* If the database already exists, this function opens it, otherwise it
* creates a new database.
*
* @param dms_name a pointer to a C string containing the name of the database.
* The actual directory name used to store the DMS is
* `<name>.obidms`
*
* @return a pointer to an OBIDMS structure describing the newly created DMS
* @retval NULL on error and the `obi_errno`variable is set.
* @param dms_name A pointer to a C string containing the name of the database.
*
* ###Error values
* - OBIDMS_LONG_NAME_ERROR : the database name exceeds the limit.
* - OBIDMS_MEMORY_ERROR : something wrong occurred during memory allocation.
* @returns A pointer to an OBIDMS structure describing the OBIDMS.
* @retval NULL if an error occurred.
*
* @see obi_close_dms()
* @since May 2015
* @author Eric Coissac (eric.coissac@metabarcoding.org)
*/
OBIDMS_p obi_dms(const char *dms_name);
OBIDMS_p obi_dms(const char* dms_name);
/**
* @brief Closes an opened OBITools Data Management instance (OBIDMS).
*
* @param dms a pointer as returned by obi_create_dms() or obi_open_dms()
* @param dms A pointer as returned by obi_create_dms() or obi_open_dms().
*
* @return an integer value indicating the success of the operation. Even on
* error, the `OBIDMS` structure is freed
* @retvalue 0 on success
* @retvalue -1 on failure and the `obi_errno` variable is set.
* @returns An integer value indicating the success of the operation. Even on
* error, the `OBIDMS` structure is freed.
* @retval 0 on success.
* @retval -1 if an error occurred?-.
*
* @see obi_create_dms()
* @see obi_open_dms()
......
/****************************************************************************
* OBIDMS_column_bool functions *
* OBIDMS_column_bool functions *
****************************************************************************/
/**
......@@ -19,7 +19,7 @@
#include "obidebug.h"
#define DEBUG_LEVEL 0
#define DEBUG_LEVEL 0 // TODO has to be defined somewhere else (cython compil flag?)
/**********************************************************************
......@@ -69,7 +69,7 @@ obibool_t obi_column_get_obibool_with_elt_idx(OBIDMS_column_p column, size_t lin
}
int obi_column_set_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name, obibool_t value)
int obi_column_set_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name, obibool_t value)
{
size_t element_idx;
......@@ -87,7 +87,7 @@ int obi_column_set_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb,
else
{
element_idx = obi_column_get_element_index_from_name(column, element_name);
if (element_idx == -1)
if (element_idx == SIZE_MAX) //TODO
return -1;
}
......@@ -97,7 +97,7 @@ int obi_column_set_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb,
}
obibool_t obi_column_get_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name)
obibool_t obi_column_get_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name)
{
size_t element_idx;
......@@ -115,7 +115,7 @@ obibool_t obi_column_get_obibool_with_elt_name(OBIDMS_column_p column, size_t li
else
{
element_idx = obi_column_get_element_index_from_name(column, element_name);
if (element_idx == -1)
if (element_idx == SIZE_MAX) //TODO
return OBIBool_NA;
}
......
......@@ -10,6 +10,10 @@
*/
#ifndef OBIDMSCOLUMN_BOOL_H_
#define OBIDMSCOLUMN_BOOL_H_
#include <stdlib.h>
#include <stdio.h>
......@@ -20,19 +24,16 @@
/**
* @brief Sets a value in an OBIDMS column containing data with the type OBI_BOOL, using the index of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @warning Pointers returned by obi_open_column() don't allow writing.
*
* @param line_nb the number of the line where the value should be set
*
* @param element_idx the index of the element that should be set in the line
*
* @param value the value that should be set
* @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_idx The index of the element that should be set in the line.
* @param value The value that should be set.
*
* @return an integer value indicating the success of the operation.
*
* @retvalue 0 on success
* @retvalue -1 on failure and the `obi_errno` variable is set.
* @returns An integer value indicating the success of the operation.
* @retvalue 0 on success.
* @retvalue -1 if an error occurred.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
......@@ -43,13 +44,12 @@ int obi_column_set_obibool_with_elt_idx(OBIDMS_column_p column, size_t line_nb,
/**
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_BOOL.
*
* @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
* @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.
*
* @return the recovered value
* @returns The recovered value.
* @retval OBIBool_NA the NA value of the type if an error occurred and obi_errno is set.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
......@@ -58,44 +58,44 @@ obibool_t obi_column_get_obibool_with_elt_idx(OBIDMS_column_p column, size_t lin
/**
* @brief Sets a value in an OBIDMS column containing data with the type OBI_BOOL, using the name of the element in the line.
* @brief Sets a value in an OBIDMS column containing data with the type OBI_BOOL,
* using the name of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @warning Pointers returned by obi_open_column() don't allow writing.
*
* @param line_nb the number of the line where the value should be set
* @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.
*
* @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
*
* @return an integer value indicating the success of the operation.
*
* @retvalue 0 on success
* @retvalue -1 on failure and the `obi_errno` variable is set.
* @returns An integer value indicating the success of the operation.
* @retval 0 on success.
* @retvalue -1 if an error occurred.
*
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
int obi_column_set_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name, obibool_t value);
int obi_column_set_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name, obibool_t value);
/**
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_BOOL, using the name of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_BOOL,
* using the name of the element in the line.
*
* @param line_nb the number of the line where the value should be recovered
* @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.
*
* @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
*
* @return the recovered value
* @retvalue -1 on failure and the `obi_errno` variable is set. TODO an other value must be chosen
* @returns The recovered value.
* @retval OBIBool_NA the NA value of the type if an error occurred and obi_errno is set.
*
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
obibool_t obi_column_get_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name);
obibool_t obi_column_get_obibool_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name);
#endif /* OBIDMSCOLUMN_BOOL_H_ */
......@@ -19,7 +19,7 @@
#include "obidebug.h"
#define DEBUG_LEVEL 0
#define DEBUG_LEVEL 0 // TODO has to be defined somewhere else (cython compil flag?)
/**********************************************************************
......@@ -70,7 +70,7 @@ obichar_t obi_column_get_obichar_with_elt_idx(OBIDMS_column_p column, size_t lin
}
int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name, obichar_t value)
int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name, obichar_t value)
{
size_t element_idx;
......@@ -88,7 +88,7 @@ int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb,
else
{
element_idx = obi_column_get_element_index_from_name(column, element_name);
if (element_idx == -1)
if (element_idx == SIZE_MAX) //TODO
return -1;
}
......@@ -98,7 +98,7 @@ int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb,
}
obichar_t obi_column_get_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name)
obichar_t obi_column_get_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name)
{
size_t element_idx;
......@@ -116,7 +116,7 @@ obichar_t obi_column_get_obichar_with_elt_name(OBIDMS_column_p column, size_t li
else
{
element_idx = obi_column_get_element_index_from_name(column, element_name);
if (element_idx == -1)
if (element_idx == SIZE_MAX) //TODO
return OBIChar_NA;
}
......
......@@ -10,6 +10,10 @@
*/
#ifndef OBIDMSCOLUMN_CHAR_H_
#define OBIDMSCOLUMN_CHAR_H_
#include <stdlib.h>
#include <stdio.h>
......@@ -20,82 +24,78 @@
/**
* @brief Sets a value in an OBIDMS column containing data with the type OBI_CHAR, using the index of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @warning Pointers returned by obi_open_column() don't allow writing.
*
* @param line_nb the number of the line where the value should be set
*
* @param element_idx the index of the element that should be set in the line
*
* @param value the value that should be set
* @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_idx The index of the element that should be set in the line.
* @param value The value that should be set.
*
* @return an integer value indicating the success of the operation.
*
* @retvalue 0 on success
* @retvalue -1 on failure and the `obi_errno` variable is set.
* @returns An integer value indicating the success of the operation.
* @retvalue 0 on success.
* @retvalue -1 if an error occurred.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
int obi_column_set_obichar_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx, obichar_t* value);
int obi_column_set_obichar_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx, obichar_t value);
/**
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_CHAR.
*
* @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
* @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.
*
* @return the recovered value
* @returns The recovered value.
* @retval OBIBool_NA the NA value of the type if an error occurred and obi_errno is set.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
obichar_t* obi_column_get_obichar_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx);
obichar_t obi_column_get_obichar_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx);
/**
* @brief Sets a value in an OBIDMS column containing data with the type OBI_CHAR, using the name of the element in the line.
* @brief Sets a value in an OBIDMS column containing data with the type OBI_CHAR,
* using the name of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @warning Pointers returned by obi_open_column() don't allow writing.
*
* @param line_nb the number of the line where the value should be set
* @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.
*
* @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
*
* @return an integer value indicating the success of the operation.
*
* @retvalue 0 on success
* @retvalue -1 on failure and the `obi_errno` variable is set.
* @returns An integer value indicating the success of the operation.
* @retval 0 on success.
* @retvalue -1 if an error occurred.
*
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name, obichar_t value);
int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name, obichar_t value);
/**
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_CHAR, using the name of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_CHAR,
* using the name of the element in the line.
*
* @param line_nb the number of the line where the value should be recovered
* @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.
*
* @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
*
* @return the recovered value
* @retvalue NULL on failure and the `obi_errno` variable is set. TODO an other value should be chosen maybe
* @returns The recovered value.
* @retval OBIBool_NA the NA value of the type if an error occurred and obi_errno is set.
*
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
obichar_t obi_column_get_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name);
obichar_t obi_column_get_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name);
#endif /* OBIDMSCOLUMN_CHAR_H_ */
......@@ -19,7 +19,7 @@
#include "obidebug.h"
#define DEBUG_LEVEL 0
#define DEBUG_LEVEL 0 // TODO has to be defined somewhere else (cython compil flag?)
/**********************************************************************
......@@ -69,7 +69,7 @@ obifloat_t obi_column_get_obifloat_with_elt_idx(OBIDMS_column_p column, size_t l
}
int obi_column_set_obifloat_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name, obifloat_t value)
int obi_column_set_obifloat_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name, obifloat_t value)
{
size_t element_idx;
......@@ -87,7 +87,7 @@ int obi_column_set_obifloat_with_elt_name(OBIDMS_column_p column, size_t line_nb
else
{
element_idx = obi_column_get_element_index_from_name(column, element_name);
if (element_idx == -1)
if (element_idx == SIZE_MAX) //TODO
return -1;
}
......@@ -97,7 +97,7 @@ int obi_column_set_obifloat_with_elt_name(OBIDMS_column_p column, size_t line_nb
}
obifloat_t obi_column_get_obifloat_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name)
obifloat_t obi_column_get_obifloat_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name)
{
size_t element_idx;
......@@ -115,7 +115,7 @@ obifloat_t obi_column_get_obifloat_with_elt_name(OBIDMS_column_p column, size_t
else
{
element_idx = obi_column_get_element_index_from_name(column, element_name);
if (element_idx == -1)
if (element_idx == SIZE_MAX) //TODO
return OBIFloat_NA;
}
......
......@@ -10,6 +10,10 @@
*/
#ifndef OBIDMSCOLUMN_FLOAT_H_
#define OBIDMSCOLUMN_FLOAT_H_
#include <stdlib.h>
#include <stdio.h>
......@@ -20,19 +24,16 @@
/**
* @brief Sets a value in an OBIDMS column containing data with the type OBI_FLOAT, using the index of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @warning Pointers returned by obi_open_column() don't allow writing.
*
* @param line_nb the number of the line where the value should be set
*
* @param element_idx the index of the element that should be set in the line
*
* @param value the value that should be set
* @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_idx The index of the element that should be set in the line.
* @param value The value that should be set.
*
* @return an integer value indicating the success of the operation.
*
* @retvalue 0 on success
* @retvalue -1 on failure and the `obi_errno` variable is set.
* @returns An integer value indicating the success of the operation.
* @retvalue 0 on success.
* @retvalue -1 if an error occurred.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
......@@ -43,13 +44,12 @@ int obi_column_set_obifloat_with_elt_idx(OBIDMS_column_p column, size_t line_nb,
/**
* @brief Recovers a value in an OBIDMS column containing data with the type OBI_FLOAT.
*
* @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
* @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.
*
* @return the recovered value
* @returns The recovered value.
* @retval OBIBool_NA the NA value of the type if an error occurred and obi_errno is set.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
......@@ -58,44 +58,44 @@ obifloat_t obi_column_get_obifloat_with_elt_idx(OBIDMS_column_p column, size_t l
/**
* @brief Sets a value in an OBIDMS column containing data with the type OBI_FLOAT, using the name of the element in the line.
* @brief Sets a value in an OBIDMS column containing data with the type OBI_FLOAT,
* using the name of the element in the line.
*
* @param column a pointer as returned by obi_create_column()
* @warning Pointers returned by obi_open_column() don't allow writing.
*
* @param line_nb the number of the line where the value should be set
* @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.
*
* @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
*
* @return an integer value indicating the success of the operation.
*
* @retvalue 0 on success
* @retvalue -1 on failure and the `obi_errno` variable is set.
* @returns An integer value indicating the success of the operation.
* @retval 0 on success.
* @retvalue -1 if an error occurred.
*
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
int obi_column_set_obifloat_with_elt_name(OBIDMS_column_p column, size_t line_nb, char* element_name, obifloat_t value);
int obi_column_set_obifloat_with_elt_name(OBIDMS_column_p