A somewhat smart HDF5 handle. More...
#include <H5Utils.hpp>
Public Member Functions | |
H5Handle () | |
H5Handle (const H5Handle &)=delete | |
H5Handle & | operator= (const H5Handle &)=delete |
hid_t & | operator= (const hid_t &hand) |
Assignment from a basic hdf5 handle. More... | |
operator hid_t () | |
Conversion operator. More... | |
herr_t | close () |
Close the handle. More... | |
~H5Handle () | |
Destructor. Calls the close function. More... | |
Protected Attributes | |
hid_t | _hand {0} |
The underlying handle. More... | |
A somewhat smart HDF5 handle.
Makes sure that the associated hdf5 library resources are closed when out of scope. Does not do reference counting, so copy and assignment are deleted. Assignment operator from hid_t is the only way to set the handle, and the hid_t conversion operator allows this to be passed directly to hdf5 library functions.
T | is one of the handle types. |
Definition at line 69 of file H5Utils.hpp.
|
inline |
Definition at line 76 of file H5Utils.hpp.
|
delete |
|
inline |
Destructor. Calls the close function.
Definition at line 119 of file H5Utils.hpp.
|
inline |
Close the handle.
Calls the close function of the handle type T
Definition at line 107 of file H5Utils.hpp.
Referenced by MagAOX::utils::H5Handle< T >::~H5Handle(), and MagAOX::utils::H5Handle< T >::operator=().
|
inline |
Conversion operator.
Definition at line 99 of file H5Utils.hpp.
|
delete |
|
inline |
Assignment from a basic hdf5 handle.
Note that if the handle has already been assigned, then it is closed first.
[in] | hand | the basic handle |
Definition at line 89 of file H5Utils.hpp.
|
protected |
The underlying handle.
Definition at line 72 of file H5Utils.hpp.
Referenced by MagAOX::utils::H5Handle< T >::close(), MagAOX::utils::H5Handle< T >::operator hid_t(), and MagAOX::utils::H5Handle< T >::operator=().