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

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

`#include <Hdf5Util.h>`

Inheritance diagram for Hdf5Util::H5ScopedGopen:

## Public Member Functions

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

Definition at line 194 of file Hdf5Util.h.

## Constructor & Destructor Documentation

## H5ScopedGopen() [1/3]

Hdf5Util::H5ScopedGopen::H5ScopedGopen | ( |  | ) |

inline

Definition at line 197 of file Hdf5Util.h.

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

References Hdf5Util::H5Base::H5Base().

## H5ScopedGopen() [2/3]

Hdf5Util::H5ScopedGopen::H5ScopedGopen | ( | hid_t | parentLocation,
|  | const std::string & | name )

inline

Definition at line 202 of file Hdf5Util.h.

{
open(parentLocation, name);
}
Hdf5Util::H5ScopedGopen::open
void open(hid_t parentLocation, const std::string &name)
Definition Hdf5Util.h:210

References open().

## H5ScopedGopen() [3/3]

Hdf5Util::H5ScopedGopen::H5ScopedGopen | ( | hid_t | parentLocation,
|  | const std::string & | name,
|  | hid_t | gapl_id )

inline

Definition at line 206 of file Hdf5Util.h.

{
open(parentLocation, name, gapl_id);
}

References open().

## ~H5ScopedGopen()

Hdf5Util::H5ScopedGopen::~H5ScopedGopen | ( |  | ) |

inline

Definition at line 221 of file Hdf5Util.h.

{
GlobalLock lock(g_hdf5Mutex);
if (m_id >= 0)
H5Gclose(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() [1/2]

void Hdf5Util::H5ScopedGopen::open | ( | hid_t | parentLocation,
|  | const std::string & | name )

inline

Definition at line 210 of file Hdf5Util.h.

{
GlobalLock lock(g_hdf5Mutex);
m_id = H5Gopen(parentLocation, name.c_str(), H5P_DEFAULT);
}

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

Referenced by H5ScopedGopen(), and H5ScopedGopen().

## open() [2/2]

void Hdf5Util::H5ScopedGopen::open | ( | hid_t | parentLocation,
|  | const std::string & | name,
|  | hid_t | gapl_id )

inline

Definition at line 215 of file Hdf5Util.h.

{
GlobalLock lock(g_hdf5Mutex);
m_id = H5Gopen(parentLocation, name.c_str(), gapl_id);
}

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

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

- export/Hdf5Util.h