1 #ifndef __H5PART_PRIVATE_H
2 #define __H5PART_PRIVATE_H
3 
4 #if H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 6
5 #define H5PART_USE_HDF5_16
6 #define H5_USE_16_API
7 #endif
8 
9 #if H5_VERS_MAJOR == 1 && H5_VERS_MINOR >= 8
10 #define H5PART_HAVE_HDF5_18
11 #endif
12 
13 #define H5PART_GROUPNAME_STEP	"Step"
14 
15 #define H5PART_SET_STEP_READ_ONLY 0
16 
17 h5part_int64_t
18 _H5Part_file_is_valid (
19 	const H5PartFile *f
20 	);
21 
22 /*!
23   The functions declared here are not part of the API, but may be used
24   in extensions like H5Block. We name these functions "private".
25 
26   \note
27   Private function may change there interface even in stable versions.
28   Don't use them in applications!
29 */
30 
31 struct _iter_op_data {
32 	int stop_idx;
33 	int count;
34 	int type;
35 	char *name;
36 	size_t len;
37 	char *pattern;
38 };
39 
40 h5part_int64_t
41 _H5Part_set_step (
42 	H5PartFile *f,
43 	const h5part_int64_t step
44 	);
45 
46 h5part_int64_t
47 _H5Part_get_step_name(
48 	H5PartFile *f,
49 	const h5part_int64_t step,
50 	char *name
51 	);
52 
53 h5part_int64_t
54 _H5Part_get_num_particles (
55 	H5PartFile *f
56 	);
57 
58 herr_t
59 _H5Part_iteration_operator (
60 	hid_t group_id,
61 	const char *member_name,
62 	void *operator_data
63 	);
64 
65 #ifndef H5_USE_16_API
66 herr_t
67 _H5Part_iteration_operator2 (
68 	hid_t group_id,		 /*!< [in] parent object id */
69 	const char *member_name, /*!< [in] child object name */
70 	const H5L_info_t *linfo, /*!< link info */
71 	void *operator_data );   /*!< [in,out] data passed to the iterator */
72 #endif
73 
74 void
75 _H5Part_set_funcname (
76 	char *fname
77 	);
78 
79 char*
80 _H5Part_get_funcname (
81 	void
82 	);
83 
84 #define INIT do {\
85 	if ( _init() < 0 ) {\
86 		HANDLE_H5PART_INIT_ERR;\
87 		return NULL;\
88 	}}while(0);
89 
90 #define SET_FNAME( fname )	_H5Part_set_funcname( fname );
91 
92 h5part_int64_t
93 _H5Part_make_string_type (
94 	hid_t *type,
95 	int size
96 	);
97 
98 h5part_int64_t
99 _H5Part_normalize_h5_type (
100 	hid_t type
101 	);
102 
103 h5part_int64_t
104 _H5Part_read_attrib (
105 	hid_t id,
106 	const char *attrib_name,
107 	void *attrib_value
108 	);
109 
110 h5part_int64_t
111 _H5Part_write_attrib (
112 	hid_t id,
113 	const char *attrib_name,
114 	const hid_t attrib_type,
115 	const void *attrib_value,
116 	const hsize_t attrib_nelem
117 	);
118 
119 h5part_int64_t
120 _H5Part_write_file_attrib (
121 	H5PartFile *f,
122 	const char *name,
123 	const hid_t type,
124 	const void *value,
125 	const hsize_t nelem
126 	);
127 
128 h5part_int64_t
129 _H5Part_write_step_attrib (
130 	H5PartFile *f,
131 	const char *name,
132 	const hid_t type,
133 	const void *value,
134 	const hsize_t nelem
135 	);
136 
137 h5part_int64_t
138 _H5Part_get_attrib_info (
139 	hid_t id,
140 	const h5part_int64_t attrib_idx,
141 	char *attrib_name,
142 	const h5part_int64_t len_attrib_name,
143 	h5part_int64_t *attrib_type,
144 	h5part_int64_t *attrib_nelem
145 	);
146 
147 h5part_int64_t
148 _H5Part_get_num_objects (
149 	hid_t group_id,
150 	const char *group_name,
151 	const hid_t type
152 	);
153 
154 h5part_int64_t
155 _H5Part_get_num_objects_matching_pattern (
156 	hid_t group_id,
157 	const char *group_name,
158 	const hid_t type,
159 	char * const pattern
160 	);
161 
162 h5part_int64_t
163 _H5Part_get_object_name (
164 	hid_t group_id,
165 	const char *group_name,
166 	const hid_t type,
167 	const h5part_int64_t idx,
168 	char *obj_name,
169 	const h5part_int64_t len_obj_name
170 	);
171 
172 h5part_int64_t
173 _H5Part_have_group (
174 	const hid_t id,
175 	const char *name
176 	);
177 
178 h5part_int64_t
179 _H5Part_start_throttle (
180 	H5PartFile *f
181 	);
182 
183 h5part_int64_t
184 _H5Part_end_throttle (
185 	H5PartFile *f
186 	);
187 
188 h5part_error_handler
189 _H5Part_get_err_handle (
190 	void
191 	);
192 
193 void
194 _H5Part_print_error (
195 	const char *fmt,
196 	... )
197 #ifdef __GNUC__
198 __attribute__ ((format (printf, 1, 2)))
199 #endif
200 ;
201 
202 void
203 _H5Part_print_warn (
204 	const char *fmt,
205 	...
206 	)
207 #ifdef __GNUC__
208 __attribute__ ((format (printf, 1, 2)))
209 #endif
210 ;
211 
212 void
213 _H5Part_print_info (
214 	const char *fmt,
215 	...
216 	)
217 #ifdef __GNUC__
218 __attribute__ ((format (printf, 1, 2)))
219 #endif
220 ;
221 
222 void
223 _H5Part_print_debug (
224 	const char *fmt,
225 	...
226 	)
227 #ifdef __GNUC__
228 __attribute__ ((format (printf, 1, 2)))
229 #endif
230 ;
231 
232 void
233 _H5Part_print_debug_detail (
234 	const char *fmt,
235 	...
236 	)
237 #ifdef __GNUC__
238 __attribute__ ((format (printf, 1, 2)))
239 #endif
240 ;
241 
242 char *
243 _H5Part_strdupfor2c (
244 	const char *s,
245 	const ssize_t len
246 	);
247 
248 char *
249 _H5Part_strc2for (
250 	char * const str,
251 	const ssize_t l_str
252 	);
253 
254 #endif
255