summaryrefslogtreecommitdiffstats
path: root/src/H5Ppublic.h
blob: 9a34f5825b640b543f1f22a380fbc1f624fc872f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
/****************************************************************************
 * NCSA HDF                                                                 *
 * Software Development Group                                               *
 * National Center for Supercomputing Applications                          *
 * University of Illinois at Urbana-Champaign                               *
 * 605 E. Springfield, Champaign IL 61820                                   *
 *                                                                          *
 * For conditions of distribution and use, see the accompanying             *
 * hdf/COPYING file.                                                        *
 *                                                                          *
 ****************************************************************************/

/*
 * This file contains function prototypes for each exported function in the
 * H5P module.
 */
#ifndef _H5Ppublic_H
#define _H5Ppublic_H

/* Default Template for creation, access, etc. templates */
#define H5P_DEFAULT     0

/* Public headers needed by this file */
#include "H5public.h"
#include "H5Ipublic.h"
#include "H5Dpublic.h"
#include "H5Fpublic.h"
#include "H5MMpublic.h"
#include "H5Zpublic.h"

/* Metroworks <sys/types.h> doesn't define off_t. */
#ifdef __MWERKS__
typedef long off_t;
/* Metroworks does not define EINTR in <errno.h> */
# define EINTR 4
#endif
/*__MWERKS__*/

#ifdef H5_WANT_H5_V1_4_COMPAT
/* Backward compatibility typedef... */
typedef hid_t H5P_class_t;      /* Alias H5P_class_t to hid_t */

/* H5P_DATASET_XFER was the name from the beginning through 1.2.  It was
 * changed to H5P_DATA_XFER on v1.3.0.  Then it was changed back to
 * H5P_DATASET_XFER right before the release of v1.4.0-beta2.
 * Define an alias here to help applications that had ported to v1.3.
 * Should be removed in later version.
 */
#define H5P_DATA_XFER H5P_DATASET_XFER
#endif /* H5_WANT_H5_V1_4_COMPAT */

/* Define property list class callback function pointer types */
typedef herr_t (*H5P_cls_create_func_t)(hid_t prop_id, void *create_data);
typedef herr_t (*H5P_cls_copy_func_t)(hid_t new_prop_id, hid_t old_prop_id, 
                                      void *copy_data);
typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data);

/* Define property list callback function pointer types */
typedef herr_t (*H5P_prp_create_func_t)(const char *name, size_t size, void *def_value);
typedef herr_t (*H5P_prp_set_func_t)(hid_t prop_id, const char *name, size_t size, void *value);
typedef herr_t (*H5P_prp_get_func_t)(hid_t prop_id, const char *name, size_t size, void *value);
typedef herr_t (*H5P_prp_delete_func_t)(hid_t prop_id, const char *name, size_t size, void *value);
typedef herr_t (*H5P_prp_copy_func_t)(const char *name, size_t size, void *value);
typedef herr_t (*H5P_prp_close_func_t)(const char *name, size_t size, void *value);

/* Define property list iteration function type */
typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data); 

