mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
* Consolidate documentation under doc/ directory
Move user-facing guides from release_docs/ and doxygen/ into a single
doc/ root. release_docs/ now holds only release artifacts (changelogs,
history, release process, maintainer info).
- git mv release_docs/INSTALL*.md, USING_*.md, README_HPC.md,
BuildSystemNotes.md, AutotoolsToCMakeOptions.md,
HDF5_Library_2.0.0_Migration_Guide.md → doc/
- git mv doxygen/ → doc/doxygen/
- Update CMakeLists.txt: HDF5_DOXYGEN_DIR and add_subdirectory path
- Update CMakeInstallation.cmake: all install paths for moved files
- Update bin/make_vers: hardcoded doxygen/ path substitution
- Update doc/doxygen/CMakeLists.txt: EXAMPLES_DIRECTORY and comments
- Update README.md, CONTRIBUTING.md, SECURITY.md, config/README.md,
release_docs/RELEASE_PROCESS.md: links to moved files
- Update doxygen .dox files: release_docs/ URLs for moved guides
- Rewrite release_docs/README.md for narrowed scope
* Add HDF5_DOCS_DIR variable for doc/ root path
Introduce HDF5_DOCS_DIR = \${HDF5_SOURCE_DIR}/doc so that
CMakeInstallation.cmake and future callers reference the doc/
directory symbolically rather than by hardcoded path.
HDF5_DOXYGEN_DIR is now derived from HDF5_DOCS_DIR.
42 lines
1.0 KiB
C
42 lines
1.0 KiB
C
hid_t file_id, fapl_id;
|
|
hid_t dataset_id, dapl_id;
|
|
unsigned counter;
|
|
|
|
/* Create a copy of the file access property list */
|
|
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
|
|
|
|
/* Set up the object flush property values */
|
|
/* flush_cb: callback function to invoke when an object flushes (see below) */
|
|
/* counter: user data to pass along to the callback function */
|
|
H5Pset_object_flush_cb(fapl_id, flush_cb, &counter);
|
|
|
|
/* Open the file */
|
|
file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
|
|
|
|
/* Create a group */
|
|
gid = H5Gcreate2(fid, “group”, H5P_DEFAULT, H5P_DEFAULT_H5P_DEFAULT);
|
|
|
|
/* Open a dataset */
|
|
dataset_id = H5Dopen2(file_id, DATASET, H5P_DEFAULT);
|
|
|
|
/* The flush will invoke flush_cb() with counter */
|
|
H5Dflush(dataset_id);
|
|
/* counter will be equal to 1 */
|
|
|
|
/* ... */
|
|
|
|
/* The flush will invoke flush_cb() with counter */
|
|
H5Gflush(gid);
|
|
/* counter will be equal to 2 */
|
|
|
|
/* ... */
|
|
|
|
/* The callback function for object flush property */
|
|
static herr_t
|
|
flush_cb(hid_t obj_id, void *_udata)
|
|
{
|
|
unsigned *flush_ct = (unsigned *)_udata;
|
|
++(*flush_ct);
|
|
return 0;
|
|
}
|