9 #ifndef H5PROPERTY_LIST_MISC_HPP 10 #define H5PROPERTY_LIST_MISC_HPP 12 #include <H5Ppublic.h> 14 #include "../H5PropertyList.hpp" 29 other._hid = H5P_DEFAULT;
36 const auto hid = other._hid;
37 other._hid = H5P_DEFAULT;
46 if (
_hid != H5P_DEFAULT)
50 template <
typename Property>
53 if (
_hid == H5P_DEFAULT)
61 type = H5P_FILE_ACCESS;
65 type = H5P_DATASET_CREATE;
69 type = H5P_DATASET_ACCESS;
73 HDF5ErrMapper::ToException<PropertyException>(
74 std::string(
"Unsupported property list type"));
76 if ((
_hid = H5Pcreate(type)) < 0) {
77 HDF5ErrMapper::ToException<PropertyException>(
78 std::string(
"Unable to create property list"));
87 if (H5Pset_chunk(hid, _dims.size(), _dims.data()) < 0)
89 HDF5ErrMapper::ToException<PropertyException>(
90 "Error setting chunk property");
96 if (!H5Zfilter_avail(H5Z_FILTER_DEFLATE))
98 HDF5ErrMapper::ToException<PropertyException>(
99 "Error setting deflate property");
102 if (H5Pset_deflate(hid, _level) < 0)
104 HDF5ErrMapper::ToException<PropertyException>(
105 "Error setting deflate property");
111 if (!H5Zfilter_avail(H5Z_FILTER_SHUFFLE))
113 HDF5ErrMapper::ToException<PropertyException>(
114 "Error setting shuffle property");
117 if (H5Pset_shuffle(hid) < 0)
119 HDF5ErrMapper::ToException<PropertyException>(
120 "Error setting shuffle property");
126 if (H5Pset_chunk_cache(hid, _numSlots, _cacheSize, _w0) < 0)
128 HDF5ErrMapper::ToException<PropertyException>(
129 "Error setting dataset cache parameters");
133 #endif // H5PROPERTY_LIST_HPP
void apply(hid_t hid) const
void add(const Property &property)
void apply(hid_t hid) const
Generic HDF5 property List.
Properties(Properties &&other)
void apply(hid_t hid) const
void apply(hid_t hid) const
Properties & operator=(Properties &&other)