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