Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Types | Public Member Functions | List of all members
alsfvm::io::HDF5Resource Class Reference

The HDF5Resource class is a unique_ptr for hdf5 resources. More...

#include <alsfvm/io/hdf5_utils.hpp>

Public Types

typedef herr_t(* delete_function) (hid_t)
 

Public Member Functions

 HDF5Resource (hid_t hdf5Resource, delete_function deleter)
 HDF5Resource constructs a new HDF5Resource. More...
 
 ~HDF5Resource () noexcept(false)
 
hid_t hid ()
 

Detailed Description

The HDF5Resource class is a unique_ptr for hdf5 resources.

Member Typedef Documentation

◆ delete_function

typedef herr_t(* alsfvm::io::HDF5Resource::delete_function) (hid_t)

Constructor & Destructor Documentation

◆ HDF5Resource()

alsfvm::io::HDF5Resource::HDF5Resource ( hid_t  hdf5Resource,
delete_function  deleter 
)
inline

HDF5Resource constructs a new HDF5Resource.

Example usage

HDF5Resource file(H5fopen("file.h5")), H5Fclose);
// do something with file.hid()
// deletes when file goes out of scope automatically
Parameters
hdf5Resourcethe hdf5 id to store (obtained from say H5Fopen
deleterthe deleter function (eg. H5Fclose)

◆ ~HDF5Resource()

alsfvm::io::HDF5Resource::~HDF5Resource ( )
inlinenoexcept

Member Function Documentation

◆ hid()

hid_t alsfvm::io::HDF5Resource::hid ( )
inline

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