HDF5  1.12.0
H5Apublic.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 H5A module.
16  */
17 #ifndef _H5Apublic_H
18 #define _H5Apublic_H
19 
20 /* Public headers needed by this file */
21 #include "H5Ipublic.h" /* IDs */
22 #include "H5Opublic.h" /* Object Headers */
23 #include "H5Tpublic.h" /* Datatypes */
24 
25 /* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
26 typedef struct {
27  hbool_t corder_valid; /* Indicate if creation order is valid */
28  H5O_msg_crt_idx_t corder; /* Creation order */
29  H5T_cset_t cset; /* Character set of attribute name */
30  hsize_t data_size; /* Size of raw data */
31 } H5A_info_t;
32 
33 /* Typedef for H5Aiterate2() callbacks */
34 typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
35  const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
36 
37 
38 /********************/
39 /* Public Variables */
40 /********************/
41 
42 
43 /*********************/
44 /* Public Prototypes */
45 /*********************/
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
51  hid_t space_id, hid_t acpl_id, hid_t aapl_id);
52 H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
53  hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id);
54 H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id);
55 H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name,
56  const char *attr_name, hid_t aapl_id, hid_t lapl_id);
57 H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name,
58  H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id,
59  hid_t lapl_id);
60 H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf);
61 H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf);
62 H5_DLL herr_t H5Aclose(hid_t attr_id);
64 H5_DLL hid_t H5Aget_type(hid_t attr_id);
66 H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
67 H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name,
68  H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
69  char *name /*out*/, size_t size, hid_t lapl_id);
71 H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/);
72 H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name,
73  const char *attr_name, H5A_info_t *ainfo /*out*/, hid_t lapl_id);
74 H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name,
75  H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
76  H5A_info_t *ainfo /*out*/, hid_t lapl_id);
77 H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name);
78 H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name,
79  const char *old_attr_name, const char *new_attr_name, hid_t lapl_id);
80 H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type,
81  H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data);
82 H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
83  H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
84  hid_t lapd_id);
85 H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name);
86 H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name,
87  const char *attr_name, hid_t lapl_id);
88 H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name,
89  H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
90 H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name);
91 H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name,
92  const char *attr_name, hid_t lapl_id);
93 
94 /* Symbols defined for compatibility with previous versions of the HDF5 API.
95  *
96  * Use of these symbols is deprecated.
97  */
98 #ifndef H5_NO_DEPRECATED_SYMBOLS
99 
100 /* Macros */
101 
102 
103 /* Typedefs */
104 
105 /* Typedef for H5Aiterate1() callbacks */
106 typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/,
107  const char *attr_name/*in*/, void *operator_data/*in,out*/);
108 
109 
110 /* Function prototypes */
111 H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id,
112  hid_t space_id, hid_t acpl_id);
113 H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name);
114 H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx);
115 H5_DLL int H5Aget_num_attrs(hid_t loc_id);
116 H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
117  void *op_data);
118 
119 #endif /* H5_NO_DEPRECATED_SYMBOLS */
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* _H5Apublic_H */
126 
ssize_t
int ssize_t
Definition: H5public.h:167
H5Ipublic.h
size
iblock size
Definition: H5EAcache.c:787
H5Aexists_by_name
H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char *attr_name, hid_t lapl_id)
Definition: H5A.c:1723
H5Aget_info
H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo)
Definition: H5A.c:1022
H5A_operator2_t
herr_t(* H5A_operator2_t)(hid_t location_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data)
Definition: H5Apublic.h:34
H5Aopen_by_idx
H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id, hid_t lapl_id)
Definition: H5A.c:586
H5A_info_t::cset
H5T_cset_t cset
Definition: H5Apublic.h:29
H5Tpublic.h
H5Adelete_by_idx
H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id)
Definition: H5A.c:1586
H5Arename_by_name
H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, const char *new_attr_name, hid_t lapl_id)
Definition: H5A.c:1239
H5A_info_t::corder
H5O_msg_crt_idx_t corder
Definition: H5Apublic.h:28
H5A_info_t::data_size
hsize_t data_size
Definition: H5Apublic.h:30
H5Aexists
H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name)
Definition: H5A.c:1678
htri_t
int htri_t
Definition: H5public.h:160
H5_iter_order_t
H5_iter_order_t
Definition: H5public.h:295
H5Acreate2
H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id)
Definition: H5A.c:275
H5Aget_storage_size
H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id)
Definition: H5A.c:987
H5Aiterate_by_name
H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data, hid_t lapd_id)
Definition: H5A.c:1406
hid_t
int64_t hid_t
Definition: H5Ipublic.h:55
H5Aget_create_plist
H5_DLL hid_t H5Aget_create_plist(hid_t attr_id)
Definition: H5A.c:829
H5Aopen_by_name
H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, hid_t lapl_id)
Definition: H5A.c:508
H5A_info_t
Definition: H5Apublic.h:26
H5Adelete
H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name)
Definition: H5A.c:1465
H5Aopen
H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id)
Definition: H5A.c:438
H5O_msg_crt_idx_t
uint32_t H5O_msg_crt_idx_t
Definition: H5Opublic.h:155
H5T_cset_t
H5T_cset_t
Definition: H5Tpublic.h:78
H5Aclose
H5_DLL herr_t H5Aclose(hid_t attr_id)
Definition: H5A.c:1643
H5Aget_info_by_idx
H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5A_info_t *ainfo, hid_t lapl_id)
Definition: H5A.c:1120
H5Awrite
H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf)
Definition: H5A.c:662
H5Acreate_by_name
H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id)
Definition: H5A.c:359
H5Adelete_by_name
H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id)
Definition: H5A.c:1520
H5Acreate1
H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id)
Definition: H5Adeprec.c:116
H5A_info_t::corder_valid
hbool_t corder_valid
Definition: H5Apublic.h:27
H5Aread
H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf)
Definition: H5A.c:708
H5Aget_num_attrs
H5_DLL int H5Aget_num_attrs(hid_t loc_id)
Definition: H5Adeprec.c:322
H5Aget_info_by_name
H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, H5A_info_t *ainfo, hid_t lapl_id)
Definition: H5A.c:1063
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5Aopen_name
H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name)
Definition: H5Adeprec.c:191
H5Aget_space
H5_DLL hid_t H5Aget_space(hid_t attr_id)
Definition: H5A.c:750
H5Aiterate1
H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data)
Definition: H5Adeprec.c:388
H5A_operator1_t
herr_t(* H5A_operator1_t)(hid_t location_id, const char *attr_name, void *operator_data)
Definition: H5Apublic.h:106
H5Aget_name_by_idx
H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name, size_t size, hid_t lapl_id)
Definition: H5A.c:920
H5Aiterate2
H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data)
Definition: H5A.c:1328
n
*s *s n
Definition: H5HLdbg.c:111
H5Arename
H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name)
Definition: H5A.c:1181
herr_t
int herr_t
Definition: H5public.h:128
H5Aget_name
H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf)
Definition: H5A.c:874
hbool_t
bool hbool_t
Definition: H5public.h:159
H5Aopen_idx
H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx)
Definition: H5Adeprec.c:257
H5Aget_type
H5_DLL hid_t H5Aget_type(hid_t attr_id)
Definition: H5A.c:788
hsize_t
hsize_t
Definition: H5overflow.txt:44
H5_index_t
H5_index_t
Definition: H5public.h:316
H5Opublic.h