#include <Hdf5Resource.h>

Public Member Functions | |
| Hdf5FileResource (const std::string &filename, unsigned flags=H5F_ACC_RDONLY, hid_t access=H5P_DEFAULT) | |
| Hdf5FileResource (hid_t file) | |
| Hdf5FileResource () | |
| operator hid_t * () | |
This is a Resource class that opens and closes HDF5 files. It has a conversion operator to allow a Hdf5FileResource object to be used where ever a hid_t that represents an open HDF5 File Handle may be used.
Example of Usage:
Hdf5FileResource pFile("c:/data/a.h5"); // open for read-only access Hdf5FileResource pFile2("c:/data/b.h5", H5F_ACC_CREAT | H5F_ACC_RDWR); // create and open for read/write Hdf5FileResource pFile3("c:/data/c.h5", H5F_ACC_RDWR); // open for read/write access
Definition at line 148 of file Hdf5Resource.h.
| Hdf5FileResource::Hdf5FileResource | ( | const std::string & | filename, | |
| unsigned | flags = H5F_ACC_RDONLY, |
|||
| hid_t | access = H5P_DEFAULT | |||
| ) |
Constructs a Resource object that wraps a hid_t HDF5 File Handle.
Opens the specified file using the specified access modes. The two arguments will ultimately be passed unmodified to H5Fopen.
| filename | The name of the file to open. | |
| flags | The access mode to open the file with. These match the modes used with H5Fopen. | |
| access | How to open the file. Most users will never need to provide this option. See the HDF5 documentation for details. |
Definition at line 167 of file Hdf5Resource.h.
| Hdf5FileResource::Hdf5FileResource | ( | hid_t | file | ) |
Constructs a Resource object that wraps a hid_t HDF5 File Handle.
This will take ownership of an existing hid_t file handle and will ensure that it is closed.
| file | The HDF5 file handle. |
Definition at line 181 of file Hdf5Resource.h.
| Hdf5FileResource::Hdf5FileResource | ( | ) |
| Hdf5FileResource::operator hid_t * | ( | ) |
Returns a pointer to the underlying hid_t returned by H5Fopen.
Returns a pointer to the underlying hid_t. This operator, used in conjunction with the dereferencing operator, allows the Hdf5FileResource object to be used where ever a hid_t would normally be used.
Definition at line 204 of file Hdf5Resource.h.