1#ifndef CHIHAYA_EXTERNAL_HDF5_HPP
2#define CHIHAYA_EXTERNAL_HDF5_HPP
5#include "ritsuko/ritsuko.hpp"
6#include "ritsuko/hdf5/hdf5.hpp"
8#include "minimal_array.hpp"
21namespace external_hdf5 {
32 auto deets = minimal_array::validate(handle, version, options);
35 auto fhandle = ritsuko::hdf5::open_dataset(handle,
"file");
36 if (!ritsuko::hdf5::is_scalar(fhandle)) {
37 throw std::runtime_error(
"'file' should be a scalar");
39 if (!ritsuko::hdf5::is_utf8_string(fhandle)) {
40 throw std::runtime_error(
"'file' should have a datatype that can be represented by a UTF-8 encoded string");
43 auto nhandle = ritsuko::hdf5::open_dataset(handle,
"name");
44 if (!ritsuko::hdf5::is_scalar(nhandle)) {
45 throw std::runtime_error(
"'name' should be a scalar");
47 if (!ritsuko::hdf5::is_utf8_string(nhandle)) {
48 throw std::runtime_error(
"'name' should have a datatype that can be represented by a UTF-8 encoded string");
ArrayDetails validate(const H5::Group &handle, const ritsuko::Version &version, Options &options)
Definition: external_hdf5.hpp:31
Namespace for all chihaya functions.
Definition: binary_arithmetic.hpp:22
Details about an array.
Definition: utils_public.hpp:36
Validation options.
Definition: utils_public.hpp:66
bool details_only
Definition: utils_public.hpp:71