Field3D

Scoped object - creates a dataspace on creation and closes it on destruction. More...

#include <Hdf5Util.h>

Inheritance diagram for Hdf5Util::H5ScopedScreate:
Hdf5Util::H5Base

Public Member Functions

void create (H5S_class_t type)
 
 H5ScopedScreate ()
 
 H5ScopedScreate (H5S_class_t type)
 
 ~H5ScopedScreate ()
 
- 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 - creates a dataspace on creation and closes it on destruction.

Definition at line 234 of file Hdf5Util.h.

Constructor & Destructor Documentation

◆ H5ScopedScreate() [1/2]

Hdf5Util::H5ScopedScreate::H5ScopedScreate ( )
inline

Definition at line 237 of file Hdf5Util.h.

238  : H5Base()
239  {
240  // Empty
241  }

◆ H5ScopedScreate() [2/2]

Hdf5Util::H5ScopedScreate::H5ScopedScreate ( H5S_class_t  type)
inline

Definition at line 242 of file Hdf5Util.h.

243  {
244  create(type);
245  }

References create().

◆ ~H5ScopedScreate()

Hdf5Util::H5ScopedScreate::~H5ScopedScreate ( )
inline

Definition at line 251 of file Hdf5Util.h.

252  {
253  GlobalLock lock(g_hdf5Mutex);
254  if (m_id >= 0)
255  H5Sclose(m_id);
256  }

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

Member Function Documentation

◆ create()

void Hdf5Util::H5ScopedScreate::create ( H5S_class_t  type)
inline

Definition at line 246 of file Hdf5Util.h.

247  {
248  GlobalLock lock(g_hdf5Mutex);
249  m_id = H5Screate(type);
250  }

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

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


The documentation for this class was generated from the following file:
Hdf5Util::H5ScopedScreate::create
void create(H5S_class_t type)
Definition: Hdf5Util.h:246
Hdf5Util::H5Base::H5Base
H5Base()
Definition: Hdf5Util.h:96
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