Class gspace#

Class Documentation#

class gspace#

Helper for reading and writing attributes on an HDF5 group.

This wrapper mirrors dspace but binds directly to an HDF5 group instead of a dataset.

Public Functions

inline explicit gspace(const H5::Group &datasetx)#

Construct a group wrapper around an existing HDF5 group.

Parameters:

datasetx – Underlying HDF5 group object.

template<typename T>
inline void write_atr(const T data, const H5std_string &dataname)#

Write a scalar attribute to the wrapped group.

Template Parameters:

T – Type of the metadata value.

Parameters:
  • data – Scalar value to store as an attribute.

  • dataname – Name of the attribute.

template<typename T>
inline void read_atr(T &data, const H5std_string &dataname)#

Read a scalar attribute from the wrapped group.

Template Parameters:

T – Type of the metadata value.

Parameters:
  • data – Value to populate from the attribute.

  • dataname – Name of the attribute.

Public Members

H5::Group dataset#

Wrapped HDF5 group used for attribute access.