46 : hdf5_file_id(hdf5_file_id), dataset_name(dataset_name) {}
52 bool exists(
const std::string attribute_name)
const;
55 void set(
const std::string attribute_name,
const double value);
58 void set(
const std::string attribute_name,
const std::size_t value);
61 void set(
const std::string attribute_name,
62 const std::vector<double>& value);
65 void set(
const std::string attribute_name,
66 const std::vector<std::size_t>& value);
69 void set(
const std::string attribute_name,
const std::string value);
72 void get(
const std::string attribute_name,
double& value)
const;
75 void get(
const std::string attribute_name,
76 std::vector<double>& value)
const;
79 void get(
const std::string attribute_name, std::size_t& value)
const;
82 void get(
const std::string attribute_name,
83 std::vector<std::size_t>& value)
const;
86 void get(
const std::string attribute_name, std::string& value)
const;
90 const std::string
str(
const std::string attribute_name)
const;
94 const std::string
type_str(
const std::string attribute_name)
const;
97 const std::string
str()
const;
105 const hid_t hdf5_file_id;
106 const std::string dataset_name;
109 template <
typename T>
110 void set_value(
const std::string attribute_name,
const T& value);
113 template <
typename T>
114 void get_value(
const std::string attribute_name, T& value)
const;
116 template <
typename T>
118 vector_to_string(
const std::vector<T>& vector_value)
const;
void get(const std::string attribute_name, double &value) const
Set the value of a double attribute in the HDF5 file.
Definition HDF5Attribute.cpp:122
bool exists(const std::string attribute_name) const
Check for the existence of an attribute on a dataset.
Definition HDF5Attribute.cpp:180
void set(const std::string attribute_name, const double value)
Set the value of a double attribute in the HDF5 file.
Definition HDF5Attribute.cpp:92