Field3D

Scoped object - opens an attribute data type on creation and closes it on destruction. More...

#include <Hdf5Util.h>

Inheritance diagram for Hdf5Util::H5ScopedAget_type:
Hdf5Util::H5Base

Public Member Functions

 H5ScopedAget_type (hid_t dataset_id)
 
 ~H5ScopedAget_type ()
 
- Public Member Functions inherited from Hdf5Util::H5Base
 H5Base ()
 
hid_t id () const
 Query the hid_t value. More...
 
 operator hid_t ()
 Implicit cast to hid_t. More...
 

Additional Inherited Members

- Protected Attributes inherited from Hdf5Util::H5Base
hid_t m_id
 

Detailed Description

Scoped object - opens an attribute data type on creation and closes it on destruction.

Definition at line 310 of file Hdf5Util.h.

Constructor & Destructor Documentation

Hdf5Util::H5ScopedAget_type::H5ScopedAget_type ( hid_t  dataset_id)
inline

Definition at line 313 of file Hdf5Util.h.

References g_hdf5Mutex, and Hdf5Util::H5Base::m_id.

314  {
315  GlobalLock lock(g_hdf5Mutex);
316  m_id = H5Aget_type(dataset_id);
317  if (m_id < 0)
318  throw Exc::AttrGetTypeException("Couldn't get attribute type");
319  }
boost::recursive_mutex::scoped_lock GlobalLock
Definition: Hdf5Util.h:78
FIELD3D_NAMESPACE_OPEN FIELD3D_API boost::recursive_mutex g_hdf5Mutex
Definition: Hdf5Util.cpp:67
Hdf5Util::H5ScopedAget_type::~H5ScopedAget_type ( )
inline

Definition at line 320 of file Hdf5Util.h.

References g_hdf5Mutex, and Hdf5Util::H5Base::m_id.

321  {
322  GlobalLock lock(g_hdf5Mutex);
323  if (m_id >= 0)
324  H5Tclose(m_id);
325  }
boost::recursive_mutex::scoped_lock GlobalLock
Definition: Hdf5Util.h:78
FIELD3D_NAMESPACE_OPEN FIELD3D_API boost::recursive_mutex g_hdf5Mutex
Definition: Hdf5Util.cpp:67

The documentation for this class was generated from the following file: