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 | /* |
---|
17 | * This file contains public declarations for the H5A module. |
---|
18 | */ |
---|
19 | #ifndef _H5Apublic_H |
---|
20 | #define _H5Apublic_H |
---|
21 | |
---|
22 | /* Public headers needed by this file */ |
---|
23 | #include "H5Ipublic.h" /* IDs */ |
---|
24 | #include "H5Opublic.h" /* Object Headers */ |
---|
25 | #include "H5Tpublic.h" /* Datatypes */ |
---|
26 | |
---|
27 | #ifdef __cplusplus |
---|
28 | extern "C" { |
---|
29 | #endif |
---|
30 | |
---|
31 | /* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */ |
---|
32 | typedef struct { |
---|
33 | hbool_t corder_valid; /* Indicate if creation order is valid */ |
---|
34 | H5O_msg_crt_idx_t corder; /* Creation order */ |
---|
35 | H5T_cset_t cset; /* Character set of attribute name */ |
---|
36 | hsize_t data_size; /* Size of raw data */ |
---|
37 | } H5A_info_t; |
---|
38 | |
---|
39 | /* Typedef for H5Aiterate2() callbacks */ |
---|
40 | typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/, |
---|
41 | const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/); |
---|
42 | |
---|
43 | /* Public function prototypes */ |
---|
44 | H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, |
---|
45 | hid_t space_id, hid_t acpl_id, hid_t aapl_id); |
---|
46 | H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, |
---|
47 | hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id); |
---|
48 | H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); |
---|
49 | H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, |
---|
50 | const char *attr_name, hid_t aapl_id, hid_t lapl_id); |
---|
51 | H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, |
---|
52 | H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id, |
---|
53 | hid_t lapl_id); |
---|
54 | H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf); |
---|
55 | H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); |
---|
56 | H5_DLL herr_t H5Aclose(hid_t attr_id); |
---|
57 | H5_DLL hid_t H5Aget_space(hid_t attr_id); |
---|
58 | H5_DLL hid_t H5Aget_type(hid_t attr_id); |
---|
59 | H5_DLL hid_t H5Aget_create_plist(hid_t attr_id); |
---|
60 | H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf); |
---|
61 | H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, |
---|
62 | H5_index_t idx_type, H5_iter_order_t order, hsize_t n, |
---|
63 | char *name /*out*/, size_t size, hid_t lapl_id); |
---|
64 | H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id); |
---|
65 | H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/); |
---|
66 | H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, |
---|
67 | const char *attr_name, H5A_info_t *ainfo /*out*/, hid_t lapl_id); |
---|
68 | H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, |
---|
69 | H5_index_t idx_type, H5_iter_order_t order, hsize_t n, |
---|
70 | H5A_info_t *ainfo /*out*/, hid_t lapl_id); |
---|
71 | H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name); |
---|
72 | H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name, |
---|
73 | const char *old_attr_name, const char *new_attr_name, hid_t lapl_id); |
---|
74 | H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, |
---|
75 | H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data); |
---|
76 | H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, |
---|
77 | H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data, |
---|
78 | hid_t lapd_id); |
---|
79 | H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name); |
---|
80 | H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name, |
---|
81 | const char *attr_name, hid_t lapl_id); |
---|
82 | H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, |
---|
83 | H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); |
---|
84 | H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name); |
---|
85 | H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, |
---|
86 | const char *attr_name, hid_t lapl_id); |
---|
87 | |
---|
88 | /* Symbols defined for compatibility with previous versions of the HDF5 API. |
---|
89 | * |
---|
90 | * Use of these symbols is deprecated. |
---|
91 | */ |
---|
92 | #ifndef H5_NO_DEPRECATED_SYMBOLS |
---|
93 | |
---|
94 | /* Macros */ |
---|
95 | |
---|
96 | |
---|
97 | /* Typedefs */ |
---|
98 | |
---|
99 | /* Typedef for H5Aiterate1() callbacks */ |
---|
100 | typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/, |
---|
101 | const char *attr_name/*in*/, void *operator_data/*in,out*/); |
---|
102 | |
---|
103 | |
---|
104 | /* Function prototypes */ |
---|
105 | H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, |
---|
106 | hid_t space_id, hid_t acpl_id); |
---|
107 | H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name); |
---|
108 | H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); |
---|
109 | H5_DLL int H5Aget_num_attrs(hid_t loc_id); |
---|
110 | H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, |
---|
111 | void *op_data); |
---|
112 | |
---|
113 | #endif /* H5_NO_DEPRECATED_SYMBOLS */ |
---|
114 | |
---|
115 | #ifdef __cplusplus |
---|
116 | } |
---|
117 | #endif |
---|
118 | |
---|
119 | #endif /* _H5Apublic_H */ |
---|
120 | |
---|