libSplash
DCGroup.hpp
1 
23 #ifndef DCGROUP_HPP
24 #define DCGROUP_HPP
25 
26 #include <stdint.h>
27 #include <string>
28 #include <vector>
29 #include <hdf5.h>
30 
31 #include "splash/DataCollector.hpp"
32 #include "splash/DCException.hpp"
33 #include "splash/core/HandleMgr.hpp"
34 
35 namespace splash
36 {
37 
41  class DCGroup
42  {
43  private:
44  typedef std::vector<H5Handle> HandlesList;
45 
46  public:
47 
48  typedef struct
49  {
50  DataCollector::DCEntry *entries;
51  size_t count;
52  } VisitObjCBType;
53 
54  DCGroup();
55  virtual ~DCGroup();
56 
57  H5Handle open(H5Handle base, std::string path) throw (DCException);
58  H5Handle create(H5Handle base, std::string path) throw (DCException);
59  H5Handle openCreate(H5Handle base, std::string path) throw (DCException);
60  void close() throw (DCException);
61 
68  static bool exists(H5Handle base, std::string path);
69  static void remove(H5Handle base, std::string path) throw (DCException);
70 
71  H5Handle getHandle();
72 
73  static void getEntriesInternal(H5Handle base, const std::string baseGroup,
74  std::string baseName, VisitObjCBType *param) throw (DCException);
75 
76  protected:
77  bool checkExistence;
78 
79  private:
80  HandlesList handles;
81 
82  static std::string getExceptionString(std::string msg, std::string name);
83  };
88 }
89 
90 #endif /* DCGROUP_HPP */
struct splash::DataCollector::_DCEntry DCEntry