1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HDF5: User-defined ID Types</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="hdf5doxy.css" rel="stylesheet" type="text/css">
<!-- <link href="hdf5doxy.css" rel="stylesheet" type="text/css"/>
-->
<script type="text/javascript" src="hdf5_navtree_hacks.js"></script>
</head>
<body>
<div style="background:#FFDDDD;font-size:120%;text-align:center;margin:0;padding:5px">Please, help us to better serve our user community by answering the following short survey: <a href="https://www.hdfgroup.org/website-survey/">https://www.hdfgroup.org/website-survey/</a></div>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="HDFG-logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="https://www.hdfgroup.org">HDF5</a>
 <span id="projectnumber">1.15.0.08e115b</span>
</div>
<div id="projectbrief">API Reference</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group___h5_i_u_d.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">User-defined ID Types<div class="ingroups"><a class="el" href="group___h5_i.html">Identifiers (H5I)</a></div></div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The <a class="el" href="group___h5_i.html">Identifiers (H5I)</a> module contains functions to define new identifier types. For convenience, handles of type <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> can then be associated with the new identifier types and user objects.</p>
<p>New identifier types can be created by registering a new identifier type with the HDF5 library. Once a new identifier type has bee registered, it can be used to generate identifiers for user objects.</p>
<p>User-defined identifier types can be searched and iterated.</p>
<p>Like library-defined identifiers, user-defined identifiers <em>and</em> identifier types are reference counted, and the reference counts can be manipulated accordingly.</p>
<p>User-defined identifiers no longer in use should be deleted or reclaimed, and identifier types should be destroyed if they are no longer required.</p>
<table class="doxtable">
<tr>
<th>Create</th><th>Read </th></tr>
<tr valign="top">
<td><div class="fragment"><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> free_func(<span class="keywordtype">void</span> *obj)</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  {</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  printf(<span class="stringliteral">"Calling free_func...\n"</span>);</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="group___h5.html#ga71872bf6445cba956da86d4762b662cf">H5free_memory</a>(obj);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  {</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  __label__ fail_id, fail_obj, fail_register;</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <a class="code" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordtype">int</span> *obj;</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <a class="code" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> obj_id;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  </div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="comment">// register a new ID type</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">if</span> ((type = <a class="code" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613">H5Iregister_type</a>(128, 1024, &free_func)) < 0) {</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">goto</span> fail_register;</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  }</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  printf(<span class="stringliteral">"New identifier type ID: %d\n"</span>, type);</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  </div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="comment">// create a new object</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">if</span> ((obj = <a class="code" href="group___h5.html#ga3af36230b61a287112c0cd23962b9ec4">H5allocate_memory</a>(10 * <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>), 0)) == NULL) {</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">goto</span> fail_obj;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  }</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  </div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="comment">// obtain an ID for the new object</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">if</span> ((obj_id = <a class="code" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5">H5Iregister</a>(type, obj)) == <a class="code" href="_h5_ipublic_8h.html#a01eab13dccc91afd6909d74dccb780ba">H5I_INVALID_HID</a>) {</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordflow">goto</span> fail_id;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  }</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  printf(<span class="stringliteral">"New object identifier: %ld\n"</span>, obj_id);</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  </div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> fail_id:</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="group___h5_i_u_d.html#ga97966e203f0967fc19b38b93c2972c08">H5Iclear_type</a>(type, 1);</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> fail_obj:</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="code" href="group___h5_i_u_d.html#gaabc75ed99fd6b206154b899fac64977e">H5Idestroy_type</a>(type);</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> fail_register:;</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  }</div>
<div class="ttc" id="a_h5_ipublic_8h_html_a0045db7ff9c22ad35db6ae91662e1943"><div class="ttname"><a href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></div><div class="ttdeci">int64_t hid_t</div><div class="ttdef"><b>Definition:</b> H5Ipublic.h:60</div></div>
<div class="ttc" id="a_h5_ipublic_8h_html_a01eab13dccc91afd6909d74dccb780ba"><div class="ttname"><a href="_h5_ipublic_8h.html#a01eab13dccc91afd6909d74dccb780ba">H5I_INVALID_HID</a></div><div class="ttdeci">#define H5I_INVALID_HID</div><div class="ttdef"><b>Definition:</b> H5Ipublic.h:75</div></div>
<div class="ttc" id="a_h5_ipublic_8h_html_a13afe14178faf81b89fa2167e7ab832b"><div class="ttname"><a href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a></div><div class="ttdeci">H5I_type_t</div><div class="ttdef"><b>Definition:</b> H5Ipublic.h:34</div></div>
<div class="ttc" id="a_h5public_8h_html_a3b079ecf932a5c599499cf7e298af160"><div class="ttname"><a href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a></div><div class="ttdeci">int herr_t</div><div class="ttdef"><b>Definition:</b> H5public.h:235</div></div>
<div class="ttc" id="agroup___h5_html_ga3af36230b61a287112c0cd23962b9ec4"><div class="ttname"><a href="group___h5.html#ga3af36230b61a287112c0cd23962b9ec4">H5allocate_memory</a></div><div class="ttdeci">void * H5allocate_memory(size_t size, hbool_t clear)</div><div class="ttdoc">Allocates memory that will be freed later internally.</div></div>
<div class="ttc" id="agroup___h5_html_ga71872bf6445cba956da86d4762b662cf"><div class="ttname"><a href="group___h5.html#ga71872bf6445cba956da86d4762b662cf">H5free_memory</a></div><div class="ttdeci">herr_t H5free_memory(void *mem)</div><div class="ttdoc">Frees memory allocated by the HDF5 library.</div></div>
<div class="ttc" id="agroup___h5_i_u_d_html_ga97966e203f0967fc19b38b93c2972c08"><div class="ttname"><a href="group___h5_i_u_d.html#ga97966e203f0967fc19b38b93c2972c08">H5Iclear_type</a></div><div class="ttdeci">herr_t H5Iclear_type(H5I_type_t type, hbool_t force)</div><div class="ttdoc">Deletes all identifiers of the given type.</div></div>
<div class="ttc" id="agroup___h5_i_u_d_html_gaabc75ed99fd6b206154b899fac64977e"><div class="ttname"><a href="group___h5_i_u_d.html#gaabc75ed99fd6b206154b899fac64977e">H5Idestroy_type</a></div><div class="ttdeci">herr_t H5Idestroy_type(H5I_type_t type)</div><div class="ttdoc">Removes an identifier type and all identifiers within that type.</div></div>
<div class="ttc" id="agroup___h5_i_u_d_html_gab90ab765fa23e8ffbafa228d3c8e82c5"><div class="ttname"><a href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5">H5Iregister</a></div><div class="ttdeci">hid_t H5Iregister(H5I_type_t type, const void *object)</div><div class="ttdoc">Registers an object under a type and returns an ID for it.</div></div>
<div class="ttc" id="agroup___h5_i_u_d_html_gae10d4baa1335b2d1f1aecffb305e1613"><div class="ttname"><a href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613">H5Iregister_type</a></div><div class="ttdeci">H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)</div><div class="ttdoc">Creates and returns a new ID type.</div></div>
</div><!-- fragment --> </td><td><div class="fragment"><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  {</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  __label__ fail_query, fail_register;</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <a class="code" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type;</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <a class="code" href="_h5public_8h.html#a7f81cce70fb546af88da24d9285d3c1c">hsize_t</a> count;</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  </div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// register a new ID type</span></div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordflow">if</span> ((type = <a class="code" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613">H5Iregister_type</a>(128, 1024, NULL)) < 0) {</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keywordflow">goto</span> fail_register;</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  }</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  printf(<span class="stringliteral">"New FOO identifier type ID: %d\n"</span>, type);</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  </div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="comment">// return the number of identifiers of TYPE currently in use</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">if</span> (<a class="code" href="group___h5_i_u_d.html#ga839170c17fb8be7e14d16ee74a314a33">H5Inmembers</a>(type, &count) < 0) {</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">goto</span> fail_query;</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  }</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  printf(<span class="stringliteral">"%llu FOO identifiers in use\n"</span>, count);</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  </div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> fail_query:</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <a class="code" href="group___h5_i_u_d.html#gaabc75ed99fd6b206154b899fac64977e">H5Idestroy_type</a>(type);</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> fail_register:;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  }</div>
<div class="ttc" id="a_h5public_8h_html_a7f81cce70fb546af88da24d9285d3c1c"><div class="ttname"><a href="_h5public_8h.html#a7f81cce70fb546af88da24d9285d3c1c">hsize_t</a></div><div class="ttdeci">uint64_t hsize_t</div><div class="ttdef"><b>Definition:</b> H5public.h:297</div></div>
<div class="ttc" id="agroup___h5_i_u_d_html_ga839170c17fb8be7e14d16ee74a314a33"><div class="ttname"><a href="group___h5_i_u_d.html#ga839170c17fb8be7e14d16ee74a314a33">H5Inmembers</a></div><div class="ttdeci">herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members)</div><div class="ttdoc">Returns the number of identifiers in a given identifier type.</div></div>
</div><!-- fragment --> </td></tr>
<tr>
<th>Update</th><th>Delete </th></tr>
<tr valign="top">
<td><div class="fragment"><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  {</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  __label__ fail_id, fail_register;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="code" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keywordtype">int</span> obj = 42;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <a class="code" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> obj_id;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">// register a new ID type</span></div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">if</span> ((type = <a class="code" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613">H5Iregister_type</a>(128, 1024, NULL)) < 0) {</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">goto</span> fail_register;</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  }</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  printf(<span class="stringliteral">"New identifier type ID: %d\n"</span>, type);</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  </div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">// obtain an ID for the new object</span></div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keywordflow">if</span> ((obj_id = <a class="code" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5">H5Iregister</a>(type, &obj)) == <a class="code" href="_h5_ipublic_8h.html#a01eab13dccc91afd6909d74dccb780ba">H5I_INVALID_HID</a>) {</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">goto</span> fail_id;</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  }</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  printf(<span class="stringliteral">"New object identifier: %ld\n"</span>, obj_id);</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  </div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="comment">// bump the reference count</span></div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  assert(<a class="code" href="group___h5_i.html#ga3fd0c157704573965cafd6e1aa7f368f">H5Iinc_ref</a>(obj_id) == 2);</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  </div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="comment">// force the deletion of all IDs regardless of reference count</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <a class="code" href="group___h5_i_u_d.html#ga97966e203f0967fc19b38b93c2972c08">H5Iclear_type</a>(type, 1);</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span> fail_id:</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <a class="code" href="group___h5_i_u_d.html#gaabc75ed99fd6b206154b899fac64977e">H5Idestroy_type</a>(type);</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span> fail_register:;</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  }</div>
<div class="ttc" id="agroup___h5_i_html_ga3fd0c157704573965cafd6e1aa7f368f"><div class="ttname"><a href="group___h5_i.html#ga3fd0c157704573965cafd6e1aa7f368f">H5Iinc_ref</a></div><div class="ttdeci">int H5Iinc_ref(hid_t id)</div><div class="ttdoc">Increments the reference count for an object.</div></div>
</div><!-- fragment --> </td><td><div class="fragment"><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  {</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  __label__ fail_register;</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <a class="code" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type;</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  </div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="comment">// register a new ID type</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordflow">if</span> ((type = <a class="code" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613">H5Iregister_type</a>(128, 1024, NULL)) < 0) {</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  ret_val = EXIT_FAILURE;</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordflow">goto</span> fail_register;</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  }</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  printf(<span class="stringliteral">"New identifier type ID: %d\n"</span>, type);</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  </div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="comment">// decrementing the identifier type's ref. count to 0 triggers</span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="comment">// the type to be destroyed</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  assert(<a class="code" href="group___h5_i_u_d.html#ga3d29394ea751712e8ef5f9548f611e57">H5Idec_type_ref</a>(type) == 0);</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  </div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span> fail_register:;</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  }</div>
<div class="ttc" id="agroup___h5_i_u_d_html_ga3d29394ea751712e8ef5f9548f611e57"><div class="ttname"><a href="group___h5_i_u_d.html#ga3d29394ea751712e8ef5f9548f611e57">H5Idec_type_ref</a></div><div class="ttdeci">int H5Idec_type_ref(H5I_type_t type)</div><div class="ttdoc">Decrements the reference count on an identifier type.</div></div>
</div><!-- fragment --> </td></tr>
</table>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for User-defined ID Types:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="group___h5_i_u_d.png" border="0" usemap="#agroup______h5__i__u__d" alt=""/></div>
<map name="agroup______h5__i__u__d" id="agroup______h5__i__u__d">
<area shape="rect" href="group___h5_i.html" title=" " alt="" coords="5,5,128,31"/>
<area shape="rect" title=" " alt="" coords="176,5,340,31"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab90ab765fa23e8ffbafa228d3c8e82c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5">H5Iregister</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type, const void *object)</td></tr>
<tr class="memdesc:gab90ab765fa23e8ffbafa228d3c8e82c5"><td class="mdescLeft"> </td><td class="mdescRight">Registers an object under a type and returns an ID for it. <a href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5">More...</a><br /></td></tr>
<tr class="separator:gab90ab765fa23e8ffbafa228d3c8e82c5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaafb1c684673762bc83546e1216fa6b10"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#gaafb1c684673762bc83546e1216fa6b10">H5Iobject_verify</a> (<a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> id, <a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type)</td></tr>
<tr class="memdesc:gaafb1c684673762bc83546e1216fa6b10"><td class="mdescLeft"> </td><td class="mdescRight">Returns the object referenced by an ID. <a href="group___h5_i_u_d.html#gaafb1c684673762bc83546e1216fa6b10">More...</a><br /></td></tr>
<tr class="separator:gaafb1c684673762bc83546e1216fa6b10"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7ba6445e056849a3fe331f64e84a1709"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#ga7ba6445e056849a3fe331f64e84a1709">H5Iremove_verify</a> (<a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> id, <a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type)</td></tr>
<tr class="memdesc:ga7ba6445e056849a3fe331f64e84a1709"><td class="mdescLeft"> </td><td class="mdescRight">Removes an ID from its type. <a href="group___h5_i_u_d.html#ga7ba6445e056849a3fe331f64e84a1709">More...</a><br /></td></tr>
<tr class="separator:ga7ba6445e056849a3fe331f64e84a1709"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae10d4baa1335b2d1f1aecffb305e1613"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613">H5Iregister_type</a> (size_t hash_size, unsigned reserved, <a class="el" href="_h5_ipublic_8h.html#a5f6d1576913865b92856474bfedbe2b4">H5I_free_t</a> free_func)</td></tr>
<tr class="memdesc:gae10d4baa1335b2d1f1aecffb305e1613"><td class="mdescLeft"> </td><td class="mdescRight">Creates and returns a new ID type. <a href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613">More...</a><br /></td></tr>
<tr class="separator:gae10d4baa1335b2d1f1aecffb305e1613"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga97966e203f0967fc19b38b93c2972c08"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#ga97966e203f0967fc19b38b93c2972c08">H5Iclear_type</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type, <a class="el" href="_h5public_8h.html#ad470b00eccd2115c707c02de5fa1120d">hbool_t</a> force)</td></tr>
<tr class="memdesc:ga97966e203f0967fc19b38b93c2972c08"><td class="mdescLeft"> </td><td class="mdescRight">Deletes all identifiers of the given type. <a href="group___h5_i_u_d.html#ga97966e203f0967fc19b38b93c2972c08">More...</a><br /></td></tr>
<tr class="separator:ga97966e203f0967fc19b38b93c2972c08"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaabc75ed99fd6b206154b899fac64977e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#gaabc75ed99fd6b206154b899fac64977e">H5Idestroy_type</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type)</td></tr>
<tr class="memdesc:gaabc75ed99fd6b206154b899fac64977e"><td class="mdescLeft"> </td><td class="mdescRight">Removes an identifier type and all identifiers within that type. <a href="group___h5_i_u_d.html#gaabc75ed99fd6b206154b899fac64977e">More...</a><br /></td></tr>
<tr class="separator:gaabc75ed99fd6b206154b899fac64977e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae8302de9f2734882596a83f3117f2c9e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#gae8302de9f2734882596a83f3117f2c9e">H5Iinc_type_ref</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type)</td></tr>
<tr class="memdesc:gae8302de9f2734882596a83f3117f2c9e"><td class="mdescLeft"> </td><td class="mdescRight">Increments the reference count on an ID type. <a href="group___h5_i_u_d.html#gae8302de9f2734882596a83f3117f2c9e">More...</a><br /></td></tr>
<tr class="separator:gae8302de9f2734882596a83f3117f2c9e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3d29394ea751712e8ef5f9548f611e57"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#ga3d29394ea751712e8ef5f9548f611e57">H5Idec_type_ref</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type)</td></tr>
<tr class="memdesc:ga3d29394ea751712e8ef5f9548f611e57"><td class="mdescLeft"> </td><td class="mdescRight">Decrements the reference count on an identifier type. <a href="group___h5_i_u_d.html#ga3d29394ea751712e8ef5f9548f611e57">More...</a><br /></td></tr>
<tr class="separator:ga3d29394ea751712e8ef5f9548f611e57"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga991d7305ffbd4fdd84432b58f704fd3b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#ga991d7305ffbd4fdd84432b58f704fd3b">H5Iget_type_ref</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type)</td></tr>
<tr class="memdesc:ga991d7305ffbd4fdd84432b58f704fd3b"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the reference count on an ID type. <a href="group___h5_i_u_d.html#ga991d7305ffbd4fdd84432b58f704fd3b">More...</a><br /></td></tr>
<tr class="separator:ga991d7305ffbd4fdd84432b58f704fd3b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga342a6917ad9a6882205baad928917248"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#ga342a6917ad9a6882205baad928917248">H5Isearch</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type, <a class="el" href="_h5_ipublic_8h.html#a7400bdcded3eef3c4c4cf930173f9f72">H5I_search_func_t</a> func, void *key)</td></tr>
<tr class="memdesc:ga342a6917ad9a6882205baad928917248"><td class="mdescLeft"> </td><td class="mdescRight">Finds the memory referred to by an ID within the given ID type such that some criterion is satisfied. <a href="group___h5_i_u_d.html#ga342a6917ad9a6882205baad928917248">More...</a><br /></td></tr>
<tr class="separator:ga342a6917ad9a6882205baad928917248"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3bc2a11a594bf484cc5dc69ac987d0f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#ga3bc2a11a594bf484cc5dc69ac987d0f4">H5Iiterate</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type, <a class="el" href="_h5_ipublic_8h.html#a23a008d105d19b53a0dd7640362727de">H5I_iterate_func_t</a> op, void *op_data)</td></tr>
<tr class="memdesc:ga3bc2a11a594bf484cc5dc69ac987d0f4"><td class="mdescLeft"> </td><td class="mdescRight">Calls a callback for each member of the identifier type specified. <a href="group___h5_i_u_d.html#ga3bc2a11a594bf484cc5dc69ac987d0f4">More...</a><br /></td></tr>
<tr class="separator:ga3bc2a11a594bf484cc5dc69ac987d0f4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga839170c17fb8be7e14d16ee74a314a33"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#ga839170c17fb8be7e14d16ee74a314a33">H5Inmembers</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type, <a class="el" href="_h5public_8h.html#a7f81cce70fb546af88da24d9285d3c1c">hsize_t</a> *num_members)</td></tr>
<tr class="memdesc:ga839170c17fb8be7e14d16ee74a314a33"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of identifiers in a given identifier type. <a href="group___h5_i_u_d.html#ga839170c17fb8be7e14d16ee74a314a33">More...</a><br /></td></tr>
<tr class="separator:ga839170c17fb8be7e14d16ee74a314a33"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac137a599a2055909918e55955a69dfad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#aa8f6c28736dbd0f18388c67911d38aca">htri_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___h5_i_u_d.html#gac137a599a2055909918e55955a69dfad">H5Itype_exists</a> (<a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> type)</td></tr>
<tr class="memdesc:gac137a599a2055909918e55955a69dfad"><td class="mdescLeft"> </td><td class="mdescRight">Determines whether an identifier type is registered. <a href="group___h5_i_u_d.html#gac137a599a2055909918e55955a69dfad">More...</a><br /></td></tr>
<tr class="separator:gac137a599a2055909918e55955a69dfad"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga97966e203f0967fc19b38b93c2972c08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga97966e203f0967fc19b38b93c2972c08">◆ </a></span>H5Iclear_type()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> H5Iclear_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5public_8h.html#ad470b00eccd2115c707c02de5fa1120d">hbool_t</a> </td>
<td class="paramname"><em>force</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deletes all identifiers of the given type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Identifier of identifier type which is to be cleared of identifiers </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">force</td><td>Whether or not to force deletion of all identifiers</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a non-negative value if successful; otherwise, returns a negative value.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#ga97966e203f0967fc19b38b93c2972c08" title="Deletes all identifiers of the given type.">H5Iclear_type()</a> deletes all identifiers of the type identified by the argument <code>type</code>.</p>
<p>The identifier type's free function is first called on all of these identifiers to free their memory, then they are removed from the type.</p>
<p>If the <code>force</code> flag is set to false, only those identifiers whose reference counts are equal to 1 will be deleted, and all other identifiers will be entirely unchanged. If the force flag is true, all identifiers of this type will be deleted. </p>
</div>
</div>
<a id="ga3d29394ea751712e8ef5f9548f611e57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d29394ea751712e8ef5f9548f611e57">◆ </a></span>H5Idec_type_ref()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int H5Idec_type_ref </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decrements the reference count on an identifier type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier of the type whose reference count is to be decremented</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the current reference count on success, negative on failure.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#ga3d29394ea751712e8ef5f9548f611e57" title="Decrements the reference count on an identifier type.">H5Idec_type_ref()</a> decrements the reference count on an identifier type. The reference count is used by the library to indicate when an identifier type can be destroyed. If the reference count reaches zero, this function will destroy it.</p>
<p>The type parameter is the identifier for the identifier type whose reference count is to be decremented. This identifier must have been created by a call to <a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613" title="Creates and returns a new ID type.">H5Iregister_type()</a>. </p>
</div>
</div>
<a id="gaabc75ed99fd6b206154b899fac64977e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaabc75ed99fd6b206154b899fac64977e">◆ </a></span>H5Idestroy_type()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> H5Idestroy_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes an identifier type and all identifiers within that type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Identifier of identifier type which is to be destroyed</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a non-negative value if successful; otherwise, returns a negative value.</dd></dl>
<p>H5Idestroy_type deletes an entire identifier type <code>type</code>. All identifiers of this type are destroyed and no new identifiers of this type can be registered.</p>
<p>The type's free function is called on all of the identifiers which are deleted by this function, freeing their memory. In addition, all memory used by this type's hash table is freed.</p>
<p>Since the H5I_type_t values of destroyed identifier types are reused when new types are registered, it is a good idea to set the variable holding the value of the destroyed type to <a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832bac3bd281c14f862130b9dc14ceb8acbf0">H5I_UNINIT</a>. </p>
</div>
</div>
<a id="ga991d7305ffbd4fdd84432b58f704fd3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga991d7305ffbd4fdd84432b58f704fd3b">◆ </a></span>H5Iget_type_ref()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int H5Iget_type_ref </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the reference count on an ID type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier of the type whose reference count is to be retrieved</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the current reference count on success, negative on failure.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#ga991d7305ffbd4fdd84432b58f704fd3b" title="Retrieves the reference count on an ID type.">H5Iget_type_ref()</a> retrieves the reference count on an ID type. The reference count is used by the library to indicate when an ID type can be destroyed.</p>
<p>The type parameter is the identifier for the ID type whose reference count is to be retrieved. This identifier must have been created by a call to <a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613" title="Creates and returns a new ID type.">H5Iregister_type()</a>. </p>
</div>
</div>
<a id="gae8302de9f2734882596a83f3117f2c9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae8302de9f2734882596a83f3117f2c9e">◆ </a></span>H5Iinc_type_ref()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int H5Iinc_type_ref </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Increments the reference count on an ID type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier of the type whose reference count is to be incremented</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the current reference count on success, negative on failure.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#gae8302de9f2734882596a83f3117f2c9e" title="Increments the reference count on an ID type.">H5Iinc_type_ref()</a> increments the reference count on an ID type. The reference count is used by the library to indicate when an ID type can be destroyed.</p>
<p>The type parameter is the identifier for the ID type whose reference count is to be incremented. This identifier must have been created by a call to <a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613" title="Creates and returns a new ID type.">H5Iregister_type()</a>. </p>
</div>
</div>
<a id="ga3bc2a11a594bf484cc5dc69ac987d0f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3bc2a11a594bf484cc5dc69ac987d0f4">◆ </a></span>H5Iiterate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> H5Iiterate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a23a008d105d19b53a0dd7640362727de">H5I_iterate_func_t</a> </td>
<td class="paramname"><em>op</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>op_data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calls a callback for each member of the identifier type specified. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier type </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">op</td><td>The callback function </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">op_data</td><td>The data for the callback function</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The last value returned by <code>op</code> </dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#ga3bc2a11a594bf484cc5dc69ac987d0f4" title="Calls a callback for each member of the identifier type specified.">H5Iiterate()</a> calls the callback function <code>op</code> for each member of the identifier type <code>type</code>. The callback function type for <code>op</code>, H5I_iterate_func_t, is defined in <a class="el" href="_h5_ipublic_8h.html">H5Ipublic.h</a> as: </p><div class="fragment"><div class="line"><span class="keyword">typedef</span> <a class="code" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> (*<a class="code" href="_h5_ipublic_8h.html#a23a008d105d19b53a0dd7640362727de">H5I_iterate_func_t</a>)(<a class="code" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> id, <span class="keywordtype">void</span> *udata);</div>
<div class="ttc" id="a_h5_ipublic_8h_html_a23a008d105d19b53a0dd7640362727de"><div class="ttname"><a href="_h5_ipublic_8h.html#a23a008d105d19b53a0dd7640362727de">H5I_iterate_func_t</a></div><div class="ttdeci">herr_t(* H5I_iterate_func_t)(hid_t id, void *udata)</div><div class="ttdef"><b>Definition:</b> H5Ipublic.h:99</div></div>
</div><!-- fragment --><p> <code>op</code> takes as parameters the identifier and a pass through of <code>op_data</code>, and returns an herr_t.</p>
<p>A positive return from op will cause the iteration to stop and <a class="el" href="group___h5_i_u_d.html#ga3bc2a11a594bf484cc5dc69ac987d0f4" title="Calls a callback for each member of the identifier type specified.">H5Iiterate()</a> will return the value returned by <code>op</code>. A negative return from <code>op</code> will cause the iteration to stop and <a class="el" href="group___h5_i_u_d.html#ga3bc2a11a594bf484cc5dc69ac987d0f4" title="Calls a callback for each member of the identifier type specified.">H5Iiterate()</a> will return failure. A zero return from <code>op</code> will allow iteration to continue, as long as there are other identifiers remaining in type.</p>
<dl class="section warning"><dt>Warning</dt><dd>Adding or removing members of the identifier type during iteration will lead to undefined behavior.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>1.12.0 </dd></dl>
</div>
</div>
<a id="ga839170c17fb8be7e14d16ee74a314a33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga839170c17fb8be7e14d16ee74a314a33">◆ </a></span>H5Inmembers()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> H5Inmembers </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5public_8h.html#a7f81cce70fb546af88da24d9285d3c1c">hsize_t</a> * </td>
<td class="paramname"><em>num_members</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of identifiers in a given identifier type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier type </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">num_members</td><td>Number of identifiers of the specified identifier type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a non-negative value if successful; otherwise, returns a negative value.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#ga839170c17fb8be7e14d16ee74a314a33" title="Returns the number of identifiers in a given identifier type.">H5Inmembers()</a> returns the number of identifiers of the identifier type specified in <code>type</code>.</p>
<p>The number of identifiers is returned in <code>num_members</code>. If no identifiers of this type have been registered, the type does not exist, or it has been destroyed, <code>num_members</code> is returned with the value 0. </p>
</div>
</div>
<a id="gaafb1c684673762bc83546e1216fa6b10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaafb1c684673762bc83546e1216fa6b10">◆ </a></span>H5Iobject_verify()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* H5Iobject_verify </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> </td>
<td class="paramname"><em>id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the object referenced by an ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>ID to be dereferenced </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the object referenced by <code>id</code> on success, NULL on failure.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#gaafb1c684673762bc83546e1216fa6b10" title="Returns the object referenced by an ID.">H5Iobject_verify()</a> returns a pointer to the memory referenced by id after verifying that <code>id</code> is of type <code>type</code>. This function is analogous to dereferencing a pointer in C with type checking.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group___h5_i_u_d.html#gaafb1c684673762bc83546e1216fa6b10" title="Returns the object referenced by an ID.">H5Iobject_verify()</a> does not change the ID it is called on in any way (as opposed to <a class="el" href="group___h5_i_u_d.html#ga7ba6445e056849a3fe331f64e84a1709" title="Removes an ID from its type.">H5Iremove_verify()</a>, which removes the ID from its type's hash table).</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5" title="Registers an object under a type and returns an ID for it.">H5Iregister()</a> </dd></dl>
</div>
</div>
<a id="gab90ab765fa23e8ffbafa228d3c8e82c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab90ab765fa23e8ffbafa228d3c8e82c5">◆ </a></span>H5Iregister()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> H5Iregister </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"><em>object</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers an object under a type and returns an ID for it. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier of the type of the new ID </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">object</td><td>Pointer to object for which a new ID is created</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a object identifier if successful; otherwise returns <a class="el" href="_h5_ipublic_8h.html#a01eab13dccc91afd6909d74dccb780ba">H5I_INVALID_HID</a>.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5" title="Registers an object under a type and returns an ID for it.">H5Iregister()</a> creates and returns a new ID for an object.</p>
<p>The <code>type</code> parameter is the identifier for the ID type to which this new ID will belong. This identifier must have been created by a call to <a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613" title="Creates and returns a new ID type.">H5Iregister_type()</a>.</p>
<p>The <code>object</code> parameter is a pointer to the memory which the new ID will be a reference to. This pointer will be stored by the library and returned via a call to <a class="el" href="group___h5_i_u_d.html#gaafb1c684673762bc83546e1216fa6b10" title="Returns the object referenced by an ID.">H5Iobject_verify()</a>. </p>
</div>
</div>
<a id="gae10d4baa1335b2d1f1aecffb305e1613"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae10d4baa1335b2d1f1aecffb305e1613">◆ </a></span>H5Iregister_type()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> H5Iregister_type </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>hash_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>reserved</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a5f6d1576913865b92856474bfedbe2b4">H5I_free_t</a> </td>
<td class="paramname"><em>free_func</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates and returns a new ID type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">hash_size</td><td>Minimum hash table size (in entries) used to store IDs for the new type </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">reserved</td><td>Number of reserved IDs for the new type </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">free_func</td><td>Function used to deallocate space for a single ID</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the type identifier on success, negative on failure.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613" title="Creates and returns a new ID type.">H5Iregister_type()</a> allocates space for a new ID type and returns an identifier for it.</p>
<p>The <code>hash_size</code> parameter indicates the minimum size of the hash table used to store IDs in the new type.</p>
<p>The <code>reserved</code> parameter indicates the number of IDs in this new type to be reserved. Reserved IDs are valid IDs which are not associated with any storage within the library.</p>
<p>The <code>free_func</code> parameter is a function pointer to a function which returns an herr_t and accepts a <code>void*</code>. The purpose of this function is to deallocate memory for a single ID. It will be called by <a class="el" href="group___h5_i_u_d.html#ga97966e203f0967fc19b38b93c2972c08" title="Deletes all identifiers of the given type.">H5Iclear_type()</a> and <a class="el" href="group___h5_i_u_d.html#gaabc75ed99fd6b206154b899fac64977e" title="Removes an identifier type and all identifiers within that type.">H5Idestroy_type()</a> on each ID. This function is NOT called by <a class="el" href="group___h5_i_u_d.html#ga7ba6445e056849a3fe331f64e84a1709" title="Removes an ID from its type.">H5Iremove_verify()</a>. The <code>void*</code> will be the same pointer which was passed in to the <a class="el" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5" title="Registers an object under a type and returns an ID for it.">H5Iregister()</a> function. The <code>free_func</code> function should return 0 on success and -1 on failure. </p>
</div>
</div>
<a id="ga7ba6445e056849a3fe331f64e84a1709"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7ba6445e056849a3fe331f64e84a1709">◆ </a></span>H5Iremove_verify()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* H5Iremove_verify </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> </td>
<td class="paramname"><em>id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes an ID from its type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>The ID to be removed from its type </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a pointer to the memory referred to by <code>id</code> on success, NULL on failure.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#ga7ba6445e056849a3fe331f64e84a1709" title="Removes an ID from its type.">H5Iremove_verify()</a> first ensures that <code>id</code> belongs to <code>type</code>. If so, it removes <code>id</code> from its type and returns the pointer to the memory it referred to. This pointer is the same pointer that was placed in storage by <a class="el" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5" title="Registers an object under a type and returns an ID for it.">H5Iregister()</a>. If id does not belong to <code>type</code>, then NULL is returned.</p>
<p>The <code>id</code> parameter is the ID which is to be removed from its type.</p>
<p>The <code>type</code> parameter is the identifier for the ID type which <code>id</code> is supposed to belong to. This identifier must have been created by a call to <a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613" title="Creates and returns a new ID type.">H5Iregister_type()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>This function does NOT deallocate the memory that <code>id</code> refers to. The pointer returned by <a class="el" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5" title="Registers an object under a type and returns an ID for it.">H5Iregister()</a> must be deallocated by the user to avoid memory leaks. </dd></dl>
</div>
</div>
<a id="ga342a6917ad9a6882205baad928917248"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga342a6917ad9a6882205baad928917248">◆ </a></span>H5Isearch()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* H5Isearch </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a7400bdcded3eef3c4c4cf930173f9f72">H5I_search_func_t</a> </td>
<td class="paramname"><em>func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>key</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds the memory referred to by an ID within the given ID type such that some criterion is satisfied. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The identifier of the type to be searched </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>The function defining the search criteria </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>A key for the search function</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a pointer to the object which satisfies the search function on success, NULL on failure.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#ga342a6917ad9a6882205baad928917248" title="Finds the memory referred to by an ID within the given ID type such that some criterion is satisfied.">H5Isearch()</a> searches through a given ID type to find an object that satisfies the criteria defined by <code>func</code>. If such an object is found, the pointer to the memory containing this object is returned. Otherwise, NULL is returned. To do this, <code>func</code> is called on every member of type <code>type</code>. The first member to satisfy <code>func</code> is returned.</p>
<p>The <code>type</code> parameter is the identifier for the ID type which is to be searched. This identifier must have been created by a call to <a class="el" href="group___h5_i_u_d.html#gae10d4baa1335b2d1f1aecffb305e1613" title="Creates and returns a new ID type.">H5Iregister_type()</a>.</p>
<p>The parameter <code>func</code> is a function pointer to a function which takes three parameters. The first parameter is a <code>void*</code> and will be a pointer to the object to be tested. This is the same object that was placed in storage using <a class="el" href="group___h5_i_u_d.html#gab90ab765fa23e8ffbafa228d3c8e82c5" title="Registers an object under a type and returns an ID for it.">H5Iregister()</a>. The second parameter is a hid_t and is the ID of the object to be tested. The last parameter is a <code>void*</code>. This is the <code>key</code> parameter and can be used however the user finds helpful, or it can be ignored if it is not needed. <code>func</code> returns 0 if the object it is testing does not pass its criteria. A non-zero value should be returned if the object does pass its criteria. H5I_search_func_t is defined in <a class="el" href="_h5_ipublic_8h.html">H5Ipublic.h</a> and is shown below. </p><div class="fragment"><div class="line"><span class="keyword">typedef</span> int (*<a class="code" href="_h5_ipublic_8h.html#a7400bdcded3eef3c4c4cf930173f9f72">H5I_search_func_t</a>)(<span class="keywordtype">void</span> *obj, <a class="code" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> id, <span class="keywordtype">void</span> *key);</div>
<div class="ttc" id="a_h5_ipublic_8h_html_a7400bdcded3eef3c4c4cf930173f9f72"><div class="ttname"><a href="_h5_ipublic_8h.html#a7400bdcded3eef3c4c4cf930173f9f72">H5I_search_func_t</a></div><div class="ttdeci">int(* H5I_search_func_t)(void *obj, hid_t id, void *key)</div><div class="ttdef"><b>Definition:</b> H5Ipublic.h:92</div></div>
</div><!-- fragment --><p> The <code>key</code> parameter will be passed to the search function as a parameter. It can be used to further define the search at run-time. </p>
</div>
</div>
<a id="gac137a599a2055909918e55955a69dfad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac137a599a2055909918e55955a69dfad">◆ </a></span>H5Itype_exists()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5public_8h.html#aa8f6c28736dbd0f18388c67911d38aca">htri_t</a> H5Itype_exists </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a13afe14178faf81b89fa2167e7ab832b">H5I_type_t</a> </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines whether an identifier type is registered. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Identifier type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns zero (false), a positive (true) or a negative (failure) value.</dd></dl>
<p><a class="el" href="group___h5_i_u_d.html#gac137a599a2055909918e55955a69dfad" title="Determines whether an identifier type is registered.">H5Itype_exists()</a> determines whether the given identifier type, <code>type</code>, is registered with the library.</p>
<dl class="section since"><dt>Since</dt><dd>1.8.0 </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Fri Sep 8 2023 00:28:19 for HDF5 by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>
|