![]() |
DUNE: Uniform Navigational Environment
2022.04.1
|
Simplifies reading data and attributes from HDF5 format files.
Classes | |
struct | HDF5Dataset |
Public Member Functions | |
HDF5Reader (std::string const &filename) | |
~HDF5Reader () | |
bool | datasetExists (std::string const &path) const |
template<typename T > | |
HDF5Dataset< T > | getDataset (std::string const &path) const |
template<typename T > | |
std::vector< T > | getAttribute (std::string const &path, std::string const &attribute) const |
DUNE::Parsers::HDF5Reader::HDF5Reader | ( | std::string const & | filename | ) |
|
default |
Destructor.
Referenced by HDF5Reader().
bool DUNE::Parsers::HDF5Reader::datasetExists | ( | std::string const & | path | ) | const |
Check if a dataset exists in the given file.
[in] | path | path to the dataset in the file. |
template std::vector< long double > DUNE::Parsers::HDF5Reader::getAttribute< long double > | ( | std::string const & | path, |
std::string const & | attribute | ||
) | const |
Get an attribute.
[in] | path | path to the node in the file where the attribute is stored. |
[in] | attribute | name of the attribute to get. |
References getDataset().
template HDF5Reader::HDF5Dataset< long double > DUNE::Parsers::HDF5Reader::getDataset | ( | std::string const & | path | ) | const |
Get a dataset and its dimensions.
[in] | path | path to the dataset in the file. |
Referenced by getAttribute(), and Simulators::StreamVelocity::StreamGenerator::Gridded2DModelDataStreamGenerator::Gridded2DModelDataStreamGenerator().