|
Mantid
|
A wrapper class for managing HDF5 object handles (hid_t). More...
#include <UniqueID.h>
Public Member Functions | |
| UniqueID< D > & | operator= (hid_t const) |
| Assign a HDF5 object ID to be managed. | |
| UniqueID< D > & | operator= (UniqueID< D > &&) |
| Pass the HDF5 object ID from an existing UniqueID to another UniqueID. | |
| hid_t | release () |
| Release hold on the managed ID; it will not be closed by this UniqueID. | |
| void | reset () |
| void | reset (hid_t const) |
| Close the existing ID and replace with the new ID; or, set to invalid. | |
| void | reset (UniqueID< D > &&) |
| Close the existing ID and replace with the new ID; or, set to invalid. | |
| void | reset (UniqueID< D > const &)=delete |
| UniqueID () | |
| UniqueID (hid_t const id) | |
| UniqueID (UniqueID< D > &&uid) noexcept | |
| ~UniqueID () | |
Public Member Functions inherited from Mantid::Nexus::Hdf5ID< D > | |
| hid_t | get () const |
| Return the managed HDF5 handle. | |
| Hdf5ID () noexcept | |
| Hdf5ID (hid_t const id) noexcept | |
| bool | isValid () const |
| Return whether the UniqueId corresponds to a valid HDF5 object. | |
| operator hid_t () const | |
| bool | operator!= (hid_t const id) const |
| bool | operator< (hid_t const id) const |
| bool | operator<= (hid_t const id) const |
| bool | operator== (hid_t const id) const |
Private Member Functions | |
| UniqueID & | operator= (UniqueID< D > const &)=delete |
| UniqueID (UniqueID< D > const &)=delete | |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::Nexus::Hdf5ID< D > | |
| void | close () |
| Close the held object ID. | |
| void | close () |
| Close a held file ID, and also call garbage collection. | |
Protected Attributes inherited from Mantid::Nexus::Hdf5ID< D > | |
| hid_t | m_id |
A wrapper class for managing HDF5 object handles (hid_t).
The UniqueID class is designed to manage the lifecycle of HDF5 object handles (hid_t), ensuring that the handle is properly closed when the UniqueID object is destroyed. This helps prevent resource leaks and ensures proper cleanup of HDF5 resources.
Definition at line 92 of file UniqueID.h.
|
privatedelete |
|
inline |
Definition at line 100 of file UniqueID.h.
|
inline |
Definition at line 101 of file UniqueID.h.
|
inlinenoexcept |
Definition at line 102 of file UniqueID.h.
References Mantid::Nexus::INVALID_HID, and Mantid::Nexus::Hdf5ID< D >::m_id.
|
inline |
Definition at line 103 of file UniqueID.h.
References Mantid::Nexus::Hdf5ID< D >::close().
|
inline |
Assign a HDF5 object ID to be managed.
| id | : the ID to be managed |
Definition at line 144 of file UniqueID.h.
|
inline |
Pass the HDF5 object ID from an existing UniqueID to another UniqueID.
| uid | : the UniqueID previously managing the ID; it will lose ownership of the ID. |
Definition at line 151 of file UniqueID.h.
|
privatedelete |
|
inline |
Release hold on the managed ID; it will not be closed by this UniqueID.
Definition at line 118 of file UniqueID.h.
References Mantid::Nexus::INVALID_HID, and tmp.
|
inline |
Definition at line 109 of file UniqueID.h.
References Mantid::Nexus::INVALID_HID, and Mantid::Nexus::UniqueID< D >::reset().
Referenced by Mantid::Nexus::H5Util::copyGroup(), Mantid::Nexus::H5Util::isHdf5(), and Mantid::Nexus::UniqueID< D >::reset().
|
inline |
Close the existing ID and replace with the new ID; or, set to invalid.
| id | The new ID to be held; defaults to invalid |
Definition at line 126 of file UniqueID.h.
|
inline |
Close the existing ID and replace with the new ID; or, set to invalid.
Definition at line 135 of file UniqueID.h.
References Mantid::Nexus::INVALID_HID.
|
delete |