Field3D

Scoped object - opens a dataset on creation and closes it on destruction. More...

#include <Hdf5Util.h>

Inheritance diagram for Hdf5Util::H5ScopedDopen:
Hdf5Util::H5Base

Public Member Functions

 H5ScopedDopen ()
 
 H5ScopedDopen (hid_t parentLocation, const std::string &name, hid_t dapl_id)
 
void open (hid_t parentLocation, const std::string &name, hid_t dapl_id)
 
 ~H5ScopedDopen ()
 
- 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 a dataset on creation and closes it on destruction.

Definition at line 356 of file Hdf5Util.h.

Constructor & Destructor Documentation

◆ H5ScopedDopen() [1/2]

Hdf5Util::H5ScopedDopen::H5ScopedDopen ( )
inline

Definition at line 359 of file Hdf5Util.h.

360 : H5Base()
361 {
362 // Empty
363 }

◆ H5ScopedDopen() [2/2]

Hdf5Util::H5ScopedDopen::H5ScopedDopen ( hid_t parentLocation,
const std::string & name,
hid_t dapl_id )
inline

Definition at line 364 of file Hdf5Util.h.

365 {
367 }
#define FIELD3D_MTX_T
Definition StdMathLib.h:99
void open(hid_t parentLocation, const std::string &name, hid_t dapl_id)
Definition Hdf5Util.h:368

References FIELD3D_MTX_T, and open().

◆ ~H5ScopedDopen()

Hdf5Util::H5ScopedDopen::~H5ScopedDopen ( )
inline

Definition at line 373 of file Hdf5Util.h.

374 {
376 if (m_id >= 0) {
377 H5Dclose(m_id);
378 }
379 }
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 FIELD3D_MTX_T, g_hdf5Mutex, and Hdf5Util::H5Base::m_id.

Member Function Documentation

◆ open()

void Hdf5Util::H5ScopedDopen::open ( hid_t parentLocation,
const std::string & name,
hid_t dapl_id )
inline

Definition at line 368 of file Hdf5Util.h.

369 {
371 m_id = H5Dopen(parentLocation, name.c_str(), dapl_id);
372 }

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

Referenced by H5ScopedDopen().


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