Defines functions for h5 manipulations. More...
#include <array>
#include <cstddef>
#include <hdf5.h>
#include <string>
#include <vector>
#include "DataStructures/Index.hpp"
Go to the source code of this file.
Namespaces | |
h5 | |
Contains functions and classes for manipulating HDF5 files. | |
Functions | |
template<typename T > | |
void | h5::write_data (hid_t group_id, const std::vector< T > &data, const std::vector< size_t > &extents, const std::string &name="scalar") noexcept |
Write a std::vector named name to the group group_id | |
void | h5::write_data (hid_t group_id, const DataVector &data, const std::string &name) noexcept |
Write a DataVector named name to the group group_id | |
template<size_t Dim> | |
void | h5::write_extents (hid_t group_id, const Index< Dim > &extents, const std::string &name="Extents") |
Write the extents as an attribute named name to the group group_id . | |
template<typename Type > | |
void | h5::write_to_attribute (hid_t location_id, const std::string &name, const Type &value) noexcept |
Write a value of type Type to an HDF5 attribute named name | |
template<typename T > | |
void | h5::write_to_attribute (hid_t group_id, const std::string &name, const std::vector< T > &data) noexcept |
Write the vector data to the attribute attribute_name in the group group_id . | |
template<typename Type > | |
Type | h5::read_value_attribute (hid_t location_id, const std::string &name) noexcept |
Read a value of type Type from an HDF5 attribute named name | |
template<typename T > | |
std::vector< T > | h5::read_rank1_attribute (hid_t group_id, const std::string &name) noexcept |
Read rank-1 of type Type from an HDF5 attribute named name | |
std::vector< std::string > | h5::get_attribute_names (hid_t file_id, const std::string &group_name) |
Get the names of all the attributes in a group. | |
void | h5::write_connectivity (hid_t group_id, const std::vector< int > &connectivity) noexcept |
Write the connectivity into the group in the H5 file. | |
std::vector< std::string > | h5::get_group_names (hid_t file_id, const std::string &group_name) noexcept |
Get the names of all the groups and datasets in a group. | |
bool | h5::contains_dataset_or_group (hid_t id, const std::string &group_name, const std::string &dataset_name) noexcept |
Check if name is a dataset or group in the subgroup group_name of id . More... | |
bool | h5::contains_attribute (hid_t file_id, const std::string &group_name, const std::string &attribute_name) |
Check if an attribute is in a group. | |
hid_t | h5::open_dataset (hid_t group_id, const std::string &dataset_name) noexcept |
Open an HDF5 dataset. | |
void | h5::close_dataset (hid_t dataset_id) noexcept |
Close an HDF5 dataset. | |
hid_t | h5::open_dataspace (hid_t dataset_id) noexcept |
Open an HDF5 dataspace. | |
void | h5::close_dataspace (hid_t dataspace_id) noexcept |
Close an HDF5 dataspace. | |
template<size_t Rank, typename T > | |
T | h5::read_data (hid_t group_id, const std::string &dataset_name) noexcept |
Read an array of rank 0-3 into an object. More... | |
template<size_t Dim> | |
Index< Dim > | h5::read_extents (hid_t group_id, const std::string &extents_name="Extents") |
Read the HDF5 attribute representing extents from a group. | |
Defines functions for h5 manipulations.