libSplash
DCAttribute.hpp
1 
23 #ifndef DCATTRIBUTE_H
24 #define DCATTRIBUTE_H
25 
26 #include <hdf5.h>
27 
28 #include "splash/DCException.hpp"
29 #include "splash/Dimensions.hpp"
30 
31 namespace splash
32 {
33  class AttributeInfo;
34 
39  class DCAttribute
40  {
41  public:
49  static void readAttribute(const char *name,
50  hid_t parent,
51  void *dst) throw (DCException);
52 
63  static AttributeInfo readAttributeInfo(const char *name,
64  hid_t parent) throw (DCException);
65 
74  static void writeAttribute(const char *name,
75  const hid_t type,
76  hid_t parent,
77  const void *src) throw (DCException);
78 
79 
90  static void writeAttribute(const char *name,
91  const hid_t type,
92  hid_t parent,
93  uint32_t ndims,
94  Dimensions dims,
95  const void *src) throw (DCException);
96 
97  private:
98  DCAttribute();
99 
100  static std::string getExceptionString(const char *name, std::string msg);
101  };
106 }
107 
108 #endif /* DCATTRIBUTE_H */