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

Public Member Functions

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

Private Attributes

int fileline
 
mhdf_FileHandle handle
 
int enter_count
 

Detailed Description

Definition at line 154 of file ReadHDF5.cpp.

Constructor & Destructor Documentation

◆ CheckOpenReadHDF5Handles()

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

Definition at line 161 of file ReadHDF5.cpp.

162  : fileline( line ), handle( file ), enter_count( mhdf_countOpenHandles( file ) )
163  {
164  }

◆ ~CheckOpenReadHDF5Handles()

moab::CheckOpenReadHDF5Handles::~CheckOpenReadHDF5Handles ( )
inline

Definition at line 165 of file ReadHDF5.cpp.

166  {
167  int new_count = mhdf_countOpenHandles( handle );
168  if( new_count != enter_count )
169  {
170  std::cout << "Leaked HDF5 object handle in function at " << __FILE__ << ":" << fileline << std::endl
171  << "Open at entrance: " << enter_count << std::endl
172  << "Open at exit: " << new_count << std::endl;
173  }
174  }

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

Member Data Documentation

◆ enter_count

int moab::CheckOpenReadHDF5Handles::enter_count
private

Definition at line 158 of file ReadHDF5.cpp.

Referenced by ~CheckOpenReadHDF5Handles().

◆ fileline

int moab::CheckOpenReadHDF5Handles::fileline
private

Definition at line 156 of file ReadHDF5.cpp.

Referenced by ~CheckOpenReadHDF5Handles().

◆ handle

mhdf_FileHandle moab::CheckOpenReadHDF5Handles::handle
private

Definition at line 157 of file ReadHDF5.cpp.

Referenced by ~CheckOpenReadHDF5Handles().


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