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