Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::CheckOpenWriteHDF5Handles Class Reference

Public Member Functions

 CheckOpenWriteHDF5Handles (mhdf_FileHandle file, int line)
 
 ~CheckOpenWriteHDF5Handles ()
 

Private Attributes

int fileline
 
mhdf_FileHandle handle
 
int enter_count
 

Detailed Description

Definition at line 295 of file WriteHDF5.cpp.

Constructor & Destructor Documentation

◆ CheckOpenWriteHDF5Handles()

moab::CheckOpenWriteHDF5Handles::CheckOpenWriteHDF5Handles ( mhdf_FileHandle  file,
int  line 
)
inline

Definition at line 302 of file WriteHDF5.cpp.

303  : fileline( line ), handle( file ), enter_count( mhdf_countOpenHandles( file ) )
304  {
305  }

◆ ~CheckOpenWriteHDF5Handles()

moab::CheckOpenWriteHDF5Handles::~CheckOpenWriteHDF5Handles ( )
inline

Definition at line 307 of file WriteHDF5.cpp.

308  {
309  int new_count = mhdf_countOpenHandles( handle );
310  if( new_count != enter_count )
311  {
312  std::cout << "Leaked HDF5 object handle in function at " << __FILE__ << ":" << fileline << std::endl
313  << "Open at entrance: " << enter_count << std::endl
314  << "Open at exit: " << new_count << std::endl;
315  }
316  }

References enter_count, fileline, handle, and mhdf_countOpenHandles().

Member Data Documentation

◆ enter_count

int moab::CheckOpenWriteHDF5Handles::enter_count
private

Definition at line 299 of file WriteHDF5.cpp.

Referenced by ~CheckOpenWriteHDF5Handles().

◆ fileline

int moab::CheckOpenWriteHDF5Handles::fileline
private

Definition at line 297 of file WriteHDF5.cpp.

Referenced by ~CheckOpenWriteHDF5Handles().

◆ handle

mhdf_FileHandle moab::CheckOpenWriteHDF5Handles::handle
private

Definition at line 298 of file WriteHDF5.cpp.

Referenced by ~CheckOpenWriteHDF5Handles().


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