All DMS opened by a program are now listed and closed with atexit system
This commit is contained in:
18
src/obidms.h
18
src/obidms.h
@ -36,6 +36,8 @@
|
||||
*/
|
||||
#define MAX_NB_OPENED_COLUMNS (1000) /**< The maximum number of columns open at the same time.
|
||||
*/
|
||||
#define MAX_NB_OPENED_DMS (1000) /**< The maximum number of DMS open at the same time for a given program.
|
||||
*/
|
||||
#define MAX_NB_OPENED_INDEXERS (1000) /**< The maximum number of indexers open at the same time.
|
||||
*/
|
||||
#define MAX_PATH_LEN (1024) /**< Maximum length for the character string defining a
|
||||
@ -121,6 +123,12 @@ typedef struct OBIDMS {
|
||||
} OBIDMS_t, *OBIDMS_p;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Global Array of DMS pointers listing all the DMS opened by a program.
|
||||
*/
|
||||
extern OBIDMS_p global_opened_dms_list[MAX_NB_OPENED_DMS+1];
|
||||
|
||||
|
||||
/**
|
||||
* @brief Checks if an OBIDMS exists.
|
||||
*
|
||||
@ -403,4 +411,14 @@ obiversion_t obi_import_column(const char* dms_path_1, const char* dms_path_2, c
|
||||
int obi_import_view(const char* dms_path_1, const char* dms_path_2, const char* view_name_1, const char* view_name_2);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Closes all DMS in the global list of opened DMS.
|
||||
* To be executed 'at exit' of programs.
|
||||
*
|
||||
* @since October 2017
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
void obi_close_atexit();
|
||||
|
||||
|
||||
#endif /* OBIDMS_H_ */
|
||||
|
Reference in New Issue
Block a user