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

Sets the access flags and file access property list used to open the specified external link target

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Hdf rm anchor
AnchorNamesignature

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">typedef herr_t (*H5L_elink_traverse_t)(
            const char *parent_file_name,
            const char *parent_group_name,
            const char *child_file_name,
            const char *child_object_name,
            unsigned *acc_flags,
            hid_t fapl_id,
            void *op_data
        )

  </code></pre>
Comment
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">Replace this text with the Fortran function signature</code></pre>

Hdf rm anchor
AnchorNameparameters

HTML Wrap
classhdf-rm-section
const char *parent_file_nameIN: Name of the file containing the external link
const char *parent_group_nameIN: Name of the group containing the exernal link
const char *child_file_nameIN: Name of the external link target file
const char *child_object_nameIN: Name of the external link target object
unsigned *acc_flagsIN/OUT: File access flags used to open the target file. This should be set to either H5F_ACC_RDWR or H5F_ACC_RDONLY. The initial value of this field will be the flags that would otherwise be used to open the target file as inherited from the parent file or as overridden with H5Pset_elink_acc_flags. After making the callback, the flags returned in this parameter will always be used to open the target file.
hid_t fapl_idIN/OUT: Identifier of the file access property list used to open the target file. This will initially be a copy of the property list that would otherwise be used to open the target file, as inherited from the parent file or as overridden with H5Pset_elink_fapl. After making the callback, this property list, including any changes made by the callback function, will always be used to open the target file.
void *op_dataIN/OUT: Pointer to user-defined input data. This is a pass-through of the data that was passed to H5Pset_elink_cb.

Hdf rm anchor
AnchorNamedescription

HTML Wrap
classhdf-rm-section

H5L_elink_traverse_t defines the prototype for a user-defined callback function to be called when traversing an external link. This callback will be executed by the HDF5 Library immediately before opening the target file and provides a mechanism to set specific access permissions, modify the file access property list, modify the parent or target file, or take any other user-defined action. This callback function is used in situations where the HDF5 Library's default behavior is not suitable.

HTML Wrap
classhdf-rm-section

H5L_elink_traverse_t defines a callback function which may adjust the file access property list and file access flag to use when opening a file through an external link.

The callback is set with H5P_SET_ELINK_CB but will be executed by the HDF5 Library immediately before opening the target file via an external link.

The callback function should return 0 if there are no issues and a negative value in case of an error. If the callback function returns a negative value, the external link will not be traversed and an error will be returned.

Hdf rm anchor
AnchorNamereturns

HTML Wrap
classhdf-rm-section

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

HTML Wrap
classhdf-rm-section

H5L_elink_traverse_t failure modes are dependent on the implementation of the callback function.

Hdf rm anchor
AnchorNameexample

HTML Wrap
classhdf-rm-section

This example defines a callback function that prints the name of the target file every time an external link is followed.

herr_t elink_callback(const char *parent_file_name, const char
        *parent_group_name, const char *child_file_name, const char
        *child_object_name, unsigned *acc_flags, hid_t fapl_id, void *op_data) {
    puts(child_file_name);
    return 0;
}

 

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

HTML Wrap
classhdf-rm-section
Release    Change
1.8.3C function type introduced in this release.