Page tree

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 permanent property with a property list class

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

HTML Wrap
classhdf-rm-section

 

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 H5Pregister(
                  hid_t class,
                  const char * name,
                  size_t size,
                  void * default,
                  H5P_prp_create_func_t create,
                  H5P_prp_set_func_t set,
                  H5P_prp_get_func_t get,
                  H5P_prp_delete_func_t delete,
                  H5P_prp_copy_func_t copy,
                  H5P_prp_close_func_t close )
            
    [1]
            </code></pre>
HTML
<pre><code class="language-c">herr_t H5Pregister(
                  hid_t class,
                  const char * name,
                  size_t size,
                  void * default,
                  H5P_prp_create_func_t create,
                  H5P_prp_set_func_t set,
                  H5P_prp_get_func_t get,
                  H5P_prp_delete_func_t delete,
                  H5P_prp_copy_func_t copy,
                  H5P_prp_compare_func_t compare,
                  H5P_prp_close_func_t close )
   [2]
</code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

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

HTML
<pre><code class="language-fortran">Fortran90 Interface: h5pregister_f

Signature:
  SUBROUTINE h5pregister_f(class, name, size, value, hdferr)
    INTEGER(HID_T)  , INTENT(IN)  :: class
    CHARACTER(LEN=*), INTENT(IN)  :: name
    INTEGER(SIZE_T) , INTENT(IN)  :: size
    TYPE            , INTENT(IN)  :: value
    INTEGER         , INTENT(OUT) :: hdferr  

Inputs:
  class  - Property list class identifier
  name   - Name of property to register
  size   - Size of the property value
  value  - Property value, supported types are:
             INTEGER
             REAL
             DOUBLE PRECISION
             CHARACTER(LEN=*)

Outputs:
  hdferr - Returns 0 if successful and -1 if fails


Fortran2003 Interface: h5pregister_f

Signature:
  SUBROUTINE h5pregister_f(class, name, size, value, hdferr)
    INTEGER(HID_T)  , INTENT(IN)  :: class
    CHARACTER(LEN=*), INTENT(IN)  :: name
    INTEGER(SIZE_T) , INTENT(IN)  :: size
    TYPE(C_PTR)     , INTENT(IN)  :: value
    INTEGER         , INTENT(OUT) :: hdferr  

Inputs:
  class  - Property list class identifier
  name   - Name of property to register
  size   - Size of the property value
  value  - Pointer to value to set the property to

Outputs:
  hdferr - Returns 0 if successful and -1 if fails
</code></pre>

Hdf rm anchor
AnchorNameparameters

 

Comment
Parameters:

 

HTML Wrap
classhdf-rm-section

Repalce this text with a description of the function's parameters.

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5P_REGISTER is a macro that is mapped to either H5P_REGISTER1 or H5P_REGISTER2, depending on the needs of the application.

Such macros are provided to facilitate application compatibility. For example:

  • The H5P_REGISTER macro will be mapped to H5P_REGISTER1 and will use the H5P_REGISTER1 syntax (first signature above) if an application is coded for HDF5 Release 1.6.x.
  • The H5P_REGISTER macro mapped to H5P_REGISTER2 and will use the H5P_REGISTER2 syntax (second signature above) if an application is coded for HDF5 Release 1.8.x.

When both the HDF5 library and the application are built and installed with no specific compatibility flags, H5P_REGISTER is mapped to the most recent version of the function, currently H5P_REGISTER2. If the library and/or application is compiled for Release 1.6 emulation, H5P_REGISTER will be mapped to H5P_REGISTER1. Function-specific flags are available to override these settings on a function-by-function basis when the application is compiled.

Specific compile-time compatibility flags and the resulting mappings are as follows:

Compatibility settingH5P_REGISTER mapping

Global settings
No compatibility flagH5P_REGISTER2 
Enable deprecated symbolsH5P_REGISTER2 
Disable deprecated symbolsH5P_REGISTER2 
Emulate Release 1.6 interfaceH5P_REGISTER1 

Function-level macros
H5Pregister_vers = 2    H5P_REGISTER2
H5Pregister_vers = 1

H5P_REGISTER1

For more information on macro use and mappings, see the API Compatibility Macros in HDF5 document.

 

Interface history:  

Signature [1] above is the original H5P_REGISTER interface and the only interface available prior to HDF5 Release 1.8.0. This signature and the corresponding function are now deprecated but will remain directly callable as H5P_REGISTER1.

Signature [2] above was introduced with HDF5 Release 1.8.0 and is the recommended and default interface. It is directly callable as H5P_REGISTER2.

See API Compatibility Macros in HDF5 for circumstances under which either of these functions might not be available in an installed instance of the HDF5 library.

 

Programming Note for C++ Developers Using C Functions:
HTML Wrap
classhdf-rm-section

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_SET_ELINK_CB and H5P_SET_TYPE_CCONV_CB and functions such as H5T_CONVERT and H5E_WALK2.

Exiting the routine in its normal fashion allows the HDF5 C 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

 

Comment
Returns:

 

HTML Wrap
classhdf-rm-section

Replace this text with a description of the function's return values.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming Soon!

Comment
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    Change
1.8.8Fortran updated to Fortran2003.
1.8.0The function C function H5P_REGISTER renamed to H5P_REGISTER1 and deprecated in this release.
C macro H5P_REGISTER and C function H5P_REGISTER2 introduced in this release.