H5CPP  v1.14.0
Modern C++ templates for HDF5 serial and parallel I/O
Loading...
Searching...
No Matches
main.cpp
// Copyright (c) 2018-2026 Steven Varga, Toronto, ON Canada
//
// Driver TU. This file knows nothing about the record types — only that the
// other TUs export their entry points. All it needs from h5cpp is h5::fd_t,
// which lives in the file-handle slice of <h5cpp/all>.
//
// No `generated.h` include here: this TU never names `sn::example::record_t`
// directly, so the compound registration would just be dead weight.
#include <h5cpp/all>
void tu_01_linalg_and_create(const h5::fd_t& fd);
void tu_02_pod_vector_round_trip(const h5::fd_t& fd);
int main() {
h5::fd_t fd = h5::create("multi-tu.h5", H5F_ACC_TRUNC);
tu_01_linalg_and_create(fd);
tu_02_pod_vector_round_trip(fd);
return 0;
}
h5::at_t create(const hid_t &parent, const std::string &path, args_t &&... args)
Create a new attribute of element type T on a parent HDF5 object.
Definition H5Acreate.hpp:100
T aread(const hid_t &ds, const std::string &name, const h5::acpl_t &acpl=h5::default_acpl)
Read an attribute by name and return its value as type T.
Definition H5Aread.hpp:76