TRIQS/h5 1.3.0
C++ interface to HDF5
Loading...
Searching...
No Matches
generic.hpp File Reference
#include "./group.hpp"
#include <string>
#include <type_traits>

Detailed Description

Provides a generic interface for reading/writing data from/to various HDF5 objects.

The generic functions (h5::read, h5::write, h5::read_attribute, ...) call their more specialized counterparts (h5::h5_read, h5::h5_write, h5::h5_read_attribute, ...) which find the correct implementation using ADL.

Definition in file generic.hpp.

Go to the source code of this file.

Functions

template<typename T >
h5::h5_read (group g, std::string const &key)
 Generic implementation for reading from an HDF5 dataset/subgroup.
 
template<typename T >
h5::h5_read_attribute (object obj, std::string const &name)
 Generic implementation for reading an HDF5 attribute.
 
template<typename T >
h5::h5_read_attribute_from_key (group g, std::string const &key, std::string const &name)
 Generic implementation for reading an HDF5 attribute.
 
template<typename T >
h5::read (group g, std::string const &key)
 Generic implementation for reading from an HDF5 dataset/subgroup.
 
template<typename T >
void h5::read (group g, std::string const &key, T &x, auto const &...args)
 Generic implementation for reading from an HDF5 dataset/subgroup into a given variable.
 
template<typename T >
h5::read_attribute (object obj, std::string const &key)
 Generic implementation for reading an HDF5 attribute.
 
template<typename T >
void h5::read_attribute (object obj, std::string const &key, T &x)
 Generic implementation for reading an HDF5 attribute into a given variable.
 
template<typename T >
bool h5::try_read (group g, std::string const &key, T &x)
 Check if an HDF5 dataset/subgroup with the given key exists in the given parent group before performing the read.
 
template<typename T >
void h5::write (group g, std::string const &key, T const &x, auto const &...args)
 Generic implementation for writing a variable to an HDF5 dataset/subgroup.
 
template<typename T >
void h5::write_attribute (object obj, std::string const &key, T const &x)
 Generic implementation for writing a variable to an HDF5 attribute.