TRIQS/h5 1.3.0
C++ interface to HDF5
Loading...
Searching...
No Matches
h5 types

Detailed Description

Map C++ datatypes to their corresponding HDF5 datatypes and other related functionality.

Classes

struct  h5::dcplx_t
 A complex compound type consisting of two doubles to represent a complex number. More...
 

Functions

datatype h5::get_hdf5_type (dataset ds)
 Get the HDF5 type stored in a given h5::dataset.
 
std::string h5::get_name_of_h5_type (datatype dt)
 Get the name of an h5::datatype (for error messages).
 
template<typename T >
datatype h5::hdf5_type ()
 Map a given C++ type to an HDF5 datatype.
 
bool h5::hdf5_type_equal (datatype dt1, datatype dt2)
 Check if two HDF5 datatypes are equal.
 

Variables

template<typename T >
constexpr bool h5::is_complex_v = detail::_is_complex<T>::value
 Boolean type trait set to true for std::complex types.
 

Function Documentation

◆ get_hdf5_type()

datatype h5::get_hdf5_type ( dataset ds)
nodiscard

#include <h5/object.cpp>

Get the HDF5 type stored in a given h5::dataset.

Parameters
dsh5::dataset.
Returns
h5::datatype of the given h5::dataset.

Definition at line 196 of file object.cpp.

◆ get_name_of_h5_type()

std::string h5::get_name_of_h5_type ( datatype dt)
nodiscard

#include <h5/object.cpp>

Get the name of an h5::datatype (for error messages).

Throws an exception if the datatype is not supported.

Parameters
dth5::datatype.
Returns
String representation of the datatype.

Definition at line 183 of file object.cpp.

◆ hdf5_type()

template<typename T >
datatype h5::hdf5_type ( )
nodiscard

#include <h5/object.hpp>

Map a given C++ type to an HDF5 datatype.

Template Parameters
TC++ type.
Returns
h5::datatype object corresponding to the given C++ type.

Definition at line 156 of file object.hpp.

◆ hdf5_type_equal()

bool h5::hdf5_type_equal ( datatype dt1,
datatype dt2 )
nodiscard

#include <h5/object.cpp>

Check if two HDF5 datatypes are equal.

For string types, this function only checks if they are both of the class H5T_STRING. It does not take into account the size, character set, etc.

Otherwise, it simply uses H5Tequal. Throws an exception if the HDF5 call fails.

Parameters
dt1h5::datatype #1.
dt2h5::datatype #2.
Returns
True, if the two datatypes are equal.

Definition at line 198 of file object.cpp.

Variable Documentation

◆ is_complex_v

template<typename T >
bool h5::is_complex_v = detail::_is_complex<T>::value
constexpr

#include <h5/complex.hpp>

Boolean type trait set to true for std::complex types.

Template Parameters
TType to check.

Definition at line 64 of file complex.hpp.