VTK  9.3.0
Namespaces | Macros | Functions
vtkHDF5ScopedHandle.h File Reference

Go to the source code of this file.

Namespaces

namespace  vtkHDF
 

Macros

#define DefineScopedHandle(name)
 RAII class for automatically closing H5 handles.
 

Functions

 vtkHDF::DefineScopedHandle (A)
 
 vtkHDF::DefineScopedHandle (D)
 
 vtkHDF::DefineScopedHandle (F)
 
 vtkHDF::DefineScopedHandle (G)
 
 vtkHDF::DefineScopedHandle (S)
 
 vtkHDF::DefineScopedHandle (T)
 

Macro Definition Documentation

◆ 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; \
};
@ name
Definition vtkX3D.h:219

RAII class for automatically closing H5 handles.

Definition at line 13 of file vtkHDF5ScopedHandle.h.