.. _program_listing_file_src_utils_HDF5Utils.hpp: Program Listing for File HDF5Utils.hpp ====================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/utils/HDF5Utils.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef HDF5UTILS_HPP #define HDF5UTILS_HPP // Suppress clang-tidy warnings caused by just including hdf5.h, instead of // the individual HDF5 headers, since this is the paradigm that HDF5 wants // NOLINTBEGIN(misc-include-cleaner) #include "hdf5.h" #include #include #include #include #include #include namespace utils { auto readScalarAttrIfPresent(hid_t obj, const std::string& name) -> std::optional; auto readRequiredScalarAttr(hid_t obj, const std::string& name, const std::string& context) -> double; auto readDataset1D(hid_t grp, const std::string& name, const std::string& context) -> std::vector; auto datasetRank(hid_t grp, const std::string& name, const std::string& context) -> int; auto dataset2DShape(hid_t grp, const std::string& name, const std::string& context) -> std::pair; auto readDataset2D(hid_t grp, const std::string& name, const std::string& context) -> std::pair, std::pair>; auto readStringDataset1D(hid_t grp, const std::string& name, const std::string& context) -> std::vector; auto readDataset3D(hid_t grp, const std::string& name, const std::string& context) -> std::pair, std::array>; auto readFieldNames(hid_t grp, const std::string& context) -> std::vector; auto listGroupDatasetNames(hid_t grp) -> std::vector; auto vlenStrType() -> hid_t; auto fixedStrType(size_t size) -> hid_t; void writeStringAttr(hid_t loc, const std::string& name, const std::string& value); void writeULongAttr(hid_t loc, const std::string& name, unsigned long value); void writeBoolAttr(hid_t loc, const std::string& name, bool value); auto readULongAttr(hid_t loc, const std::string& name) -> unsigned long; void overwriteULongAttr(hid_t loc, const std::string& name, unsigned long value); void writeStringDataset(hid_t loc, const std::string& name, const std::string& value); void writeStringArrayAttr(hid_t loc, const std::string& name, const std::vector& values); auto createExtensible1dDataset(hid_t loc, const std::string& name, hid_t type) -> hid_t; auto createExtensible2dDataset(hid_t loc, const std::string& name, hid_t type, hsize_t nCols) -> hid_t; void writeFixed1dDataset(hid_t loc, const std::string& name, hid_t type, const void* data, hsize_t len, const std::string& units); void appendToDataset(hid_t loc, const std::string& name, hid_t memType, const void* value); void appendRowToDataset2d(hid_t loc, const std::string& name, hid_t memType, const void* rowData); auto childNameByIdx(hid_t loc, hsize_t idx) -> std::string; auto isExtensibleDataset(hid_t dset) -> bool; void appendDatasetContents(hid_t srcDset, hid_t dstDset); void appendFileContents(hid_t srcFile, hid_t dstFile); } // namespace utils // NOLINTEND(misc-include-cleaner) #endif // HDF5UTILS_HPP