HDF5  1.12.0
H5Mpublic.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 COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * This file contains public declarations for the H5M module.
16  *
17  * NOTE: This is an experimental API. Everything in the H5M package
18  * is subject to revision in a future release.
19  */
20 #ifndef _H5Mpublic_H
21 #define _H5Mpublic_H
22 
23 /* System headers needed by this file */
24 
25 /* Public headers needed by this file */
26 #include "H5public.h"
27 #include "H5Ipublic.h"
28 
29 
30 /*****************/
31 /* Public Macros */
32 /*****************/
33 
34 /* Macros defining operation IDs for map VOL callbacks (implemented using the
35  * "optional" VOL callback) */
36 #define H5VL_MAP_CREATE 1
37 #define H5VL_MAP_OPEN 2
38 #define H5VL_MAP_GET_VAL 3
39 #define H5VL_MAP_EXISTS 4
40 #define H5VL_MAP_PUT 5
41 #define H5VL_MAP_GET 6
42 #define H5VL_MAP_SPECIFIC 7
43 #define H5VL_MAP_OPTIONAL 8
44 #define H5VL_MAP_CLOSE 9
45 
46 
47 /*******************/
48 /* Public Typedefs */
49 /*******************/
50 
51 /* types for map GET callback */
52 typedef enum H5VL_map_get_t {
53  H5VL_MAP_GET_MAPL, /* map access property list */
54  H5VL_MAP_GET_MCPL, /* map creation property list */
55  H5VL_MAP_GET_KEY_TYPE, /* key type */
56  H5VL_MAP_GET_VAL_TYPE, /* value type */
57  H5VL_MAP_GET_COUNT /* key count */
59 
60 /* types for map SPECIFIC callback */
61 typedef enum H5VL_map_specific_t {
62  H5VL_MAP_ITER, /* H5Miterate */
63  H5VL_MAP_DELETE /* H5Mdelete */
65 
66 /* Callback for H5Miterate() */
67 typedef herr_t (*H5M_iterate_t)(hid_t map_id, const void *key, void *op_data);
68 
69 
70 /********************/
71 /* Public Variables */
72 /********************/
73 
74 
75 /*********************/
76 /* Public Prototypes */
77 /*********************/
78 #ifdef __cplusplus
79 extern "C" {
80 #endif
81 
82 /* The map API is only built when requested since there's no support in
83  * the native file format at this time. It's only supported in a few VOL
84  * connectors.
85  */
86 #ifdef H5_HAVE_MAP_API
87 
88 H5_DLL hid_t H5Mcreate(hid_t loc_id, const char *name, hid_t key_type_id,
89  hid_t val_type_id, hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id);
90 H5_DLL hid_t H5Mcreate_anon(hid_t loc_id, hid_t key_type_id, hid_t val_type_id,
91  hid_t mcpl_id, hid_t mapl_id);
92 H5_DLL hid_t H5Mopen(hid_t loc_id, const char *name, hid_t mapl_id);
93 H5_DLL herr_t H5Mclose(hid_t map_id);
94 H5_DLL hid_t H5Mget_key_type(hid_t map_id);
95 H5_DLL hid_t H5Mget_val_type(hid_t map_id);
96 H5_DLL hid_t H5Mget_create_plist(hid_t map_id);
97 H5_DLL hid_t H5Mget_access_plist(hid_t map_id);
98 H5_DLL herr_t H5Mget_count(hid_t map_id, hsize_t *count, hid_t dxpl_id);
99 H5_DLL herr_t H5Mput(hid_t map_id, hid_t key_mem_type_id, const void *key,
100  hid_t val_mem_type_id, const void *value, hid_t dxpl_id);
101 H5_DLL herr_t H5Mget(hid_t map_id, hid_t key_mem_type_id, const void *key,
102  hid_t val_mem_type_id, void *value, hid_t dxpl_id);
103 H5_DLL herr_t H5Mexists(hid_t map_id, hid_t key_mem_type_id, const void *key,
104  hbool_t *exists, hid_t dxpl_id);
105 H5_DLL herr_t H5Miterate(hid_t map_id, hsize_t *idx, hid_t key_mem_type_id,
106  H5M_iterate_t op, void *op_data, hid_t dxpl_id);
107 H5_DLL herr_t H5Miterate_by_name(hid_t loc_id, const char *map_name,
108  hsize_t *idx, hid_t key_mem_type_id, H5M_iterate_t op, void *op_data,
109  hid_t dxpl_id, hid_t lapl_id);
110 H5_DLL herr_t H5Mdelete(hid_t map_id, hid_t key_mem_type_id,
111  const void *key, hid_t dxpl_id);
112 
113 /* Symbols defined for compatibility with previous versions of the HDF5 API.
114  *
115  * Use of these symbols is deprecated.
116  */
117 #ifndef H5_NO_DEPRECATED_SYMBOLS
118 #endif /* H5_NO_DEPRECATED_SYMBOLS */
119 
120 #endif /* H5_HAVE_MAP_API */
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif /* _H5Mpublic_H */
127 
H5public.h
H5VL_MAP_GET_KEY_TYPE
@ H5VL_MAP_GET_KEY_TYPE
Definition: H5Mpublic.h:55
H5Ipublic.h
H5VL_MAP_ITER
@ H5VL_MAP_ITER
Definition: H5Mpublic.h:62
H5M_iterate_t
herr_t(* H5M_iterate_t)(hid_t map_id, const void *key, void *op_data)
Definition: H5Mpublic.h:67
H5VL_MAP_GET_MCPL
@ H5VL_MAP_GET_MCPL
Definition: H5Mpublic.h:54
H5VL_MAP_GET_MAPL
@ H5VL_MAP_GET_MAPL
Definition: H5Mpublic.h:53
H5VL_MAP_DELETE
@ H5VL_MAP_DELETE
Definition: H5Mpublic.h:63
hid_t
int64_t hid_t
Definition: H5Ipublic.h:55
H5VL_MAP_GET_VAL_TYPE
@ H5VL_MAP_GET_VAL_TYPE
Definition: H5Mpublic.h:56
H5VL_map_specific_t
H5VL_map_specific_t
Definition: H5Mpublic.h:61
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5VL_map_get_t
H5VL_map_get_t
Definition: H5Mpublic.h:52
herr_t
int herr_t
Definition: H5public.h:128
hbool_t
bool hbool_t
Definition: H5public.h:159
hsize_t
hsize_t
Definition: H5overflow.txt:44
H5VL_MAP_GET_COUNT
@ H5VL_MAP_GET_COUNT
Definition: H5Mpublic.h:57