*/
template <typename T>
T
- get_attribute(const std::string &attr_name);
+ get_attribute(const std::string &attr_name) const;
/**
* Writes an attribute. @p T can be `float`, `double`, `std::complex<float>`,
template <typename T>
T
- HDF5Object::get_attribute(const std::string &attr_name)
+ HDF5Object::get_attribute(const std::string &attr_name) const
{
const std::shared_ptr<hid_t> t_type = internal::get_hdf5_datatype<T>();
T value;
template <>
bool
- HDF5Object::get_attribute(const std::string &attr_name)
+ HDF5Object::get_attribute(const std::string &attr_name) const
{
// The enum field generated by h5py can be casted to int
int int_value;
template <>
std::string
- HDF5Object::get_attribute(const std::string &attr_name)
+ HDF5Object::get_attribute(const std::string &attr_name) const
{
// Reads a UTF8 variable string
//
// std::complex<float> and std::complex<double> in hdf5.inst
template int
- HDF5Object::get_attribute<int>(const std::string &attr_name);
+ HDF5Object::get_attribute<int>(const std::string &attr_name) const;
template unsigned int
- HDF5Object::get_attribute<unsigned int>(const std::string &attr_name);
+ HDF5Object::get_attribute<unsigned int>(const std::string &attr_name) const;
// The specializations of HDF5Object::get_attribute<std::string>
// and HDF5Object::get_attribute<bool> have been defined above
for (number : REAL_AND_COMPLEX_SCALARS)
{
template number HDF5Object::get_attribute<number>(
- const std::string &attr_name);
+ const std::string &attr_name) const;
template void HDF5Object::set_attribute<number>(
const std::string &attr_name, number value);