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 
00023 
00024 /*****************************************************************************
00025  * API header                                                                *
00026  *****************************************************************************/
00027 
00028 
00029 
00034 #if defined(_WIN32)
00035     #if defined(LIBBIOHDF_EXPORTS)
00036         /* When the header file is used in the context of creating the BioHDF
00037          * dll, we need to label all exported functions "dllexport" so they
00038          * can be accessed by other software.
00039          */
00040         #if defined(__cplusplus)
00041             #define BIOHDF_API extern "C" __declspec(dllexport)
00042         #else
00043             #define BIOHDF_API __declspec(dllexport)
00044         #endif
00045     #elif defined(LIBBIOHDF_DLL_IMPORT)
00046         /* When the header file is used in the context of importing the
00047          * functions from a dll (the default case), we label them with
00048          * dllimport.  This is entirely a performance feature (it saves
00049          * one level of indirection) since I'm not exporting variables,
00050          * which do require the dllimport.
00051          */
00052         #if defined(__cplusplus)
00053             #define BIOHDF_API extern "C" __declspec(dllimport)
00054         #else
00055             #define BIOHDF_API __declspec(dllimport)
00056         #endif
00057     #else
00058         /* Everything else uses undecorated functions */
00059         #if defined(__cplusplus)
00060             #define BIOHDF_API extern "C" 
00061         #else
00062             #define BIOHDF_API
00063         #endif
00064     #endif
00065 #else /* Not Windows */
00066     #if defined(__cplusplus)
00067         #define BIOHDF_API extern "C"
00068     #else
00069         #define BIOHDF_API
00070     #endif
00071 #endif
00072 
00073 
00074 
00075 /*****************************************************************************
00076  * Integer typedefs                                                          *
00077  *****************************************************************************/
00078 
00079 
00080 
00082 typedef long long int biohdf_int64;
00083 
00084 
00085 
00087 typedef int biohdf_int32;
00088 
00089 
00090 
00092 typedef unsigned int biohdf_int32u;
00093 
00094 
00095 
00096 /*****************************************************************************
00097  * BioHDF Defaults                                                           *
00098  *****************************************************************************/
00099 
00100 
00101 
00103 #define BIOHDF_MAX_STRING_SIZE 4096
00104 
00105 
00106 
00108 #define BIOHDF_DEFAULT_COMPRESSION_LEVEL 5
00109 
00110 
00111 
00113 #define BIOHDF_DEFAULT_CHUNK_SIZE 1024
00114 
00115 
00116 
00117 /*****************************************************************************
00118  * BioHDF Type Attribute                                                     *
00119  *****************************************************************************/
00120 
00121 
00122 
00124 #define BIOHDF_TYPE_ATTR_NAME "BIOHDF_TYPE"
00125 
00126 
00127 
00128 /*****************************************************************************
00129  * BioHDF Common Structs and Enums                                           *
00130  *****************************************************************************/
00131 
00132 
00133 
00135 typedef enum
00136 {
00137     FALSE  = 0,
00138     TRUE   = 1
00139 } biohdf_bool;
00140 
00141 
00142 
00156 typedef enum
00157 {
00158     FIXED_LENGTH_STRING,     
00159     VARIABLE_LENGTH_STRING,  
00160     HYBRID_STRING,           
00161 } biohdf_string_storage_scheme;
00162 
00163 
00164 
00167 typedef enum _biohdf_open_mode
00168 {
00169     READ_ONLY = 0,      
00170     READ_WRITE          
00171 } biohdf_open_mode;
00172 
00173 
00174 
00179 typedef enum
00180 {
00181     NO_COMPRESSION = 0,   
00182     GZIP_1 = 1,           
00183     GZIP_2 = 2,           
00184     GZIP_3 = 3,           
00185     GZIP_4 = 4,           
00186     GZIP_5 = 5,           
00187     GZIP_6 = 6,           
00188     GZIP_7 = 7,           
00189     GZIP_8 = 8,           
00190     GZIP_9 = 9            
00191 }
00192 compression_level;
00193 
00194 
00195 
00197 #endif
 All Data Structures Variables