Field3D
Hdf5Util::H5ScopedGcreate Class Reference

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

#include <Hdf5Util.h>

Inheritance diagram for Hdf5Util::H5ScopedGcreate:
Hdf5Util::H5Base

Public Member Functions

 H5ScopedGcreate (hid_t parentLocation, const std::string &name)
 
 H5ScopedGcreate (hid_t parentLocation, const std::string &name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id)
 
 ~H5ScopedGcreate ()
 
- 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 - creates a group on creation and closes it on destruction.

Definition at line 150 of file Hdf5Util.h.

Constructor & Destructor Documentation

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

Definition at line 153 of file Hdf5Util.h.

References Hdf5Util::H5Base::m_id.

{
m_id = H5Gcreate(parentLocation, name.c_str(),
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
Hdf5Util::H5ScopedGcreate::H5ScopedGcreate ( hid_t  parentLocation,
const std::string &  name,
hid_t  lcpl_id,
hid_t  gcpl_id,
hid_t  gapl_id 
)
inline

Definition at line 158 of file Hdf5Util.h.

References Hdf5Util::H5Base::m_id.

{
m_id = H5Gcreate(parentLocation, name.c_str(),
lcpl_id, gcpl_id, gapl_id);
}
Hdf5Util::H5ScopedGcreate::~H5ScopedGcreate ( )
inline

Definition at line 165 of file Hdf5Util.h.

References Hdf5Util::H5Base::m_id.

{
if (m_id >= 0)
H5Gclose(m_id);
}

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