chihaya
Validating delayed array operations in HDF5
Loading...
Searching...
No Matches
utils_public.hpp
Go to the documentation of this file.
1#ifndef CHIHAYA_UTILS_PUBLIC_HPP
2#define CHIHAYA_UTILS_PUBLIC_HPP
3
4#include "H5Cpp.h"
5#include "ritsuko/ritsuko.hpp"
6
7#include <string>
8#include <functional>
9#include <vector>
10#include <unordered_map>
11#include <cstddef>
12
19namespace chihaya {
20
28enum ArrayType { BOOLEAN = 0, INTEGER = 1, FLOAT = 2, STRING = 3 }; // giving explicit values for comparisons to work.
29
41 ArrayDetails() {}
42
43 ArrayDetails(ArrayType t, std::vector<std::size_t> d) : type(t), dimensions(std::move(d)) {}
52
57 std::vector<std::size_t> dimensions;
58};
59
67struct Options {
72 bool details_only = false;
73
78 std::unordered_map<std::string, std::function<ArrayDetails(const H5::Group&, const ritsuko::Version&, const Options&)> > array_validate_registry;
79
84 std::unordered_map<std::string, std::function<ArrayDetails(const H5::Group&, const ritsuko::Version&, const Options&)> > operation_validate_registry;
85};
86
87}
88
89#endif
Namespace for all chihaya functions.
Definition binary_arithmetic.hpp:20
ArrayType
Definition utils_public.hpp:28
Details about an array.
Definition utils_public.hpp:37
std::vector< std::size_t > dimensions
Definition utils_public.hpp:57
ArrayType type
Definition utils_public.hpp:51
Validation options.
Definition utils_public.hpp:67
std::unordered_map< std::string, std::function< ArrayDetails(const H5::Group &, const ritsuko::Version &, const Options &)> > operation_validate_registry
Definition utils_public.hpp:84
std::unordered_map< std::string, std::function< ArrayDetails(const H5::Group &, const ritsuko::Version &, const Options &)> > array_validate_registry
Definition utils_public.hpp:78
bool details_only
Definition utils_public.hpp:72