HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
H5LTpublic.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the files COPYING and Copyright.html. COPYING can be found at the root *
9  * of the source code distribution tree; Copyright.html can be found at the *
10  * root level of an installed copy of the electronic HDF5 document set and *
11  * is linked from the top-level documents page. It can also be found at *
12  * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
13  * access to either file, you may request a copy from help@hdfgroup.org. *
14  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 #ifndef _H5LTpublic_H
17 #define _H5LTpublic_H
18 
19 /* Flag definitions for H5LTopen_file_image() */
20 #define H5LT_FILE_IMAGE_OPEN_RW 0x0001 /* Open image for read-write */
21 #define H5LT_FILE_IMAGE_DONT_COPY 0x0002 /* The HDF5 lib won't copy */
22 /* user supplied image buffer. The same image is open with the core driver. */
23 #define H5LT_FILE_IMAGE_DONT_RELEASE 0x0004 /* The HDF5 lib won't */
24 /* deallocate user supplied image buffer. The user application is reponsible */
25 /* for doing so. */
26 #define H5LT_FILE_IMAGE_ALL 0x0007
27 
28 typedef enum H5LT_lang_t {
29  H5LT_LANG_ERR = -1, /*this is the first*/
30  H5LT_DDL = 0, /*for DDL*/
31  H5LT_C = 1, /*for C*/
32  H5LT_FORTRAN = 2, /*for Fortran*/
33  H5LT_NO_LANG = 3 /*this is the last*/
34 } H5LT_lang_t;
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*-------------------------------------------------------------------------
41  *
42  * Make dataset functions
43  *
44  *-------------------------------------------------------------------------
45  */
46 
48  const char *dset_name,
49  int rank,
50  const hsize_t *dims,
51  hid_t type_id,
52  const void *buffer );
53 
55  const char *dset_name,
56  int rank,
57  const hsize_t *dims,
58  const char *buffer );
59 
61  const char *dset_name,
62  int rank,
63  const hsize_t *dims,
64  const short *buffer );
65 
67  const char *dset_name,
68  int rank,
69  const hsize_t *dims,
70  const int *buffer );
71 
73  const char *dset_name,
74  int rank,
75  const hsize_t *dims,
76  const long *buffer );
77 
79  const char *dset_name,
80  int rank,
81  const hsize_t *dims,
82  const float *buffer );
83 
85  const char *dset_name,
86  int rank,
87  const hsize_t *dims,
88  const double *buffer );
89 
91  const char *dset_name,
92  const char *buf );
93 
94 
95 /*-------------------------------------------------------------------------
96  *
97  * Read dataset functions
98  *
99  *-------------------------------------------------------------------------
100  */
101 
103  const char *dset_name,
104  hid_t type_id,
105  void *buffer );
106 
108  const char *dset_name,
109  char *buffer );
110 
112  const char *dset_name,
113  short *buffer );
114 
116  const char *dset_name,
117  int *buffer );
118 
120  const char *dset_name,
121  long *buffer );
122 
124  const char *dset_name,
125  float *buffer );
126 
128  const char *dset_name,
129  double *buffer );
130 
132  const char *dset_name,
133  char *buf );
134 
135 /*-------------------------------------------------------------------------
136  *
137  * Query dataset functions
138  *
139  *-------------------------------------------------------------------------
140  */
141 
142 
144  const char *dset_name,
145  int *rank );
146 
148  const char *dset_name,
149  hsize_t *dims,
150  H5T_class_t *type_class,
151  size_t *type_size );
152 
153 H5_HLDLL herr_t H5LTfind_dataset( hid_t loc_id, const char *name );
154 
155 
156 
157 /*-------------------------------------------------------------------------
158  *
159  * Set attribute functions
160  *
161  *-------------------------------------------------------------------------
162  */
163 
164 
166  const char *obj_name,
167  const char *attr_name,
168  const char *attr_data );
169 
171  const char *obj_name,
172  const char *attr_name,
173  const char *buffer,
174  size_t size );
175 
177  const char *obj_name,
178  const char *attr_name,
179  const unsigned char *buffer,
180  size_t size );
181 
183  const char *obj_name,
184  const char *attr_name,
185  const short *buffer,
186  size_t size );
187 
189  const char *obj_name,
190  const char *attr_name,
191  const unsigned short *buffer,
192  size_t size );
193 
195  const char *obj_name,
196  const char *attr_name,
197  const int *buffer,
198  size_t size );
199 
201  const char *obj_name,
202  const char *attr_name,
203  const unsigned int *buffer,
204  size_t size );
205 
207  const char *obj_name,
208  const char *attr_name,
209  const long *buffer,
210  size_t size );
211 
213  const char *obj_name,
214  const char *attr_name,
215  const long long *buffer,
216  size_t size );
217 
219  const char *obj_name,
220  const char *attr_name,
221  const unsigned long *buffer,
222  size_t size );
223 
225  const char *obj_name,
226  const char *attr_name,
227  const float *buffer,
228  size_t size );
229 
231  const char *obj_name,
232  const char *attr_name,
233  const double *buffer,
234  size_t size );
235 
236 /*-------------------------------------------------------------------------
237  *
238  * Get attribute functions
239  *
240  *-------------------------------------------------------------------------
241  */
242 
244  const char *obj_name,
245  const char *attr_name,
246  hid_t mem_type_id,
247  void *data );
248 
250  const char *obj_name,
251  const char *attr_name,
252  char *data );
253 
255  const char *obj_name,
256  const char *attr_name,
257  char *data );
258 
260  const char *obj_name,
261  const char *attr_name,
262  unsigned char *data );
263 
265  const char *obj_name,
266  const char *attr_name,
267  short *data );
268 
270  const char *obj_name,
271  const char *attr_name,
272  unsigned short *data );
273 
275  const char *obj_name,
276  const char *attr_name,
277  int *data );
278 
280  const char *obj_name,
281  const char *attr_name,
282  unsigned int *data );
283 
285  const char *obj_name,
286  const char *attr_name,
287  long *data );
288 
290  const char *obj_name,
291  const char *attr_name,
292  long long *data );
293 
295  const char *obj_name,
296  const char *attr_name,
297  unsigned long *data );
298 
300  const char *obj_name,
301  const char *attr_name,
302  float *data );
303 
305  const char *obj_name,
306  const char *attr_name,
307  double *data );
308 
309 
310 /*-------------------------------------------------------------------------
311  *
312  * Query attribute functions
313  *
314  *-------------------------------------------------------------------------
315  */
316 
317 
319  const char *obj_name,
320  const char *attr_name,
321  int *rank );
322 
324  const char *obj_name,
325  const char *attr_name,
326  hsize_t *dims,
327  H5T_class_t *type_class,
328  size_t *type_size );
329 
330 
331 
332 
333 
334 /*-------------------------------------------------------------------------
335  *
336  * General functions
337  *
338  *-------------------------------------------------------------------------
339  */
340 
341 H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type);
342 H5_HLDLL herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len);
343 
344 
345 /*-------------------------------------------------------------------------
346  *
347  * Utility functions
348  *
349  *-------------------------------------------------------------------------
350  */
351 
352 H5_HLDLL herr_t H5LTfind_attribute( hid_t loc_id, const char *name );
353 
354 H5_HLDLL htri_t H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid);
355 
356 /*-------------------------------------------------------------------------
357  *
358  * File image operations functions
359  *
360  *-------------------------------------------------------------------------
361  */
362 
363 H5_HLDLL hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags);
364 
365 #ifdef __cplusplus
366 }
367 #endif
368 
369 #endif
370 
H5_HLDLL herr_t H5LTread_dataset_char(hid_t loc_id, const char *dset_name, char *buffer)
unsigned int hbool_t
Definition: H5public.h:125
H5_HLDLL herr_t H5LTread_dataset_short(hid_t loc_id, const char *dset_name, short *buffer)
H5T_class_t
Definition: H5Tpublic.h:30
H5_HLDLL htri_t H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
H5_HLDLL hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
H5_HLDLL herr_t H5LTmake_dataset_float(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const float *buffer)
H5_HLDLL herr_t H5LTset_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned int *buffer, size_t size)
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
int herr_t
Definition: H5public.h:107
GLbitfield flags
Definition: glcorearb.h:1595
H5_HLDLL herr_t H5LTset_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name, const long *buffer, size_t size)
H5_HLDLL herr_t H5LTget_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name, char *data)
H5_HLDLL herr_t H5LTmake_dataset_char(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const char *buffer)
H5_HLDLL herr_t H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name, const double *buffer, size_t size)
unsigned long long hsize_t
Definition: H5public.h:151
H5_HLDLL herr_t H5LTfind_attribute(hid_t loc_id, const char *name)
GLuint buffer
Definition: glcorearb.h:659
H5_HLDLL herr_t H5LTset_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name, const float *buffer, size_t size)
H5LT_lang_t
Definition: H5LTpublic.h:28
GLsizeiptr size
Definition: glcorearb.h:663
H5_HLDLL herr_t H5LTget_dataset_ndims(hid_t loc_id, const char *dset_name, int *rank)
H5_HLDLL herr_t H5LTfind_dataset(hid_t loc_id, const char *name)
H5_HLDLL herr_t H5LTget_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name, double *data)
H5_HLDLL herr_t H5LTread_dataset_float(hid_t loc_id, const char *dset_name, float *buffer)
H5_HLDLL herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len)
H5_HLDLL herr_t H5LTget_dataset_info(hid_t loc_id, const char *dset_name, hsize_t *dims, H5T_class_t *type_class, size_t *type_size)
H5_HLDLL herr_t H5LTmake_dataset_string(hid_t loc_id, const char *dset_name, const char *buf)
H5_HLDLL herr_t H5LTset_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name, const char *attr_data)
H5_HLDLL herr_t H5LTget_attribute_ndims(hid_t loc_id, const char *obj_name, const char *attr_name, int *rank)
H5_HLDLL herr_t H5LTget_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name, int *data)
H5_HLDLL herr_t H5LTget_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name, float *data)
int hid_t
Definition: H5Ipublic.h:56
GLboolean * data
Definition: glcorearb.h:130
H5_HLDLL herr_t H5LTget_attribute(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t mem_type_id, void *data)
H5_HLDLL herr_t H5LTset_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned char *buffer, size_t size)
GLuint const GLchar * name
Definition: glcorearb.h:785
H5_HLDLL herr_t H5LTread_dataset_double(hid_t loc_id, const char *dset_name, double *buffer)
H5_HLDLL herr_t H5LTget_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name, long *data)
H5_HLDLL herr_t H5LTmake_dataset_long(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const long *buffer)
H5_HLDLL herr_t H5LTset_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name, const long long *buffer, size_t size)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
H5_HLDLL herr_t H5LTread_dataset_long(hid_t loc_id, const char *dset_name, long *buffer)
H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
H5_HLDLL herr_t H5LTmake_dataset(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, hid_t type_id, const void *buffer)
H5_HLDLL herr_t H5LTread_dataset(hid_t loc_id, const char *dset_name, hid_t type_id, void *buffer)
H5_HLDLL herr_t H5LTget_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned long *data)
H5_HLDLL herr_t H5LTget_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name, short *data)
H5_HLDLL herr_t H5LTset_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name, const short *buffer, size_t size)
H5_HLDLL herr_t H5LTset_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name, const int *buffer, size_t size)
size_t *lastDimSize unsigned int rank
Definition: wrapArray.h:326
H5_HLDLL herr_t H5LTread_dataset_string(hid_t loc_id, const char *dset_name, char *buf)
#define H5_HLDLL
Definition: H5api_adpt.h:407
H5_HLDLL herr_t H5LTget_attribute_info(hid_t loc_id, const char *obj_name, const char *attr_name, hsize_t *dims, H5T_class_t *type_class, size_t *type_size)
H5_HLDLL herr_t H5LTget_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name, long long *data)
H5_HLDLL herr_t H5LTset_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name, const char *buffer, size_t size)
H5_HLDLL herr_t H5LTmake_dataset_short(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const short *buffer)
H5_HLDLL herr_t H5LTmake_dataset_int(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const int *buffer)
H5_HLDLL herr_t H5LTget_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned int *data)
H5_HLDLL herr_t H5LTmake_dataset_double(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const double *buffer)
H5_HLDLL herr_t H5LTset_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned short *buffer, size_t size)
H5_HLDLL herr_t H5LTget_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned char *data)
int htri_t
Definition: H5public.h:126
H5_HLDLL herr_t H5LTget_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned short *data)
H5_HLDLL herr_t H5LTset_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned long *buffer, size_t size)
H5_HLDLL herr_t H5LTget_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name, char *data)
H5_HLDLL herr_t H5LTread_dataset_int(hid_t loc_id, const char *dset_name, int *buffer)