BioHDF version 0.3 alpha
Scalable NGS Data Storage Based on HDF5
biohdf_api.h
00001 /*****************************************************************************
00002  * Copyright by The HDF Group                                                *
00003  * All rights reserved.                                                      *
00004  *                                                                           *
00005  * This file is part of BioHDF.  The full BioHDF copyright notice, including *
00006  * terms governing use, modification, and redistribution, is contained in    *
00007  * the file COPYING.  COPYING can be found at the root of the source code    *
00008  * distribution tree.  If you do not have access to this file, you may       *
00009  * request a copy from help@hdfgroup.org.                                    *
00010  *****************************************************************************/
00011 
00019 #ifndef _BIOHDF_API_H
00020 #define _BIOHDF_API_H
00021 
00022 #include <stdint.h>
00023 #include <inttypes.h>
00024 
00025 
00026 /*****************************************************************************
00027  * API header                                                                *
00028  *****************************************************************************/
00029 
00030 
00031 
00036 #if defined(_WIN32)
00037     #if defined(LIBBIOHDF_EXPORTS)
00038         /* When the header file is used in the context of creating the BioHDF
00039          * dll, we need to label all exported functions "dllexport" so they
00040          * can be accessed by other software.
00041          */
00042         #if defined(__cplusplus)
00043             #define BIOHDF_API extern "C" __declspec(dllexport)
00044         #else
00045             #define BIOHDF_API __declspec(dllexport)
00046         #endif
00047     #elif defined(LIBBIOHDF_DLL_IMPORT)
00048         /* When the header file is used in the context of importing the
00049          * functions from a dll (the default case), we label them with
00050          * dllimport.  This is entirely a performance feature (it saves
00051          * one level of indirection) since I'm not exporting variables,
00052          * which do require the dllimport.
00053          */
00054         #if defined(__cplusplus)
00055             #define BIOHDF_API extern "C" __declspec(dllimport)
00056         #else
00057             #define BIOHDF_API __declspec(dllimport)
00058         #endif
00059     #else
00060         /* Everything else uses undecorated functions */
00061         #if defined(__cplusplus)
00062             #define BIOHDF_API extern "C" 
00063         #else
00064             #define BIOHDF_API
00065         #endif
00066     #endif
00067 #else /* Not Windows */
00068     #if defined(__cplusplus)
00069         #define BIOHDF_API extern "C"
00070     #else
00071         #define BIOHDF_API
00072     #endif
00073 #endif
00074 
00075 
00076 
00077 /*****************************************************************************
00078  * BioHDF Defaults                                                           *
00079  *****************************************************************************/
00080 
00081 
00082 
00084 #define BIOHDF_MAX_STRING_SIZE 4096
00085 
00086 
00087 
00089 #define BIOHDF_DEFAULT_COMPRESSION_LEVEL 5
00090 
00091 
00092 
00094 #define BIOHDF_DEFAULT_CHUNK_SIZE 1024
00095 
00096 
00097 
00098 /*****************************************************************************
00099  * BioHDF Type Attribute                                                     *
00100  *****************************************************************************/
00101 
00102 
00103 
00105 #define BIOHDF_TYPE_ATTR_NAME "BIOHDF_TYPE"
00106 
00107 
00108 
00109 /*****************************************************************************
00110  * BioHDF Common Structs and Enums                                           *
00111  *****************************************************************************/
00112 
00113 
00114 
00128 typedef enum
00129 {
00130     FIXED_LENGTH_STRING,     
00131     VARIABLE_LENGTH_STRING,  
00132     HYBRID_STRING,           
00133 } biohdf_string_storage_scheme;
00134 
00135 
00136 
00139 typedef enum _biohdf_open_mode
00140 {
00141     READ_ONLY = 0,      
00142     READ_WRITE          
00143 } biohdf_open_mode;
00144 
00145 
00146 
00151 typedef enum
00152 {
00153     NO_COMPRESSION = 0,   
00154     GZIP_1 = 1,           
00155     GZIP_2 = 2,           
00156     GZIP_3 = 3,           
00157     GZIP_4 = 4,           
00158     GZIP_5 = 5,           
00159     GZIP_6 = 6,           
00160     GZIP_7 = 7,           
00161     GZIP_8 = 8,           
00162     GZIP_9 = 9            
00163 }
00164 compression_level;
00165 
00166 
00167 
00169 #endif
 All Data Structures Variables