9 #ifndef H5ATTRIBUTE_MISC_HPP 10 #define H5ATTRIBUTE_MISC_HPP 19 #include <boost/multi_array.hpp> 22 #include <H5Apublic.h> 23 #include <H5Ppublic.h> 25 #include "../H5Attribute.hpp" 26 #include "../H5DataSpace.hpp" 27 #include "../H5DataType.hpp" 37 return H5Aget_storage_size(
_hid);
48 if ((space.
_hid = H5Aget_space(
_hid)) < 0) {
49 HDF5ErrMapper::ToException<AttributeException>(
50 "Unable to get DataSpace out of Attribute");
59 typedef typename std::remove_const<T>::type type_no_const;
61 type_no_const& nocv_array =
const_cast<type_no_const&
>(array);
68 std::ostringstream ss;
69 ss <<
"Impossible to read attribute of dimensions " 82 if (H5Aread(
getId(), array_datatype.getId(),
84 HDF5ErrMapper::ToException<AttributeException>(
85 "Error during HDF5 Read: ");
94 typedef typename std::remove_const<T>::type type_no_const;
96 type_no_const& nocv_buffer =
const_cast<type_no_const&
>(buffer);
103 std::ostringstream ss;
104 ss <<
"Impossible to write buffer of dimensions " << dim_buffer
105 <<
" into attribute of dimensions " 116 if (H5Awrite(
getId(), array_datatype.getId(),
117 static_cast<const void*
>(
119 HDF5ErrMapper::ToException<DataSetException>(
120 "Error during HDF5 Write: ");
125 #endif // H5ATTRIBUTE_MISC_HPP DataType getDataType() const
getDataType
void process_result(Scalar &)
size_t getNumberDimensions() const
getNumberDimensions
Exception specific to HighFive DataSpace interface.
Scalar * transform_write(Scalar &datamem)
void read(T &array) const
DataSpace getSpace() const
getSpace
Scalar * transform_read(Scalar &datamem)
create an HDF5 DataType from a C++ type
DataSpace getMemSpace() const
getMemSpace
void write(const T &buffer)
bool checkDimensions(const DataSpace &mem_space, size_t input_dims)
dimension checks
size_t getStorageSize() const