some utility functions to read attributes from hdf5 files
More...
|
| template<typename TH5 , typename Trequ > |
| static Trequ | read_scalar_attr (H5::Group &header, const std::string &name) |
| | reads scalar attribute from an hdf5 group
|
| |
| template<typename TH5 , typename Trequ > |
| static Trequ | read_vector_attr (H5::Group &header, const std::string &name, size_t idx) |
| | reads element of vector attribute from an hdf5 group
|
| |
| template<typename TH5 , typename Trequ > |
| static size_t | read_vector_attr (H5::Group &header, const std::string &name, Trequ *out) |
| | reads entire vector attribute from an hdf5 group
|
| |
some utility functions to read attributes from hdf5 files
◆ read_scalar_attr()
template<typename TH5 , typename Trequ >
| static Trequ hdf5Utils::read_scalar_attr |
( |
H5::Group & |
header, |
|
|
const std::string & |
name |
|
) |
| |
|
static |
reads scalar attribute from an hdf5 group
- Template Parameters
-
| TH5 | the attribute's type in the hdf5 file |
| Trequ | the type the attribute should be returned as |
- Parameters
-
| header | the group the attribute is attached to |
| name | the attribute's name |
- Returns
- the attribute
◆ read_vector_attr() [1/2]
template<typename TH5 , typename Trequ >
| static Trequ hdf5Utils::read_vector_attr |
( |
H5::Group & |
header, |
|
|
const std::string & |
name, |
|
|
size_t |
idx |
|
) |
| |
|
static |
reads element of vector attribute from an hdf5 group
- Template Parameters
-
| TH5 | the attribute's element type in the hdf5 file |
| Trequ | the type the attribute element should be returned as |
- Parameters
-
| header | the group the vector attribute is attached to |
| name | the attribute's name |
| idx | element index in the vector attribute |
- Returns
- the attribute element
◆ read_vector_attr() [2/2]
template<typename TH5 , typename Trequ >
| static size_t hdf5Utils::read_vector_attr |
( |
H5::Group & |
header, |
|
|
const std::string & |
name, |
|
|
Trequ * |
out |
|
) |
| |
|
static |
reads entire vector attribute from an hdf5 group
- Template Parameters
-
| TH5 | the attribute's element type in the hdf5 file |
| Trequ | the type the attribute's elements should be returned as |
- Parameters
-
| header | the group the vector attribute is attached to |
| name | the attribute's name |
| out | output buffer (sufficient space must be already allocated) |
- Returns
- number of elements in the vector attribute