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
18namespace chihaya {
19
27enum ArrayType { BOOLEAN = 0, INTEGER = 1, FLOAT = 2, STRING = 3 }; // giving explicit values for comparisons to work.
28
40 ArrayDetails() {}
41
42 ArrayDetails(ArrayType t, std::vector<size_t> d) : type(t), dimensions(std::move(d)) {}
51
56 std::vector<size_t> dimensions;
57};
58
66struct Options {
71 bool details_only = false;
72
77 std::unordered_map<std::string, std::function<ArrayDetails(const H5::Group&, const ritsuko::Version&, Options&)> > array_validate_registry;
78
83 std::unordered_map<std::string, std::function<ArrayDetails(const H5::Group&, const ritsuko::Version&, Options&)> > operation_validate_registry;
84};
85
86}
87
88#endif
Namespace for all chihaya functions.
Definition: binary_arithmetic.hpp:22
ArrayType
Definition: utils_public.hpp:27
Details about an array.
Definition: utils_public.hpp:36
std::vector< size_t > dimensions
Definition: utils_public.hpp:56
ArrayType type
Definition: utils_public.hpp:50
Validation options.
Definition: utils_public.hpp:66
bool details_only
Definition: utils_public.hpp:71
std::unordered_map< std::string, std::function< ArrayDetails(const H5::Group &, const ritsuko::Version &, Options &)> > array_validate_registry
Definition: utils_public.hpp:77
std::unordered_map< std::string, std::function< ArrayDetails(const H5::Group &, const ritsuko::Version &, Options &)> > operation_validate_registry
Definition: utils_public.hpp:83