22#ifndef LIBH5_STL_PAIR_HPP
23#define LIBH5_STL_PAIR_HPP
40 template <
typename T1,
typename T2>
42 static std::string invoke() {
return "PythonTupleWrap"; }
56 template <
typename T1,
typename T2>
57 void h5_write(
group g, std::string
const &name, std::pair<T1, T2>
const &p) {
75 template <
typename T1,
typename T2>
76 void h5_read(
group g, std::string
const &name, std::pair<T1, T2> &p) {
78 if (gr.get_all_subgroup_dataset_names().size() != 2)
79 throw std::runtime_error(
"Error in h5::h5_read: Reading a std::pair from a group with more/less than 2 subgroups/datasets is not allowed");
A handle to an HDF5 group.
group create_group(std::string const &key, bool delete_if_exists=true) const
Create a subgroup with the given key in the group.
group open_group(std::string const &key) const
Open a subgroup with the given key in the group.
Provides a handle to an HDF5 group and various methods to simplify the creation/opening of subgroups,...
T h5_read(group g, std::string const &key)
Generic implementation for reading from an HDF5 dataset/subgroup.
void h5_write(group g, std::string const &name, T const &x) H5_REQUIRES(std
Write a scalar to an HDF5 dataset.
Provides functions to read/write std::string, char* and h5::char_buf objects from/to HDF5.