aboutsummaryrefslogtreecommitdiff
path: root/CarpetDev/CarpetIOF5/src/file.hh
blob: b5ac2d696a6470615c57fdd2fbb500eda0c1f060 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef FILE_HH
#define FILE_HH

#include <string>

#include <hdf5.h>

#include "cctk.h"

#include "extending.hh"



namespace CarpetIOF5 {
  
  using std::string;
  
  
  
  namespace F5 {
    
    class file_t {
      
      cGH const * const m_cctkGH;
      
      string const m_filename;
      
      hid_t m_hdf5_file;
      
      file_t ();
      file_t (file_t const &);
      file_t operator= (file_t const &);
      
    public:
      
      file_t (cGH const * cctkGH,
              string filename,
              bool do_truncate);
      
      virtual
      ~ file_t ();
      
      cGH const *
      get_cctkGH ()
        const;
      
      hid_t
      get_hdf5_file ()
        const;
      
      virtual bool
      invariant ()
        const;
    };
    
  } // namespace F5

} // namespace CarpetIOF5

#endif  // #ifndef FILE_HH