Field3D

Scoped object - Opens attribute by index and closes it on destruction. More...

#include <Hdf5Util.h>

Inheritance diagram for Hdf5Util::H5ScopedAopenIdx:
Hdf5Util::H5Base

Public Member Functions

 H5ScopedAopenIdx (hid_t location, unsigned idx)
 
 ~H5ScopedAopenIdx ()
 
- Public Member Functions inherited from Hdf5Util::H5Base
 H5Base ()
 
hid_t id () const
 Query the hid_t value.
 
 operator hid_t ()
 Implicit cast to hid_t.
 

Additional Inherited Members

- Protected Attributes inherited from Hdf5Util::H5Base
hid_t m_id
 

Detailed Description

Scoped object - Opens attribute by index and closes it on destruction.

Definition at line 142 of file Hdf5Util.h.

Constructor & Destructor Documentation

◆ H5ScopedAopenIdx()

Hdf5Util::H5ScopedAopenIdx::H5ScopedAopenIdx ( hid_t location,
unsigned idx )
inline

Definition at line 145 of file Hdf5Util.h.

146 {
148 m_id = H5Aopen_idx(location, idx);
149 if (m_id < 0)
150 throw Exc::MissingAttributeException("Couldn't open attribute at index: " +
151 boost::lexical_cast<std::string>(idx));
152 }
FIELD3D_NAMESPACE_OPEN FIELD3D_API boost::recursive_mutex g_hdf5Mutex
Definition Hdf5Util.cpp:67
boost::recursive_mutex::scoped_lock GlobalLock
Definition Hdf5Util.h:78

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

◆ ~H5ScopedAopenIdx()

Hdf5Util::H5ScopedAopenIdx::~H5ScopedAopenIdx ( )
inline

Definition at line 153 of file Hdf5Util.h.

154 {
156 if (m_id >= 0)
157 H5Aclose(m_id);
158 }

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


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