IFEM 90A354
HDF5Base.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _HDF5_BASE_H
15#define _HDF5_BASE_H
16
17#include <string>
18#ifdef HAS_HDF5
19#include <hdf5.h>
20#endif
21
22class ProcessAdm;
23
24
30{
31public:
35 HDF5Base(const std::string& name, const ProcessAdm& adm);
37 virtual ~HDF5Base() { this->closeFile(); }
38
39protected:
42 bool openFile(unsigned int flag);
44 void closeFile();
45
46#ifdef HAS_HDF5
51 static bool checkGroupExistence(hid_t parent, const char* path);
52
53 hid_t m_file;
54#endif
55 std::string m_hdf5_name;
56#ifdef HAVE_MPI
57 const ProcessAdm& m_adm;
58#endif
59};
60
61#endif
Base class for interacting with HDF5 files.
Definition HDF5Base.h:30
bool openFile(unsigned int flag)
Opens the HDF5 file.
Definition HDF5Base.C:38
void closeFile()
Closes the HDF5 file.
Definition HDF5Base.C:81
std::string m_hdf5_name
The file name of the HDF5 file.
Definition HDF5Base.h:55
virtual ~HDF5Base()
The destructor closes the file.
Definition HDF5Base.h:37
Class for administration of MPI processes in IFEM library.
Definition ProcessAdm.h:33