Doxygen documentation corrected and completed.
This commit is contained in:
@ -1,10 +1,15 @@
|
||||
/****************************************************************************
|
||||
* Header file for OBITypes *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file obitypes.h
|
||||
* @author Celine Mercier
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
* @date 18 May 2015
|
||||
* @brief Header file for the OBITypes.
|
||||
* @brief Header file for the handling of OBITypes.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef OBITYPES_H_
|
||||
#define OBITYPES_H_
|
||||
|
||||
@ -13,10 +18,11 @@
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#define OBIInt_NA (INT32_MIN)
|
||||
#define OBIIdx_NA (SIZE_MAX)
|
||||
#define OBIFloat_NA (float_NA())
|
||||
#define OBIChar_NA (0) // TODO not sure about this one as it can be impossible to distinguish from uninitialized values
|
||||
#define OBIInt_NA (INT32_MIN) /**< NA value for the type OBI_INT */
|
||||
#define OBIIdx_NA (SIZE_MAX) /**< NA value for the type OBI_IDX */
|
||||
#define OBIFloat_NA (float_NA()) /**< NA value for the type OBI_FLOAT */
|
||||
#define OBIChar_NA (0) /**< NA value for the type OBI_CHAR */
|
||||
// TODO not sure about this one as it can be impossible to distinguish from uninitialized values
|
||||
|
||||
|
||||
/**
|
||||
@ -48,6 +54,9 @@ typedef char obichar_t;
|
||||
typedef size_t obiidx_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Union used to compute the NA value of the OBI_FLOAT OBIType.
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
double value;
|
||||
@ -55,7 +64,11 @@ typedef union
|
||||
} ieee_double;
|
||||
|
||||
|
||||
static double float_NA(void) // as defined in R
|
||||
/**
|
||||
* @brief Returns the NA value of the OBI_FLOAT OBIType.
|
||||
* This value corresponds to the float NA value as defined in R.
|
||||
*/
|
||||
static double float_NA(void)
|
||||
{
|
||||
volatile ieee_double x;
|
||||
x.word[0] = 0x7ff00000;
|
||||
@ -65,12 +78,12 @@ static double float_NA(void) // as defined in R
|
||||
|
||||
|
||||
/**
|
||||
* @brief returns the memory size in bytes of an OBIType
|
||||
* @brief Returns the memory size in bytes of an OBIType.
|
||||
*
|
||||
* @param type the OBIType code used as query
|
||||
* @param type The OBIType code used as query.
|
||||
*
|
||||
* @return the size in bytes of the type
|
||||
* @retval 0 on error (unknown type)
|
||||
* @returns The size in bytes of the type.
|
||||
* @retval 0 if an error occurred (unknown type).
|
||||
*
|
||||
* @since May 2015
|
||||
* @author Eric Coissac (eric.coissac@metabarcoding.org)
|
||||
@ -79,31 +92,32 @@ size_t obi_sizeof(OBIType_t type);
|
||||
|
||||
|
||||
/**
|
||||
* @brief returns the size requested to store an array of OBIType
|
||||
* @brief Returns the size required to store an array of elements with an OBIType.
|
||||
*
|
||||
* The returned size is large enough to store an array of size nbelement
|
||||
* but rounded at a multiple of the memory page size.
|
||||
* The returned size is large enough to store an array large enough
|
||||
* to store all the elements but rounded at a multiple of the memory page size. // TODO this might be redundant but still a good thing
|
||||
*
|
||||
* @param type the OBIType code used as query
|
||||
* @param nbelement the number of elements to be stored
|
||||
* @param data_type The OBIType of the elements.
|
||||
* @param nb_lines The number of lines to be stored.
|
||||
* @param nb_elements_per_line The number of elements per line.
|
||||
*
|
||||
* @return the size in bytes of the array
|
||||
* @retval 0 on error (unknown type)
|
||||
* @returns The size in bytes of the array.
|
||||
* @retval 0 if an error occurred (unknown type).
|
||||
*
|
||||
* @since May 2015
|
||||
* @author Eric Coissac (eric.coissac@metabarcoding.org)
|
||||
*/
|
||||
size_t obi_array_sizeof(OBIType_t type, size_t nbelements, size_t nb_elements_per_line);
|
||||
size_t obi_array_sizeof(OBIType_t data_type, size_t nb_lines, size_t nb_elements_per_line);
|
||||
|
||||
|
||||
/**
|
||||
* @brief returns the name in the form of a character string of an OBIType
|
||||
* @brief Returns the name in the form of a character string of an OBIType.
|
||||
*
|
||||
*
|
||||
* @param data_type the OBIType code used as query
|
||||
* @param data_type The OBIType code used as query.
|
||||
*
|
||||
* @return the name of the OBIType
|
||||
* @retval NULL on error (unknown type or error allocating the memory for the character string)
|
||||
* @returns The name of the OBIType.
|
||||
* @retval NULL if an error occurred (unknown type or error allocating the memory for the character string).
|
||||
*
|
||||
* @since August 2015
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
|
Reference in New Issue
Block a user