Reorganized the code to have less functions, and the functions to get

and format the creation date of a column are now working.
This commit is contained in:
Celine Mercier
2015-10-15 15:12:45 +02:00
parent 0eaa5aa784
commit ecb9d97adb
6 changed files with 48 additions and 291 deletions

View File

@ -283,56 +283,6 @@ int obi_truncate_and_close_column(OBIDMS_column_p column);
void obi_ini_to_NA_values(OBIDMS_column_p column, size_t first_line_nb, size_t nb_lines); // TO make private?
/**
* @brief Sets the 'writable' header attribute of an OBIDMS column to False. // TODO delete?
*
* @param column A pointer on an OBIDMS column
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
void obi_column_make_unwritable(OBIDMS_column_p column);
/**
* @brief Recovers the line count of an OBIDMS column.
*
* @param column A pointer on an OBIDMS column.
*
* @returns The line count of the column.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
size_t obi_column_get_line_count(OBIDMS_column_p column);
/**
* @brief Recovers the number of lines used in an OBIDMS column.
*
* @param column A pointer on an OBIDMS column.
*
* @returns The number of lines used in the column.
*
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
size_t obi_column_get_nb_lines_used(OBIDMS_column_p column);
/**
* @brief Recovers the data type of an OBIDMS column.
*
* @param column A pointer on an OBIDMS column.
*
* @returns The data type of the column.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
OBIType_t obi_column_get_data_type(OBIDMS_column_p column);
/**
* @brief Recovers the header of an OBIDMS column from the column name.
*
@ -364,19 +314,6 @@ OBIDMS_column_header_p obi_column_get_header_from_name(OBIDMS_p dms, const char*
int obi_unmap_header(OBIDMS_column_header_p header);
/**
* @brief Recovers the elements names of an OBIDMS column.
*
* @param column A pointer on an OBIDMS column.
*
* @returns The elements names.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
const char* obi_column_get_elements_names(OBIDMS_column_p column);
/**
* @brief Recovers the index of an element in an OBIDMS column from the element's name.
*
@ -393,43 +330,16 @@ size_t obi_column_get_element_index_from_name(OBIDMS_column_p column, const char
/**
* @brief Recovers the number of elements per line in an OBIDMS column.
* @brief Formats a date in a way that is easy to read.
*
* @param column A pointer on an OBIDMS column.
* @param date A date.
*
* @returns The number of elements per line.
*
* @since July 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
size_t obi_column_get_nb_elements_per_line(OBIDMS_column_p column);
/**
* @brief Recovers the creation date of an OBIDMS column.
*
* @param column A pointer on an OBIDMS column.
*
* @returns The creation date of the column.
* @returns The date formatted in a way that is easy to read.
*
* @since October 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
char* obi_column_get_formatted_creation_date(OBIDMS_column_p column);
/**
* @brief Recovers the creation date of an OBIDMS column from the column name.
*
* @param dms A pointer on an OBIDMS.
* @param column_name The name of an OBIDMS column.
*
* @returns The creation date of the column.
*
* @since October 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
char* obi_column_get_get_formatted_creation_date_from_name(OBIDMS_p dms, const char* column_name);
char* obi_column_format_date(time_t date);
#endif /* OBIDMSCOLUMN_H_ */