9 #ifndef RMF_HDF5__HANDLE_H
10 #define RMF_HDF5__HANDLE_H
12 #include "RMF/config.h"
21 #include <boost/utility.hpp>
40 class RMFEXPORT
Handle :
public boost::noncopyable {
48 Message(std::string(
"Invalid handle returned from ") + operation),
52 Handle() : h_(-1), f_(
nullptr) {}
53 hid_t get_hid()
const {
54 RMF_USAGE_CHECK(h_ >= 0,
"Uninitialized handle used.");
57 operator hid_t()
const {
return h_; }
58 bool get_is_open()
const {
return h_ != -1; }
64 RMF_USAGE_CHECK(h_ >= 0,
"Invalid handle returned");
75 #if defined(__clang__) && __clang_major__ <= 7
78 ~
Handle() noexcept(
false) {
90 :
Handle(h, f, operation) {}
Various general useful macros for IMP.
Make sure an HDF5 handle is released.
Declarations of the various exception types.
herr_t(* HDF5CloseFunction)(hid_t)
The signature for the HDF5 close functions.
Include all non-deprecated headers in RMF.HDF5.