28 friend class Container<HDF5SERIE_CONTAINERBASECLASS, HDF5SERIE_PARENTCLASS>;
31 ScopedHID memDataSpaceID;
48 HDF5SERIE_CLASS(
int dummy, HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_);
49 HDF5SERIE_CLASS(HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_);
53 void close()
override;
55 void enableSWMR()
override;
62 void write(
const T& data);
70 #ifdef HDF5SERIE_DATASETTYPE
71 void setDescription(
const std::string &desc) {
72 SimpleAttribute<std::string> *a=createChildAttribute<SimpleAttribute<std::string> >(
"Description")();
75 std::string getDescription() {
76 auto *a=openChildAttribute<SimpleAttribute<std::string> >(
"Description");
84 friend class Container<HDF5SERIE_CONTAINERBASECLASS, HDF5SERIE_PARENTCLASS>;
87 ScopedHID fixedStringTypeID;
88 ScopedHID memDataSpaceID;
91 HDF5SERIE_CLASS(
int dummy, HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_);
92 HDF5SERIE_CLASS(HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_,
int size_,
int fixedStrSize,
int compression);
93 HDF5SERIE_CLASS(HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_,
int size_,
int fixedStrSize) :
HDF5SERIE_CLASS(parent_, name_, size_, fixedStrSize, File::getDefaultCompression()) {};
96 void close()
override;
97 void enableSWMR()
override;
99 void write(
const std::vector<T>& data);
100 std::vector<T>
read();
101 #ifdef HDF5SERIE_DATASETTYPE
102 void setDescription(
const std::string &desc) {
103 SimpleAttribute<std::string> *a=createChildAttribute<SimpleAttribute<std::string> >(
"Description")();
106 std::string getDescription() {
107 auto *a=openChildAttribute<SimpleAttribute<std::string> >(
"Description");
115 friend class Container<HDF5SERIE_CONTAINERBASECLASS, HDF5SERIE_PARENTCLASS>;
118 ScopedHID fixedStringTypeID;
119 ScopedHID memDataSpaceID;
123 HDF5SERIE_CLASS(
int dummy, HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_);
124 HDF5SERIE_CLASS(HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_,
int rows_,
int cols_,
int fixedStrSize,
int compression);
125 HDF5SERIE_CLASS(HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_,
int rows_,
int cols_,
int fixedStrSize) :
HDF5SERIE_CLASS(parent_, name_, rows_, cols_, fixedStrSize, File::getDefaultCompression()) {}
126 HDF5SERIE_CLASS(HDF5SERIE_PARENTCLASS *parent_,
const std::string& name_,
int rows_,
int cols_) :
HDF5SERIE_CLASS(parent_, name_, rows_, cols_, -1) {}
128 void close()
override;
129 void enableSWMR()
override;
131 void write(
const std::vector<std::vector<T> >& data);
132 std::vector<std::vector<T> >
read();
133 #ifdef HDF5SERIE_DATASETTYPE
134 void setDescription(
const std::string &desc) {
135 SimpleAttribute<std::string> *a=createChildAttribute<SimpleAttribute<std::string> >(
"Description")();
138 std::string getDescription() {
139 auto *a=openChildAttribute<SimpleAttribute<std::string> >(
"Description");
A scalar, vector or matrix attribute/dataset.
Definition: simple.h:27
T read()
Read data.
Definition: simple.cc:49
void write(const T &data)
Write data.
Definition: simple.cc:39
HDF5SERIE_CLASS(int dummy, HDF5SERIE_PARENTCLASS *parent_, const std::string &name_)
Constructor for opening or creating a attribute/dataset.
Definition: simple.cc:3