Closes #10 : column groups stored in directories

This commit is contained in:
Celine Mercier
2015-06-23 18:35:34 +02:00
parent 61b6c3ce83
commit 152b34b5f4
10 changed files with 745 additions and 223 deletions

View File

@ -22,11 +22,9 @@
#include "obitypes.h"
#include "obierrno.h"
#include "obilittlebigman.h"
#include "obidmscolumngroup.h"
#define OBIDMS_MAX_COLNAME (128) /**< The maximum length of an OBIDMS column name
*/
typedef int32_t obiversion_t; /**< Used to store the column version number
*/
@ -35,7 +33,7 @@ typedef int32_t obiversion_t; /**< Used to store the column version number
*/
typedef struct OBIDMS_column_header {
bool little_endian; /**< endianess of the column:
bool little_endian; /**< endianness of the column:
- `true` on little endian platforms
- `false` on big endian platforms
@ -57,6 +55,7 @@ typedef struct OBIDMS_column_header {
*/
} OBIDMS_column_header_t, *OBIDMS_column_header_p;
/**
* @brief Structure describing a Column of the OBITools DMS
*
@ -64,25 +63,27 @@ typedef struct OBIDMS_column_header {
* creating, opening or cloning an OBIDMS_column.
*/
typedef struct OBIDMS_column {
OBIDMS_p dms ; /**< A pointer to a DMS instance
*/
OBIDMS_column_header_p header; /**< A pointer to the header of the column
*/
void* data; /**< A `void` pointer to the beginning of the
* data.
*
* @warning never use this member directly
* outside of the code of the
* low level functions
* of the OBITools DMS
*/
bool writable;/**< Indicates if the column is writable or not.
* - `true` the column is writable
* - `false` the column is read-only
*
* A column is writable only by its creator
* until it closes it.
*/
OBIDMS_p dms; /**< A pointer to a DMS instance
*/
OBIDMS_column_group_p column_group; /**< A pointer to an OBIDMS column group instance
*/
OBIDMS_column_header_p header; /**< A pointer to the header of the column
*/
void* data; /**< A `void` pointer to the beginning of the
* data.
*
* @warning never use this member directly
* outside of the code of the
* low level functions
* of the OBITools DMS
*/
bool writable; /**< Indicates if the column is writable or not.
* - `true` the column is writable
* - `false` the column is read-only
*
* A column is writable only by its creator
* until it closes it.
*/
} OBIDMS_column_t, *OBIDMS_column_p;
@ -103,7 +104,7 @@ size_t obi_get_platform_header_size();
/**
* @brief Creates a column.
*
* @param dms a pointer as returned by obi_create_dms() or obi_open_dms()
* @param dms a pointer on an OBIDMS column
* @param column_name the name of the new column
* @param type the OBIType code used to create the column
* @param nb_elements the number of elements to be stored
@ -112,9 +113,9 @@ size_t obi_get_platform_header_size();
* @author Eric Coissac (eric.coissac@metabarcoding.org)
*/
OBIDMS_column_p obi_create_column(OBIDMS_p dms,
char* column_name,
OBIType_t type,
size_t nb_elements);
const char* column_name,
OBIType_t type,
size_t nb_elements);
/**
@ -126,7 +127,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
* @return the bigger version number used for this column
* @return -1 if the column does not exist
*/
obiversion_t obi_get_latest_version_number(OBIDMS_p dms, char *column_name);
obiversion_t obi_get_latest_version_number(OBIDMS_column_group_p column_group);
#endif /* OBIDMSCOLUMN_H_ */