summaryrefslogtreecommitdiffstats
path: root/develop/group___c_o_n_v.html
blob: 7c88c9b712bb5abca5890085038e9ba8caa397fc (plain)
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
<!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.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HDF5: Conversion Function</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>
<script type="text/javascript" src="cookie.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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(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>
   &#160;<span id="projectnumber">1.15.0.2908dd1</span>
   </div>
   <div id="projectbrief">API Reference</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="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.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('group___c_o_n_v.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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Conversion Function<div class="ingroups"><a class="el" href="group___h5_t.html">Datatypes (H5T)</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0a23a3cb9f24bd79fae7d2d8c412a25a" id="r_ga0a23a3cb9f24bd79fae7d2d8c412a25a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0a23a3cb9f24bd79fae7d2d8c412a25a">H5Tregister</a> (<a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7e">H5T_pers_t</a> pers, const char *name, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> src_id, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> dst_id, <a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a> func)</td></tr>
<tr class="memdesc:ga0a23a3cb9f24bd79fae7d2d8c412a25a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a datatype conversion function.  <br /></td></tr>
<tr class="separator:ga0a23a3cb9f24bd79fae7d2d8c412a25a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc791af473dd1de512dacf0e8d6554f1" id="r_gacc791af473dd1de512dacf0e8d6554f1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gacc791af473dd1de512dacf0e8d6554f1">H5Tunregister</a> (<a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7e">H5T_pers_t</a> pers, const char *name, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> src_id, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> dst_id, <a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a> func)</td></tr>
<tr class="memdesc:gacc791af473dd1de512dacf0e8d6554f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes a conversion function.  <br /></td></tr>
<tr class="separator:gacc791af473dd1de512dacf0e8d6554f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga71940c1637a309748fe93b6dceabd02f" id="r_ga71940c1637a309748fe93b6dceabd02f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga71940c1637a309748fe93b6dceabd02f">H5Tfind</a> (<a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> src_id, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> dst_id, <a class="el" href="struct_h5_t__cdata__t.html">H5T_cdata_t</a> **pcdata)</td></tr>
<tr class="memdesc:ga71940c1637a309748fe93b6dceabd02f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds a conversion function.  <br /></td></tr>
<tr class="separator:ga71940c1637a309748fe93b6dceabd02f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13fc42ad63ffd1e40e6672d30c8dd1cf" id="r_ga13fc42ad63ffd1e40e6672d30c8dd1cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#aa8f6c28736dbd0f18388c67911d38aca">htri_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga13fc42ad63ffd1e40e6672d30c8dd1cf">H5Tcompiler_conv</a> (<a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> src_id, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> dst_id)</td></tr>
<tr class="memdesc:ga13fc42ad63ffd1e40e6672d30c8dd1cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the library's default conversion is hard conversion.  <br /></td></tr>
<tr class="separator:ga13fc42ad63ffd1e40e6672d30c8dd1cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9442478475a03357ee47fa035df0228a" id="r_ga9442478475a03357ee47fa035df0228a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga9442478475a03357ee47fa035df0228a">H5Tconvert</a> (<a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> src_id, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> dst_id, size_t nelmts, void *buf, void *background, <a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> plist_id)</td></tr>
<tr class="memdesc:ga9442478475a03357ee47fa035df0228a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts data from one specified datatype to another.  <br /></td></tr>
<tr class="separator:ga9442478475a03357ee47fa035df0228a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga13fc42ad63ffd1e40e6672d30c8dd1cf" name="ga13fc42ad63ffd1e40e6672d30c8dd1cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga13fc42ad63ffd1e40e6672d30c8dd1cf">&#9670;&#160;</a></span>H5Tcompiler_conv()</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> H5Tcompiler_conv </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>src_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>dst_id</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check whether the library's default conversion is hard conversion. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">src_id</td><td>Datatype identifier of source datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_id</td><td>Datatype identifier of destination datatype</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="#ga13fc42ad63ffd1e40e6672d30c8dd1cf" title="Check whether the library&#39;s default conversion is hard conversion.">H5Tcompiler_conv()</a> determines whether the library's conversion function from type <code>src_id</code> to type <code>dst_id</code> is a compiler (hard) conversion or not. A compiler conversion uses compiler's casting; a library (soft) conversion uses the library's own conversion function.</p>
<dl class="section since"><dt>Since</dt><dd>1.8.0 </dd></dl>

</div>
</div>
<a id="ga9442478475a03357ee47fa035df0228a" name="ga9442478475a03357ee47fa035df0228a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9442478475a03357ee47fa035df0228a">&#9670;&#160;</a></span>H5Tconvert()</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> H5Tconvert </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>src_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>dst_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>nelmts</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>buf</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>background</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>plist_id</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts data from one specified datatype to another. </p>
<hr  />
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">src_id</td><td>Datatype identifier of source datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_id</td><td>Datatype identifier of destination datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nelmts</td><td>Size of array <code>buf</code> </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">buf</td><td>Array containing pre- and post-conversion values </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">background</td><td>Optional background buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">plist_id</td><td>Dataset transfer property list identifier</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="#ga9442478475a03357ee47fa035df0228a" title="Converts data from one specified datatype to another.">H5Tconvert()</a> converts <code>nelmts</code> elements from a source datatype, specified by <code>src_id</code>, to a destination datatype, <code>dst_id</code>. The source elements are packed in <code>buf</code> and on return the destination elements will be packed in <code>buf</code>. That is, the conversion is performed in place.</p>
<p>The optional background buffer is for use with compound datatypes. It is an array of <code>nelmts</code> values for the destination datatype which can then be merged with the converted values to recreate the compound datatype. For instance, background might be an array of structs with the <code>a</code> and <code>b</code> fields already initialized and the conversion of buf supplies the <code>c</code> and <code>d</code> field values.</p>
<p>The parameter <code>plist_id</code> contains the dataset transfer property list identifier which is passed to the conversion functions. As of Release 1.2, this parameter is only used to pass along the variable-length datatype custom allocation information.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="#ga9442478475a03357ee47fa035df0228a" title="Converts data from one specified datatype to another.">H5Tconvert()</a> will not resize the buffer <code>buf</code>; it must be large enough to hold the larger of the input and output data.</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.6.3 <code>nelmts</code> parameter type changed to size_t. </dd>
<dd>
1.4.0 <code>nelmts</code> parameter type changed to hsize_t.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>1.0.0 </dd></dl>

</div>
</div>
<a id="ga71940c1637a309748fe93b6dceabd02f" name="ga71940c1637a309748fe93b6dceabd02f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga71940c1637a309748fe93b6dceabd02f">&#9670;&#160;</a></span>H5Tfind()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a> H5Tfind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>src_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>dst_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_h5_t__cdata__t.html">H5T_cdata_t</a> **</td>          <td class="paramname"><span class="paramname"><em>pcdata</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds a conversion function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">src_id</td><td>Datatype identifier of source datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_id</td><td>Datatype identifier of destination datatype </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pcdata</td><td>Pointer to type conversion data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a pointer to a suitable conversion function if successful. Otherwise returns NULL.</dd></dl>
<p><a class="el" href="#ga71940c1637a309748fe93b6dceabd02f" title="Finds a conversion function.">H5Tfind()</a> finds a conversion function that can handle a conversion from type <code>src_id</code> to type <code>dst_id</code>. The <code>pcdata</code> argument is a pointer to a pointer to type conversion data which was created and initialized by the soft type conversion function of this path when the conversion function was installed on the path. </p>

</div>
</div>
<a id="ga0a23a3cb9f24bd79fae7d2d8c412a25a" name="ga0a23a3cb9f24bd79fae7d2d8c412a25a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0a23a3cb9f24bd79fae7d2d8c412a25a">&#9670;&#160;</a></span>H5Tregister()</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> H5Tregister </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7e">H5T_pers_t</a></td>          <td class="paramname"><span class="paramname"><em>pers</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>name</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>src_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>dst_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a></td>          <td class="paramname"><span class="paramname"><em>func</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Registers a datatype conversion function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pers</td><td>Conversion function type </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>Name displayed in diagnostic output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src_id</td><td>Datatype identifier of source datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_id</td><td>Datatype identifier of destination datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Function to convert between source and destination datatypes</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="#ga0a23a3cb9f24bd79fae7d2d8c412a25a" title="Registers a datatype conversion function.">H5Tregister()</a> registers a hard or soft conversion function for a datatype conversion path. The parameter <code>pers</code> indicates whether a conversion function is hard (<a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7eaa4f363fa661ce571b050873e7e653b98">H5T_PERS_HARD</a>) or soft (<a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7ea9f5fe7567029ac797b118d4ef16f206c">H5T_PERS_SOFT</a>). User-defined functions employing compiler casting are designated as <em>hard</em>; other user-defined conversion functions registered with the HDF5 library (with <a class="el" href="#ga0a23a3cb9f24bd79fae7d2d8c412a25a" title="Registers a datatype conversion function.">H5Tregister()</a> ) are designated as <em>soft</em>. The HDF5 library also has its own hard and soft conversion functions.</p>
<p>A conversion path can have only one hard function. When type is <a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7eaa4f363fa661ce571b050873e7e653b98">H5T_PERS_HARD</a>, <code>func</code> replaces any previous hard function.</p>
<p>When type is <a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7ea9f5fe7567029ac797b118d4ef16f206c">H5T_PERS_SOFT</a>, <a class="el" href="#ga0a23a3cb9f24bd79fae7d2d8c412a25a" title="Registers a datatype conversion function.">H5Tregister()</a> adds the function to the end of the master soft list and replaces the soft function in all applicable existing conversion paths. Soft functions are used when determining which conversion function is appropriate for this path.</p>
<p>The <code>name</code> is used only for debugging and should be a short identifier for the function.</p>
<p>The path is specified by the source and destination datatypes <code>src_id</code> and <code>dst_id</code>. For soft conversion functions, only the class of these types is important.</p>
<p>The type of the conversion function pointer is declared as: </p><div class="fragment"><div class="line"><span class="keyword">typedef</span> <a class="code hl_typedef" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> (*<a class="code hl_typedef" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a>)(<a class="code hl_typedef" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> src_id, <a class="code hl_typedef" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> dst_id, <a class="code hl_struct" href="struct_h5_t__cdata__t.html">H5T_cdata_t</a> *cdata, <span class="keywordtype">size_t</span> nelmts, <span class="keywordtype">size_t</span> buf_stride,</div>
<div class="line">                             <span class="keywordtype">size_t</span> bkg_stride, <span class="keywordtype">void</span> *buf, <span class="keywordtype">void</span> *bkg, <a class="code hl_typedef" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> dset_xfer_plist);</div>
</div><!-- fragment --><p>The <a class="el" href="struct_h5_t__cdata__t.html">H5T_cdata_t</a> <code>struct</code> is declared as: </p><div class="fragment"><div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="struct_h5_t__cdata__t.html">H5T_cdata_t</a> {</div>
<div class="line">    <a class="code hl_enumeration" href="_h5_tdevelop_8h.html#a9bde6125943ed5565062a4c12c7be8bd">H5T_cmd_t</a> <a class="code hl_variable" href="struct_h5_t__cdata__t.html#a5de0a2b4f94c462798b1463909866a89">command</a>;  </div>
<div class="line">    <a class="code hl_enumeration" href="_h5_tdevelop_8h.html#a6d9a04bf7a35625abc25f1bae32c8334">H5T_bkg_t</a> <a class="code hl_variable" href="struct_h5_t__cdata__t.html#a6d67d8363314e88174fcb11755b84f2e">need_bkg</a>; </div>
<div class="line">    <a class="code hl_typedef" href="_h5public_8h.html#ad470b00eccd2115c707c02de5fa1120d">hbool_t</a>   <a class="code hl_variable" href="struct_h5_t__cdata__t.html#a4b915fdadd89a13c467202350ff29d70">recalc</a>;   </div>
<div class="line">    <span class="keywordtype">void</span>     *<a class="code hl_variable" href="struct_h5_t__cdata__t.html#a8b6505c37d4ff95854b8b00527e4d9fa">priv</a>;     </div>
<div class="line">} <a class="code hl_struct" href="struct_h5_t__cdata__t.html">H5T_cdata_t</a>;</div>
</div><!-- fragment --><dl class="section since"><dt>Since</dt><dd>1.6.3 The following change occurred in the <a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a> function: the <code>nelmts</code> parameter type changed to size_t. </dd></dl>

</div>
</div>
<a id="gacc791af473dd1de512dacf0e8d6554f1" name="gacc791af473dd1de512dacf0e8d6554f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacc791af473dd1de512dacf0e8d6554f1">&#9670;&#160;</a></span>H5Tunregister()</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> H5Tunregister </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_h5_tdevelop_8h.html#ade8bfa5625e0b17bae72f10246be3c7e">H5T_pers_t</a></td>          <td class="paramname"><span class="paramname"><em>pers</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>name</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>src_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td>          <td class="paramname"><span class="paramname"><em>dst_id</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a></td>          <td class="paramname"><span class="paramname"><em>func</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes a conversion function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pers</td><td>Conversion function type </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>Name displayed in diagnostic output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src_id</td><td>Datatype identifier of source datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_id</td><td>Datatype identifier of destination datatype </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Function to convert between source and destination datatypes</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="#gacc791af473dd1de512dacf0e8d6554f1" title="Removes a conversion function.">H5Tunregister()</a> removes a conversion function matching criteria such as soft or hard conversion, source and destination types, and the conversion function.</p>
<p>If a user is trying to remove a conversion function he registered, all parameters can be used. If he is trying to remove a library's default conversion function, there is no guarantee the <code>name</code> and <code>func</code> parameters will match the user's chosen values. Passing in some values may cause this function to fail. A good practice is to pass in NULL as their values.</p>
<p>All parameters are optional. The missing parameters will be used to generalize the search criteria.</p>
<p>The conversion function pointer type declaration is described in <a class="el" href="#ga0a23a3cb9f24bd79fae7d2d8c412a25a" title="Registers a datatype conversion function.">H5Tregister()</a>.</p>
<dl class="section version"><dt>Version</dt><dd>1.6.3 The following change occurred in the <a class="el" href="_h5_tdevelop_8h.html#a5dcae1e3122cc65cb9553ce72d9ddc54">H5T_conv_t</a> function: the <code>nelmts</code> parameter type changed to size_t. </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 by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>