Doxygen documentation corrected and completed.

This commit is contained in:
Celine Mercier
2015-09-30 12:03:46 +02:00
parent 45af8396b8
commit 4b7f2d268b
25 changed files with 670 additions and 689 deletions

View File

@@ -6,57 +6,56 @@
* @file obidmscolumndir.h
* @author Celine Mercier
* @date 18 June 2015
* @brief Header file for OBIDMS column directories.
* @brief Header file for the OBIDMS column directories structures and functions.
*/
#ifndef OBIDMSCOLUMNGROUP_H_
#define OBIDMSCOLUMNGROUP_H_
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include "obidms.h"
#define OBIDMS_MAX_COLNAME (128) /**< The maximum length of an OBIDMS column name
*/
#define OBIDMS_COLUMN_DIR_MAX_NAME (2048) /**< The maximum length of an OBIDMS column directory name
*/
#define OBIDMS_COLUMN_MAX_NAME (2048) /**< The maximum length of an OBIDMS column name.
*/
/** @brief A structure describing an OBIDMS column directory instance
/**
* @brief A structure describing an OBIDMS column directory instance.
*
* A pointer to this structure is returned on creation
* and opening of an OBIDMS column directory.
*/
typedef struct OBIDMS_column_directory {
OBIDMS_p dms; /**< A pointer to a DMS instance.
OBIDMS_p dms; /**< A pointer to a DMS instance.
*/
char column_name[OBIDMS_MAX_COLNAME+1]; /**< The name of the column
* contained in the directory.
char column_name[OBIDMS_COLUMN_MAX_NAME+1]; /**< The name of the column
* contained in the directory.
*/
char directory_name[OBIDMS_COLUMN_DIR_MAX_NAME+1]; /**< The name of the directory
* containing the column.
char directory_name[OBIDMS_COLUMN_MAX_NAME+1]; /**< The name of the directory
* containing the column.
*/
DIR* directory; /**< A directory entry usable to
* refer and scan the database directory.
DIR* directory; /**< A directory entry usable to
* refer and scan the database directory.
*/
} OBIDMS_column_directory_t, *OBIDMS_column_directory_p;
/*@
* @brief Checks if an OBIDMS column directory exists
/**
* @brief Checks if an OBIDMS column directory exists.
*
* @param dms a pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms()
* @param column_name a pointer to a C string containing the name of the column.
* The actual directory name used to store the column is
* `<column_name>.obicol`.
* @param dms A pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms().
* @param column_name A pointer to a C string containing the name of the column.
*
* @return an integer value indicating the status of the column directory
* @retvalue 1 the directory exist
* @retvalue 0 the directory does not exist
* @retvalue -1 an error occurred
* @returns An integer value indicating the status of the column directory.
* @retval 1 if the directory exists.
* @retval 0 if the directory does not exist.
* @retval -1 if an error occurred.
*
* @see obi_close_column_directory()
* @since June 2015
@@ -72,17 +71,14 @@ int obi_column_directory_exists(OBIDMS_p dms, const char* column_name);
* if a directory with this name does not already exist
* before creating the new column directory.
*
* @param dms a pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms()
* @param column_name a pointer to a C string containing the name of the column.
* @param dms A pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms().
* @param column_name A pointer to a C string containing the name of the column.
* The actual directory name used to store the column will be
* `<column_name>.obicol`.
*
* @return a pointer to an OBIDMS column directory structure describing the newly created
* directory
* @retval NULL on error and the `obi_errno` variable is set.
*
* ###Error values
* - OBIDMS_COL_DIR_EXIST_ERROR : xxxxx a database with the same name already exists.
* @returns A pointer to an OBIDMS column directory structure describing the newly created
* directory.
* @retval NULL if an error occurred.
*
* @see obi_close_column_directory()
* @since June 2015
@@ -94,16 +90,13 @@ OBIDMS_column_directory_p obi_create_column_directory(OBIDMS_p dms, const char*
/**
* @brief Opens an existing OBIDMS column directory instance.
*
* @param dms a pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms()
* @param column_name a pointer to a C string containing the name of the column.
* @param dms A pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms().
* @param column_name A pointer to a C string containing the name of the column.
* The actual directory name used to store the column is
* `<column_name>.obicol`.
*
* @return a pointer to the OBIDMS column directory structure describing the directory
* @retval NULL on error and the `obi_errno`variable is set.
*
* ###Error values
* - OBIDMS_COL_DIR_ERROR : xxxxx a database with the same name already exists.
* @returns A pointer to the OBIDMS column directory structure describing the directory.
* @retval NULL if an error occurred.
*
* @see obi_close_column_directory()
* @since June 2015
@@ -118,17 +111,13 @@ OBIDMS_column_directory_p obi_open_column_directory(OBIDMS_p dms, const char* co
* If the directory already exists, this function opens it, otherwise it
* creates a new column directory.
*
* @param dms a pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms()
* @param column_name a pointer to a C string containing the name of the column.
* @param dms A pointer to an OBIDMS as returned by obi_create_dms() or obi_open_dms().
* @param column_name A pointer to a C string containing the name of the column.
* The actual directory name used to store the column is
* `<column_name>.obicol`.
*
* @return a pointer to the OBIDMS column directory structure describing the directory
* @retval NULL on error and the `obi_errno`variable is set.
*
* ###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 the OBIDMS column directory structure describing the directory.
* @retval NULL if an error occurred.
*
* @since June 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
@@ -139,13 +128,13 @@ OBIDMS_column_directory_p obi_column_directory(OBIDMS_p dms, const char* column_
/**
* @brief Closes an opened OBIDMS column directory instance.
*
* @param column_directory a pointer to an OBIDMS column directory as returned by
* obi_create_column_directory() or obi_open_column_directory()
* @param column_directory A pointer to an OBIDMS column directory as returned by
* obi_create_column_directory() or obi_open_column_directory().
*
* @return an integer value indicating the success of the operation. Even on
* error, the `OBIDMS_column_directory` 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_column_directory` structure is freed.
* @retval 0 on success.
* @retval -1 if an error occurred.
*
* @see obi_create_column_directory()
* @see obi_open_column_directory()