24#ifndef LIBH5_GENERIC_HPP
25#define LIBH5_GENERIC_HPP
53 if constexpr (std::is_default_constructible_v<T>) {
58 return T::h5_read_construct(g, key);
89 void read(
group g, std::string
const &key, T &x,
auto const &...args) {
104 template <
typename T>
105 void write(
group g, std::string
const &key, T
const &x,
auto const &...args) {
119 template <
typename T>
136 template <
typename T>
151 template <
typename T>
166 template <
typename T>
183 template <
typename T>
202 template <
typename T>
A handle to an HDF5 group.
bool has_key(std::string const &key) const
Check if a link with the given key exists 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.
T h5_read_attribute_from_key(group g, std::string const &key, std::string const &name)
Generic implementation for reading an HDF5 attribute.
bool try_read(group g, std::string const &key, T &x)
Check if an HDF5 dataset/subgroup with the given key exists in the given parent group before performi...
void write_attribute(object obj, std::string const &key, T const &x)
Generic implementation for writing a variable to an HDF5 attribute.
T read(group g, std::string const &key)
Generic implementation for reading from an HDF5 dataset/subgroup.
T read_attribute(object obj, std::string const &key)
Generic implementation for reading an HDF5 attribute.
void write(group g, std::string const &key, T const &x, auto const &...args)
Generic implementation for writing a variable to an HDF5 dataset/subgroup.
T h5_read_attribute(object obj, std::string const &name)
Generic implementation for reading an HDF5 attribute.
void h5_write(group g, std::string const &name, T const &x) H5_REQUIRES(std
Write a scalar to an HDF5 dataset.
void h5_write_attribute(object obj, std::string const &name, T const &x) H5_REQUIRES(std
Write a scalar to an HDF5 attribute.