3#include "MantidNexus/DllConfig.h"
10#define MYH5DLL __declspec(dllimport)
29template <herr_t (*const D)(h
id_t)>
class UniqueID {
52 bool operator<(
int const id)
const {
return static_cast<int>(
m_id) <
id; }
85 this->m_id = INVALID_ID;
93 this->m_id = INVALID_ID;
128 uid.m_id = INVALID_ID;
int64_t hid_t
This class defines data types which are used as part of the Nexus API.
MYH5DLL herr_t H5Fclose(hid_t)
MYH5DLL herr_t H5Iis_valid(hid_t)
MYH5DLL herr_t H5garbage_collect()
A wrapper class for managing HDF5 object handles (hid_t).
hid_t release()
Release hold on the managed ID; it will not be closed by this UniqueID.
void reset(hid_t const id=INVALID_ID)
Close the existing ID and replace with the new ID; or, set to invalid.
bool operator==(int const id) const
hid_t get() const
Return the managed HDF5 handle.
static hid_t constexpr INVALID_ID
represents an invalid ID value
bool isValid() const
Return whether the UniqueId corresponds to a valid HDF5 object.
UniqueID(UniqueID< D > &&uid) noexcept
bool operator<(int const id) const
bool operator<=(int const id) const
UniqueID(UniqueID< D > const &uid)=delete
UniqueID & operator=(UniqueID< D > const &)=delete
void close()
Close the held ID by calling its deleter function.
Header for a base Nexus::Exception.