TRIQS/h5 1.3.0
C++ interface to HDF5
|
Specialized functions to read/write a std::tuple from/to HDF5.
The following code writes a std::tuple to an HDF5 file, reads the same tuple and outputs it to stdout:
Output:
Contents of tuple.h5
:
Classes | |
struct | h5::hdf5_format_impl< std::tuple< T... > > |
Specialization of h5::hdf5_format_impl for std::tuple. More... | |
Functions | |
template<typename... Ts> | |
void | h5::h5_read (group g, std::string const &name, std::tuple< Ts... > &tup) |
Read a std::tuple from an HDF5 subgroup. | |
template<typename... Ts> | |
void | h5::h5_write (group g, std::string const &name, std::tuple< Ts... > const &tup) |
Write a std::tuple to an HDF5 subgroup. | |
void h5::h5_read | ( | group | g, |
std::string const & | name, | ||
std::tuple< Ts... > & | tup ) |
#include <h5/stl/tuple.hpp>
Read a std::tuple from an HDF5 subgroup.
Calls the specialized h5_read
function for every value of the std::tuple.
Ts | Tuple types. |
g | h5::group containing the subgroup. |
name | Name of the subgroup from which the std::tuple is read. |
tup | std::tuple to read into. |
void h5::h5_write | ( | group | g, |
std::string const & | name, | ||
std::tuple< Ts... > const & | tup ) |
#include <h5/stl/tuple.hpp>
Write a std::tuple to an HDF5 subgroup.
Calls the specialized h5_write
function for every element of the std::tuple.
Ts | Tuple types. |
g | h5::group in which the subgroup is created. |
name | Name of the subgroup to which the std::tuple is written. |
tup | std::tuple to be written. |