Go to the source code of this file.
◆ DefineScopedHandle
#define DefineScopedHandle |
( |
|
name | ) |
|
Value: class ScopedH5##name##Handle \
{ \
public: \
ScopedH5##name##Handle(const ScopedH5##name##Handle& other) { this->Handle = other.Handle; } \
ScopedH5##name##Handle(hid_t handle) \
: Handle(handle) \
{ \
} \
virtual ~ScopedH5##
name##Handle() \
{ \
if (this->Handle >= 0) \
{ \
H5##
name##close(this->Handle); \
} \
} \
\
operator hid_t() const { return this->Handle; } \
\
private: \
hid_t Handle; \
};
RAII class for automatically closing H5 handles.
Definition at line 13 of file vtkHDF5ScopedHandle.h.