QMCPACK
hdf_error_suppression Class Reference

class suppressing warnings from the HDF5 library More...

+ Collaboration diagram for hdf_error_suppression:

Public Member Functions

 hdf_error_suppression ()
 constructor More...
 
 hdf_error_suppression (const hdf_error_suppression &)=delete
 We don't want more than one instance at a time. More...
 
hdf_error_suppressionoperator= (const hdf_error_suppression &)=delete
 
 ~hdf_error_suppression ()
 destructor reset HDF5 error handling More...
 

Static Public Attributes

static bool enabled {false}
 status of hdf_error_suppression. An instance of this class changes enabled to true. More...
 

Private Attributes

H5E_auto2_t err_func
 error type More...
 
void * client_data {nullptr}
 error handling More...
 

Detailed Description

class suppressing warnings from the HDF5 library

Definition at line 22 of file hdf_error_suppression.h.

Constructor & Destructor Documentation

◆ hdf_error_suppression() [1/2]

constructor

Definition at line 26 of file hdf_error_suppression.h.

References hdf_error_suppression::client_data, hdf_error_suppression::enabled, and hdf_error_suppression::err_func.

27  {
28  H5Eget_auto2(H5E_DEFAULT, &err_func, &client_data);
29  H5Eset_auto2(H5E_DEFAULT, nullptr, nullptr);
30  enabled = true;
31  }
static bool enabled
status of hdf_error_suppression. An instance of this class changes enabled to true.

◆ hdf_error_suppression() [2/2]

We don't want more than one instance at a time.

◆ ~hdf_error_suppression()

~hdf_error_suppression ( )
inline

destructor reset HDF5 error handling

Definition at line 36 of file hdf_error_suppression.h.

References hdf_error_suppression::client_data, hdf_error_suppression::enabled, and hdf_error_suppression::err_func.

37  {
38  H5Eset_auto2(H5E_DEFAULT, err_func, client_data);
39  enabled = false;
40  }
static bool enabled
status of hdf_error_suppression. An instance of this class changes enabled to true.

Member Function Documentation

◆ operator=()

hdf_error_suppression& operator= ( const hdf_error_suppression )
delete

Member Data Documentation

◆ client_data

void* client_data {nullptr}
private

◆ enabled

bool enabled {false}
inlinestatic

status of hdf_error_suppression. An instance of this class changes enabled to true.

Definition at line 43 of file hdf_error_suppression.h.

Referenced by hdf_archive::hdf_archive(), hdf_error_suppression::hdf_error_suppression(), TEST_CASE(), and hdf_error_suppression::~hdf_error_suppression().

◆ err_func

H5E_auto2_t err_func
private

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