#ifdef __cplusplus
extern "C" {
#endif

/*
 * The library created property list classes
 */
#define H5P_NO_CLASS		   	(H5open(), H5P_CLS_NO_CLASS_g)
#define H5P_NO_CLASS_HASH_SIZE   1  /* 1, not 0, otherwise allocations get weird */
#define H5P_FILE_CREATE 		(H5open(), H5P_CLS_FILE_CREATE_g)
#define H5P_FILE_CREATE_HASH_SIZE  	17
#define H5P_FILE_ACCESS 		(H5open(), H5P_CLS_FILE_ACCESS_g)
#define H5P_FILE_ACCESS_HASH_SIZE   	17
#define H5P_DATASET_CREATE     		(H5open(), H5P_CLS_DATASET_CREATE_g)
#define H5P_DATASET_CREATE_HASH_SIZE   	17
#define H5P_DATASET_XFER       		(H5open(), H5P_CLS_DATASET_XFER_g)
#define H5P_DATASET_XFER_HASH_SIZE   	17
#define H5P_MOUNT       		(H5open(), H5P_CLS_MOUNT_g)
#define H5P_MOUNT_HASH_SIZE   		17
__DLLVAR__ hid_t H5P_CLS_NO_CLASS_g;
__DLLVAR__ hid_t H5P_CLS_FILE_CREATE_g;
__DLLVAR__ hid_t H5P_CLS_FILE_ACCESS_g;
__DLLVAR__ hid_t H5P_CLS_DATASET_CREATE_g;
__DLLVAR__ hid_t H5P_CLS_DATASET_XFER_g;
__DLLVAR__ hid_t H5P_CLS_MOUNT_g;

/*
 * The library created default property lists
 */
#define H5P_NO_CLASS_DEFAULT   		(H5open(), H5P_LST_NO_CLASS_g)
#define H5P_FILE_CREATE_DEFAULT		(H5open(), H5P_LST_FILE_CREATE_g)
#define H5P_FILE_ACCESS_DEFAULT 	(H5open(), H5P_LST_FILE_ACCESS_g)
#define H5P_DATASET_CREATE_DEFAULT  	(H5open(), H5P_LST_DATASET_CREATE_g)
#define H5P_DATASET_XFER_DEFAULT   	(H5open(), H5P_LST_DATASET_XFER_g)
#define H5P_MOUNT_DEFAULT       	(H5open(), H5P_LST_MOUNT_g)
__DLLVAR__ hid_t H5P_LST_NO_CLASS_g;
__DLLVAR__ hid_t H5P_LST_FILE_CREATE_g;
__DLLVAR__ hid_t H5P_LST_FILE_ACCESS_g;
__DLLVAR__ hid_t H5P_LST_DATASET_CREATE_g;
__DLLVAR__ hid_t H5P_LST_DATASET_XFER_g;
__DLLVAR__ hid_t H5P_LST_MOUNT_g;

/* Public functions */
__DLL__ hid_t H5Pcreate_class(hid_t parent, const char *name, unsigned hashsize,
            H5P_cls_create_func_t cls_create, void *create_data,
            H5P_cls_copy_func_t cls_copy, void *copy_data,
            H5P_cls_close_func_t cls_close, void *close_data);
__DLL__ char *H5Pget_class_name(hid_t pclass_id);
__DLL__ hid_t H5Pcreate(hid_t cls_id);
__DLL__ herr_t H5Pregister(hid_t cls_id, const char *name, size_t size,
            void *def_value, H5P_prp_create_func_t prp_create,
            H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
            H5P_prp_delete_func_t prp_del, 
            H5P_prp_copy_func_t prp_copy,
            H5P_prp_close_func_t prp_close);
__DLL__ herr_t H5Pinsert(hid_t plist_id, const char *name, size_t size,
            void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
            H5P_prp_delete_func_t prp_delete,
            H5P_prp_copy_func_t prp_copy,
            H5P_prp_close_func_t prp_close);
__DLL__ herr_t H5Pset(hid_t plist_id, const char *name, void *value);
__DLL__ htri_t H5Pexist(hid_t plist_id, const char *name);
__DLL__ herr_t H5Pget_size(hid_t id, const char *name, size_t *size);
__DLL__ herr_t H5Pget_nprops(hid_t id, size_t *nprops);
__DLL__ hid_t H5Pget_class(hid_t plist_id);
__DLL__ hid_t H5Pget_class_parent(hid_t pclass_id);
__DLL__ herr_t H5Pget(hid_t plist_id, const char *name, void * value);
__DLL__ htri_t H5Pequal(hid_t id1, hid_t id2);
__DLL__ htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id);
__DLL__ int H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func,
            void *iter_data);
__DLL__ herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name);
__DLL__ herr_t H5Premove(hid_t plist_id, const char *name);
__DLL__ herr_t H5Punregister(hid_t pclass_id, const char *name);
__DLL__ herr_t H5Pclose_class(hid_t plist_id);
__DLL__ herr_t H5Pclose(hid_t plist_id);
__DLL__ hid_t H5Pcopy(hid_t plist_id);
__DLL__ herr_t H5Pget_version(hid_t plist_id, int *boot/*out*/,
         int *freelist/*out*/, int *stab/*out*/,
         int *shhdr/*out*/);
__DLL__ herr_t H5Pset_userblock(hid_t plist_id, hsize_t size);
__DLL__ herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size);
__DLL__ herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold,
    hsize_t alignment);
__DLL__ herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold/*out*/,
    hsize_t *alignment/*out*/);
