-----------------------------------------------------------------------------
| 144 | } |
| 145 | //----------------------------------------------------------------------------- |
| 146 | bool io::hdf5::has_dataset(hid_t handle, const std::string& dataset_path) |
| 147 | { |
| 148 | const hid_t lapl_id = H5Pcreate(H5P_LINK_ACCESS); |
| 149 | if (lapl_id < 0) |
| 150 | throw std::runtime_error("Failed to create HDF5 property list"); |
| 151 | |
| 152 | const htri_t link_status = H5Lexists(handle, dataset_path.c_str(), lapl_id); |
| 153 | if (link_status < 0) |
| 154 | throw std::runtime_error("Failed to check existence of HDF5 link in group"); |
| 155 | |
| 156 | if (H5Pclose(lapl_id) < 0) |
| 157 | throw std::runtime_error("Call to H5Pclose unsuccessful"); |
| 158 | |
| 159 | return link_status; |
| 160 | } |
| 161 | //----------------------------------------------------------------------------- |
| 162 | void io::hdf5::set_attribute(hid_t handle, const std::string& attr_name, |
| 163 | const std::string& value) |
nothing calls this directly
no outgoing calls
no test coverage detected