H5Dpublic.h

00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00002  * Copyright by The HDF Group.                                               *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00013  * access to either file, you may request a copy from help@hdfgroup.org.     *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 /*
00017  * This file contains public declarations for the H5D module.
00018  */
00019 #ifndef _H5Dpublic_H
00020 #define _H5Dpublic_H
00021 
00022 /* System headers needed by this file */
00023 
00024 /* Public headers needed by this file */
00025 #include "H5public.h"
00026 #include "H5Ipublic.h"
00027 
00028 /*****************/
00029 /* Public Macros */
00030 /*****************/
00031 
00032 /* Macros used to "unset" chunk cache configuration parameters */
00033 #define H5D_CHUNK_CACHE_NSLOTS_DEFAULT     ((size_t) -1)
00034 #define H5D_CHUNK_CACHE_NBYTES_DEFAULT      ((size_t) -1)
00035 #define H5D_CHUNK_CACHE_W0_DEFAULT          -1.
00036 
00037 /*******************/
00038 /* Public Typedefs */
00039 /*******************/
00040 
00041 /* Values for the H5D_LAYOUT property */
00042 typedef enum H5D_layout_t {
00043     H5D_LAYOUT_ERROR    = -1,
00044 
00045     H5D_COMPACT         = 0,    /*raw data is very small                     */
00046     H5D_CONTIGUOUS      = 1,    /*the default                                */
00047     H5D_CHUNKED         = 2,    /*slow and fancy                             */
00048     H5D_NLAYOUTS        = 3     /*this one must be last!                     */
00049 } H5D_layout_t;
00050 
00051 /* Types of chunk index data structures */
00052 typedef enum H5D_chunk_index_t {
00053     H5D_CHUNK_BTREE     = 0     /* v1 B-tree index                           */
00054 } H5D_chunk_index_t;
00055 
00056 /* Values for the space allocation time property */
00057 typedef enum H5D_alloc_time_t {
00058     H5D_ALLOC_TIME_ERROR        = -1,
00059     H5D_ALLOC_TIME_DEFAULT      = 0,
00060     H5D_ALLOC_TIME_EARLY        = 1,
00061     H5D_ALLOC_TIME_LATE         = 2,
00062     H5D_ALLOC_TIME_INCR         = 3
00063 } H5D_alloc_time_t;
00064 
00065 /* Values for the status of space allocation */
00066 typedef enum H5D_space_status_t {
00067     H5D_SPACE_STATUS_ERROR              = -1,
00068     H5D_SPACE_STATUS_NOT_ALLOCATED      = 0,
00069     H5D_SPACE_STATUS_PART_ALLOCATED     = 1,
00070     H5D_SPACE_STATUS_ALLOCATED          = 2
00071 } H5D_space_status_t;
00072 
00073 /* Values for time of writing fill value property */
00074 typedef enum H5D_fill_time_t {
00075     H5D_FILL_TIME_ERROR = -1,
00076     H5D_FILL_TIME_ALLOC = 0,
00077     H5D_FILL_TIME_NEVER = 1,
00078     H5D_FILL_TIME_IFSET = 2
00079 } H5D_fill_time_t;
00080 
00081 /* Values for fill value status */
00082 typedef enum H5D_fill_value_t {
00083     H5D_FILL_VALUE_ERROR        =-1,
00084     H5D_FILL_VALUE_UNDEFINED    =0,
00085     H5D_FILL_VALUE_DEFAULT      =1,
00086     H5D_FILL_VALUE_USER_DEFINED =2
00087 } H5D_fill_value_t;
00088 
00089 /********************/
00090 /* Public Variables */
00091 /********************/
00092 
00093 /*********************/
00094 /* Public Prototypes */
00095 /*********************/
00096 #ifdef __cplusplus
00097 extern "C" {
00098 #endif
00099 
00100 /* Define the operator function pointer for H5Diterate() */
00101 typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim,
00102                                  const hsize_t *point, void *operator_data);
00103 
00104 H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id,
00105     hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id);
00106 H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id,
00107     hid_t plist_id, hid_t dapl_id);
00108 H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id);
00109 H5_DLL herr_t H5Dclose(hid_t dset_id);
00110 H5_DLL hid_t H5Dget_space(hid_t dset_id);
00111 H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation);
00112 H5_DLL hid_t H5Dget_type(hid_t dset_id);
00113 H5_DLL hid_t H5Dget_create_plist(hid_t dset_id);
00114 H5_DLL hid_t H5Dget_access_plist(hid_t dset_id);
00115 H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id);
00116 H5_DLL haddr_t H5Dget_offset(hid_t dset_id);
00117 H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
00118                         hid_t file_space_id, hid_t plist_id, void *buf/*out*/);
00119 H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
00120                          hid_t file_space_id, hid_t plist_id, const void *buf);
00121 H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id,
00122             H5D_operator_t op, void *operator_data);
00123 H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
00124 H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size);
00125 H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf,
00126         hid_t buf_type, hid_t space);
00127 H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]);
00128 H5_DLL herr_t H5Ddebug(hid_t dset_id);
00129 
00130 /* Symbols defined for compatibility with previous versions of the HDF5 API.
00131  *
00132  * Use of these symbols is deprecated.
00133  */
00134 #ifndef H5_NO_DEPRECATED_SYMBOLS
00135 
00136 /* Macros */
00137 
00138 
00139 /* Typedefs */
00140 
00141 
00142 /* Function prototypes */
00143 H5_DLL hid_t H5Dcreate1(hid_t file_id, const char *name, hid_t type_id,
00144     hid_t space_id, hid_t dcpl_id);
00145 H5_DLL hid_t H5Dopen1(hid_t file_id, const char *name);
00146 H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t size[]);
00147 
00148 #endif /* H5_NO_DEPRECATED_SYMBOLS */
00149 
00150 #ifdef __cplusplus
00151 }
00152 #endif
00153 #endif /* _H5Dpublic_H */
00154