Hdf5Util::H5ScopedDget_type Class Reference
Classes and functions used to implement this library » Hdf5 Utility Classes and Functions

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

`#include <Hdf5Util.h>`

Inheritance diagram for Hdf5Util::H5ScopedDget_type:

## Public Member Functions

| H5ScopedDget_type ()
| H5ScopedDget_type (hid_t dataset_id)
void | open (hid_t dataset_id)
| ~H5ScopedDget_type ()
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 416 of file Hdf5Util.h.

## Constructor & Destructor Documentation

## H5ScopedDget_type() [1/2]

Hdf5Util::H5ScopedDget_type::H5ScopedDget_type | ( |  | ) |

inline

Definition at line 419 of file Hdf5Util.h.

: H5Base()
{
// Empty
}
Hdf5Util::H5Base::H5Base
H5Base()
Definition Hdf5Util.h:96

References Hdf5Util::H5Base::H5Base().

## H5ScopedDget_type() [2/2]

Hdf5Util::H5ScopedDget_type::H5ScopedDget_type | ( | hid_t | dataset_id | ) |

inline

Definition at line 424 of file Hdf5Util.h.

{
open(dataset_id);
}
Hdf5Util::H5ScopedDget_type::open
void open(hid_t dataset_id)
Definition Hdf5Util.h:428

References open().

## ~H5ScopedDget_type()

Hdf5Util::H5ScopedDget_type::~H5ScopedDget_type | ( |  | ) |

inline

Definition at line 433 of file Hdf5Util.h.

{
GlobalLock lock(g_hdf5Mutex);
if (m_id >= 0)
H5Tclose(m_id);
}
g_hdf5Mutex
FIELD3D_NAMESPACE_OPEN FIELD3D_API boost::recursive_mutex g_hdf5Mutex
Definition Hdf5Util.cpp:67
GlobalLock
boost::recursive_mutex::scoped_lock GlobalLock
Definition Hdf5Util.h:78
Hdf5Util::H5Base::m_id
hid_t m_id
Definition Hdf5Util.h:106

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

## Member Function Documentation

## open()

void Hdf5Util::H5ScopedDget_type::open | ( | hid_t | dataset_id | ) |

inline

Definition at line 428 of file Hdf5Util.h.

{
GlobalLock lock(g_hdf5Mutex);
m_id = H5Dget_type(dataset_id);
}

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

Referenced by H5ScopedDget_type(), SparseDataReader< Data_T >::readBlock(), and SparseDataReader< Data_T >::readBlockList().

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

- export/Hdf5Util.h