Field3D

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

#include <Hdf5Util.h>

Inheritance diagram for Hdf5Util::H5ScopedGopen:
Hdf5Util::H5Base

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. 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 a group on creation and closes it on destruction.

Definition at line 194 of file Hdf5Util.h.

Constructor & Destructor Documentation

Hdf5Util::H5ScopedGopen::H5ScopedGopen ( )
inline

Definition at line 197 of file Hdf5Util.h.

198  : H5Base()
199  {
200  // Empty
201  }
Hdf5Util::H5ScopedGopen::H5ScopedGopen ( hid_t  parentLocation,
const std::string &  name 
)
inline

Definition at line 202 of file Hdf5Util.h.

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

Definition at line 206 of file Hdf5Util.h.

207  {
208  open(parentLocation, name, gapl_id);
209  }
void open(hid_t parentLocation, const std::string &name)
Definition: Hdf5Util.h:210
Hdf5Util::H5ScopedGopen::~H5ScopedGopen ( )
inline

Definition at line 221 of file Hdf5Util.h.

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

222  {
223  GlobalLock lock(g_hdf5Mutex);
224  if (m_id >= 0)
225  H5Gclose(m_id);
226  }
boost::recursive_mutex::scoped_lock GlobalLock
Definition: Hdf5Util.h:78
FIELD3D_NAMESPACE_OPEN FIELD3D_API boost::recursive_mutex g_hdf5Mutex
Definition: Hdf5Util.cpp:67

Member Function Documentation

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

Definition at line 210 of file Hdf5Util.h.

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

Referenced by SparseFile::Reference< Data_T >::openFile(), and SparseFile::Reference< Data_T >::operator=().

211  {
212  GlobalLock lock(g_hdf5Mutex);
213  m_id = H5Gopen(parentLocation, name.c_str(), H5P_DEFAULT);
214  }
boost::recursive_mutex::scoped_lock GlobalLock
Definition: Hdf5Util.h:78
FIELD3D_NAMESPACE_OPEN FIELD3D_API boost::recursive_mutex g_hdf5Mutex
Definition: Hdf5Util.cpp:67
void Hdf5Util::H5ScopedGopen::open ( hid_t  parentLocation,
const std::string &  name,
hid_t  gapl_id 
)
inline

Definition at line 215 of file Hdf5Util.h.

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

216  {
217  GlobalLock lock(g_hdf5Mutex);
218  m_id = H5Gopen(parentLocation, name.c_str(), gapl_id);
219  }
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: