Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Registers a conversion function

.

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5T_REGISTER (type, name, src_id, dst_id, func)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">herr_t H5Tregister( H5T_pers_t type, const char * name, hid_t src_id, hid_t dst_id, H5T_conv_t func )</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
H5T_pers_t typeIN: Conversion function type:
  H5T_PERS_HARD for hard conversion functions 
  H5T_PERS_SOFT for soft conversion functions
const char * nameIN: Name displayed in diagnostic output
hid_t src_idIN: Identifier of source datatype
hid_t dst_idIN: Identifier of destination datatype
H5T_conv_t func    IN: Function to convert between source and destination datatypes

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5Tregister

 H5T_REGISTER registers a hard or soft conversion function for a datatype conversion path.

The parameter type indicates whether a conversion function is hard (H5T_PERS_HARD) or soft (H5T_PERS_SOFT). User-defined functions employing compiler casting are designated as hard; other user-defined conversion functions registered with the HDF5

Library (with H5Tregister

library (with H5T_REGISTER ) are designated as soft. The HDF5

Library

library also has its own hard and soft conversion functions.

A conversion path can have only one hard function. When type is H5T_PERS_HARD, func replaces any previous hard function.

When type is H5T_PERS_SOFT, 

H5Tregister H5Pset

H5T_REGISTER 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.

The name is used only for debugging and should be a short identifier for the function.

The path is specified by the source and destination datatypes src_id and dst_id. For soft conversion functions, only the class of these types is important.

The type of the conversion function pointer is declared as:

typedef herr_t (*H5T_conv_t) (hid_t src_id, 
                              hid_t dst_id, 
                              H5T_cdata_t *cdata,
                              size_t nelmts, 
                              size_t buf_stride, 
                              size_t bkg_stride, 
                              void *buf, 
                              void *bkg,
                              hid_t dset_xfer_plist)

The H5T_cdata_t struct is declared as:

typedef struct *H5T_cdata_t (H5T_cmd_t command, 
                             H5T_bkg_t need_bkg, 
                             hbool_t *recalc,
                             void *priv)

 

Note

Programming Note for C++ Developers Using C Functions:

If a C routine that takes a function pointer as an argument is called from within C++ code, the C routine should be returned from normally.

Examples of this kind of routine include callbacks such as

 

H5P_

elink

SET_

cb

ELINK_CB and 

H5Pset

 H5P_

type

SET_

conv_cb 

TYPE_CONV_CB and functions such as H5T_CONVERT 

H5Tconvert

 and

 H5Ewalk2

H5E_WALK2.

Exiting the routine in its normal fashion allows the HDF5 C

Library

library to clean up its work properly. In other words, if the C++ application jumps out of the routine back to the C++ “catch” statement, the library is not given the opportunity to close any temporary data structures that were set up when the routine was called. The C++ application should save some state as the routine is started so that any problem that occurs might be diagnosed.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Returns a non-negative value if successful; otherwise returns a negative value.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming Soon!

Comment (Hide)
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    

C

Change
1.6.3The following change occurred in the H5Tconv_t function:
   nelmts parameter type changed to size_t.