Discovering what is in an HDF5 file
HDFView and h5dump are standalone tools which cannot be called within an application, and using H5Dopen and H5Dread require that you know the name of the HDF5 dataset. How would an application that has no prior knowledge of an HDF5 file be able to determine or discover the contents of it, much like HDFView and h5dump?
Interface routines that simplify the process:
H5L_ITERATEITERATE1 traverses the links in a specified group, in the order of the specified index, using a user-defined callback routine. (A callback function is one that will be called when a certain condition is met, at a certain point in the future.)
- H5O_VISIT / H5L_VISITVISIT1 recursively visit all objects/links accessible from a specified object/group.
Using H5Literate, H5Lvisit and H5Ovisit:
Under HDF5 Examples you will find the examples By API, where examples of using H5Literate and H5Ovisit/H5Lvisit are included.