__DLL__ herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr,
       size_t sizeof_size);
__DLL__ herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr/*out*/,
       size_t *sizeof_size/*out*/);
__DLL__ herr_t H5Pset_sym_k(hid_t plist_id, int ik, unsigned lk);
__DLL__ herr_t H5Pget_sym_k(hid_t plist_id, int *ik/*out*/, unsigned *lk/*out*/);
__DLL__ herr_t H5Pset_istore_k(hid_t plist_id, int ik);
__DLL__ herr_t H5Pget_istore_k(hid_t plist_id, int *ik/*out*/);
__DLL__ herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
__DLL__ H5D_layout_t H5Pget_layout(hid_t plist_id);
__DLL__ herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[]);
__DLL__ int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]/*out*/);
__DLL__ herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset,
          hsize_t size);
__DLL__ int H5Pget_external_count(hid_t plist_id);
__DLL__ herr_t H5Pget_external(hid_t plist_id, int idx, size_t name_size,
          char *name/*out*/, off_t *offset/*out*/,
          hsize_t *size/*out*/);
__DLL__ herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id,
        const void *driver_info);
__DLL__ hid_t H5Pget_driver(hid_t plist_id);
__DLL__ void *H5Pget_driver_info(hid_t plist_id);
__DLL__ herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv,
        void *bkg);
__DLL__ size_t H5Pget_buffer(hid_t plist_id, void **tconv/*out*/,
        void **bkg/*out*/);
__DLL__ herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
__DLL__ int H5Pget_preserve(hid_t plist_id);
__DLL__ herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter,
        unsigned int flags, size_t cd_nelmts,
        const unsigned int c_values[]);
__DLL__ int H5Pget_nfilters(hid_t plist_id);
__DLL__ H5Z_filter_t H5Pget_filter(hid_t plist_id, int filter,
       unsigned int *flags/*out*/,
       size_t *cd_nelmts/*out*/,
       unsigned cd_values[]/*out*/,
       size_t namelen, char name[]);
__DLL__ herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression);
#ifdef H5_WANT_H5_V1_4_COMPAT
__DLL__ herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, int rdcc_nelmts,
       size_t rdcc_nbytes, double rdcc_w0);
__DLL__ herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts/*out*/,
       int *rdcc_nelmts/*out*/,
       size_t *rdcc_nbytes/*out*/, double *rdcc_w0);
#else /* H5_WANT_H5_V1_4_COMPAT */
__DLL__ herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nelmts,
       size_t rdcc_nbytes, double rdcc_w0);
__DLL__ herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts/*out*/,
       size_t *rdcc_nelmts/*out*/,
       size_t *rdcc_nbytes/*out*/, double *rdcc_w0);
#endif /* H5_WANT_H5_V1_4_COMPAT */
__DLL__ herr_t H5Pset_hyper_cache(hid_t plist_id, unsigned cache,
      unsigned limit);
__DLL__ herr_t H5Pget_hyper_cache(hid_t plist_id, unsigned *cache,
      unsigned *limit);
__DLL__ herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle,
       double right);
__DLL__ herr_t H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/,
       double *middle/*out*/,
       double *right/*out*/);
__DLL__ herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id,
     const void *value);
__DLL__ herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id,
     void *value/*out*/);
__DLL__ herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref);
__DLL__ herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref/*out*/);
__DLL__ herr_t H5Pset_vlen_mem_manager(hid_t plist_id,
                                       H5MM_allocate_t alloc_func,
                                       void *alloc_info, H5MM_free_t free_func,
                                       void *free_info);
__DLL__ herr_t H5Pget_vlen_mem_manager(hid_t plist_id,
                                       H5MM_allocate_t *alloc_func,
                                       void **alloc_info,
                                       H5MM_free_t *free_func,
                                       void **free_info);
__DLL__ herr_t H5Pset_meta_block_size(hid_t fapl_id, size_t size);
__DLL__ herr_t H5Pget_meta_block_size(hid_t fapl_id, size_t *size/*out*/);
__DLL__ herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size);
__DLL__ herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size/*out*/);
__DLL__ herr_t H5Pset_hyper_vector_size(hid_t fapl_id, size_t size);
__DLL__ herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size/*out*/);

#ifdef __cplusplus
}
#endif
#endif