|
class | Utopia::DataIO::HDFAttribute |
| Class for hdf5 attribute, which can be attached to groups and datasets. More...
|
|
class | Utopia::DataIO::HDFBufferFactory |
| Class which turns non-vector or plain-array containers into vectors. If the value_types are containers themselves, these are turned into vectors as well, because HDF5 cannot write something else. More...
|
|
class | Utopia::DataIO::HDFDataset |
| Class representing a HDFDataset, wich reads and writes data and attributes. More...
|
|
class | Utopia::DataIO::HDFDataspace |
| Class that wraps an HDF5 dataspace and takes care of managing its resources. More...
|
|
class | Utopia::DataIO::HDFFile |
| Class representing a HDF5 file. More...
|
|
class | Utopia::DataIO::HDFGroup |
| Class represting a HDFGroup, an object analogous to a folder for HDFFiles. More...
|
|
class | Utopia::DataIO::HDFIdentifier |
| Wrapper class around an hdf5 identifier, used to manage reference counts of the object this identifier refers to. More...
|
|
class | Utopia::DataIO::HDFObject< objectcategory > |
| Common base class for all HDF5 classes in the DATAIO Module i.e., for all classes that wrap HDF5-C-Library functionality like HDFDataset, HDFGroup, HDFFile. This class is not intendet as something to be used independently, but only as a base class to be inherited from. More...
|
|
class | Utopia::DataIO::HDFType |
| Class which handles the conversion of C-types into hdf5types. More...
|
|
|
void | Utopia::DataIO::swap (HDFAttribute &lhs, HDFAttribute &rhs) |
| Swaps the states of Attributes rhs and lhs. More...
|
|
void | Utopia::DataIO::swap (HDFDataset &lhs, HDFDataset &rhs) |
| Exchange state between lhs and rhs. More...
|
|
hsize_t | Utopia::DataIO::HDFDataspace::rank () |
| Get thet dataspace's rank, i.e., number of dimensions. More...
|
|
std::pair< arma::Row< hsize_t >, arma::Row< hsize_t > > | Utopia::DataIO::HDFDataspace::get_properties () |
| Get the properties object: size and capacity. @notice The dimensions can be infered from the size of the returned vectors. More...
|
|
arma::Row< hsize_t > | Utopia::DataIO::HDFDataspace::size () |
| Get the current size of the dataspace in each dimension. More...
|
|
arma::Row< hsize_t > | Utopia::DataIO::HDFDataspace::capacity () |
| Get the capacity of the dataspace in each dimension. More...
|
|
void | Utopia::DataIO::HDFDataspace::open () |
| Open the dataspace - set it to be equivalent to any data that later will be used to write or read. More...
|
|
template<typename Object > |
void | Utopia::DataIO::HDFDataspace::open (Object &&object) |
| Open the dataspace with an HDF5 object, i.e., dataset or attribute. More...
|
|
void | Utopia::DataIO::HDFDataspace::open (std::string name, hsize_t rank, arma::Row< hsize_t > extent, arma::Row< hsize_t > capacity) |
| Open a new dataset of type 'simple', which is equivalent to a N-dimensional array of dimension N = 'rank', a given extent, and a given maximum capacity that in each dimension must be greater or equal to the extent. More...
|
|
std::pair< arma::Row< hsize_t >, arma::Row< hsize_t > > | Utopia::DataIO::HDFDataspace::get_selection_bounds () |
| Get the selection bounding box, i.e., the start and end vector of the currently selected subset of the dataspace. More...
|
|
void | Utopia::DataIO::HDFDataspace::select_slice (arma::Row< hsize_t > start, arma::Row< hsize_t > end, arma::Row< hsize_t > stride) |
| Select a slice in the dataspace defined by [start, end, stride] in the manner of numpy. Overwrites old selections. More...
|
|
void | Utopia::DataIO::HDFDataspace::select_all () |
| Select the entire dataspace as hyperslap to be read/written to. More...
|
|
void | Utopia::DataIO::HDFDataspace::resize (arma::Row< hsize_t > new_size) |
| Resize the dataspace. The new size needs to fit into the dataspaces capacity. More...
|
|
void | Utopia::DataIO::HDFDataspace::release_selection () |
| Release a previously defined selection. More...
|
|
| Utopia::DataIO::HDFDataspace::HDFDataspace () |
| Construct HDFDataspace per default. Equivalent to using H5S_ALL when employing the pure C interface. More...
|
|
| Utopia::DataIO::HDFDataspace::HDFDataspace (const HDFDataspace &)=default |
| Copy constructor. More...
|
|
| Utopia::DataIO::HDFDataspace::HDFDataspace (HDFDataspace &&)=default |
| Move constructor. More...
|
|
HDFDataspace & | Utopia::DataIO::HDFDataspace::operator= (const HDFDataspace &)=default |
| Copy assign dataspace. More...
|
|
HDFDataspace & | Utopia::DataIO::HDFDataspace::operator= (HDFDataspace &&)=default |
| Move assign dataspace. More...
|
|
| Utopia::DataIO::HDFDataspace::HDFDataspace (std::string name, hsize_t rank, std::vector< hsize_t > extent, std::vector< hsize_t > capacity) |
| Construct HDFDataspace from the given arguments. More...
|
|
template<typename Object > |
| Utopia::DataIO::HDFDataspace::HDFDataspace (Object &&object, std::enable_if_t< not std::is_same_v< std::decay_t< Object >, HDFDataspace >, int >=0) |
| Construct a new HDFDataspace object from an HDFDataset or HDFAttribute. This loads the file-dataspace that belongs to the dataset or attribute such that it gets managed by this class. More...
|
|
virtual | Utopia::DataIO::HDFDataspace::~HDFDataspace ()=default |
| Destroy the HDFDataspace object. More...
|
|
void | Utopia::DataIO::HDFDataspace::swap (HDFDataspace &other) |
| Swap state with argument. More...
|
|
void | Utopia::DataIO::swap (HDFDataspace &lhs, HDFDataspace &rhs) |
| Swap states of lhs and rhs. More...
|
|
void | Utopia::DataIO::swap (HDFGroup &lhs, HDFGroup &rhs) |
| Swap lhs and rhs. More...
|
|
bool | Utopia::DataIO::operator== (const HDFIdentifier &lhs, const HDFIdentifier &rhs) |
| Comparsion operator for equality. More...
|
|
bool | Utopia::DataIO::operator!= (const HDFIdentifier &lhs, const HDFIdentifier &rhs) |
| Comparsion operator for inequality. More...
|
|
void | Utopia::DataIO::swap (HDFIdentifier &lhs, HDFIdentifier &rhs) |
| Exchange the states of lhs and rhs. More...
|
|
template<HDFCategory cat> |
void | Utopia::DataIO::swap (HDFObject< cat > &lhs, HDFObject< cat > &rhs) |
| Exchange state of lhs and rhs. More...
|
|
bool | Utopia::DataIO::operator== (const HDFType &lhs, const HDFType &rhs) |
| Check equality of argument typefactories. Two typefactories are considered equal when they refer to the same HDF5 type, e.g., H5T_INTEGER, or H5T_VLEN. More...
|
|
bool | Utopia::DataIO::operator!= (const HDFType &lhs, const HDFType &rhs) |
| TODO. More...
|
|
bool | Utopia::DataIO::check_validity (htri_t valid, const std::string_view object_name) |
| Check for validity of a hdf5 htri_t type or similar. More...
|
|
htri_t | Utopia::DataIO::path_exists (hid_t loc_id, std::string path, hid_t link_property_list=H5P_DEFAULT) |
| Checks iteratively if each segment of a path exists. More...
|
|
auto | Utopia::DataIO::path_is_valid (hid_t id, std::string path) |
| Check if the path given relative to the object identified by 'id' exists and points to a valid hdf5 object. More...
|
|
template<HDFCategory category> |
std::string | Utopia::DataIO::category_to_string () |
| Turn category enum into a string that names it. More...
|
|
template<class Object > |
std::string | Utopia::DataIO::generate_object_name (const Object &object) |
| Use category and path variable of object to make a string that identifies the object it is applied to. More...
|
|
template<typename Object > |
hid_t | Utopia::DataIO::open_dataspace (Object &&object) |
| Depending on object category, opens a dataset or attribute dataspace. More...
|
|
template<typename Object > |
hid_t | Utopia::DataIO::open_type (Object &&object) |
| Depending on object category, invokes H5Dget_type or H5Aget_type. More...
|
|
Low-level interface for using HDF5 with modern C++ and STL.
Overview
This backend is a replacement of the HDF5 C++ wrappers. It does not implement the full HDF5 standard, but only the features we deemed useful and needed for the Utopia project. It was created because the C++ wrappers supplied by the HDF5 group do not support STL containers and in general no modern C++ features. Furthermore, development of the pure C implementation is much faster and it is generally more complete.
Implementation
In this module, C++ classes are created which represent HDF5 files, groups, datasets and attributes, with the associated object creation- and data I/O- capabilities, limited to one and two-dimensional datasets of arrays, containers or scalars. Additionally, helper classes for organizing type mapping and type conversion are supplied, which normally are irelevant for users. Finally a number of helper functions are supplied which are used to assert correctness.