|
| void | save_bool_to_file (hid_t &aFileID, const std::string &aLabel, const bool &aValue, herr_t &aStatus) |
| void | load_bool_from_file (hid_t &aFileID, const std::string &aLabel, bool &aValue, herr_t &aStatus) |
| void | save_string_to_file (hid_t &aFileID, const std::string &aLabel, const std::string &aValue, herr_t &aStatus) |
| void | load_string_from_file (hid_t &aFileID, const std::string &aLabel, std::string &aValue, herr_t &aStatus) |
| hsize_t | get_array_size (hid_t &aFileID, const std::string &aLabel) |
| string | create_tree (const Cell< string > &aTree, const string &aLabel) |
| bool | dataset_exists (hid_t aLoc, const std::string &aLabel) |
| | test if a dataset exists ( tests for a link of that name; the link type is not checked )
|
| bool | group_exists (hid_t aLoc, const std::string &aLabel) |
| | test if a group exists ( tests for a link of that name; the link type is not checked )
|
| Cell< std::string > | get_groups (hid_t aLoc) |
| | list groups that exist in location
|
| template<typename T> |
| bool | check_datatye_size () |
| | this function returns true of both the HDF5 datatype and the passed datatype have the same size
|
| template<typename T> |
| void | check_read_datatype (const hid_t aFileType, const std::string &aLabel) |
| | Guard for every read: the FILE datatype must be convertible into T.
|
| template<typename T> |
| void | save_scalar_to_file (hid_t &aLoc, const std::string &aLabel, const T &aValue, herr_t &aStatus) |
| | saves a scalar value to a file file must be open
|
| template<typename T> |
| void | load_scalar_from_file (hid_t &aLoc, const std::string &aLabel, T &aValue, herr_t &aStatus) |
| template<typename T> |
| void | save_array_to_file (hid_t &aLoc, const std::string &aLabel, const T *aData, const hsize_t &aLength, herr_t &aStatus) |
| template<typename T> |
| void | load_array_from_file (hid_t &aLoc, const std::string &aLabel, T *aData, const hsize_t aLength, herr_t &aStatus) |
| template<typename T> |
| void | save_vector_to_file (hid_t &aLoc, const std::string &aLabel, const Vector< T > &aVector, herr_t &aStatus) |
| template<typename T> |
| void | load_vector_from_file (hid_t &aLoc, const std::string &aLabel, Vector< T > &aVector, herr_t &aStatus) |
| template<typename T> |
| void | save_matrix_to_file (hid_t &aLoc, const std::string &aLabel, const Matrix< T > &aMatrix, herr_t &aStatus, const bool aTranspose=false) |
| template<typename T> |
| void | load_matrix_from_file (hid_t &aLoc, const std::string &aLabel, Matrix< T > &aMatrix, herr_t &aStatus, const bool aTranspose=false) |
| void | save_strings_to_file (hid_t &aLoc, const std::string &aLabel, const Cell< string > &aCell, herr_t &aStatus) |
| void | load_strings_from_file (hid_t &aLoc, const std::string &aLabel, Cell< string > &aCell, herr_t &aStatus) |
| hid_t | open_group (const std::string &aLabel, hid_t aParent) |
| herr_t | close_group (hid_t aGroup) |
| template<typename T> |
| hid_t | datatype () |
| template<typename T> |
| hid_t | filetype () |
template<typename T>
| void belfem::hdf5::check_read_datatype |
( |
const hid_t | aFileType, |
|
|
const std::string & | aLabel ) |
Guard for every read: the FILE datatype must be convertible into T.
The loaders used to hand the file type to H5Dread as the MEMORY type as well, which tells HDF5 "no conversion" — it then copies at the FILE's element size, so an 8-byte file field read into a 4-byte object overruns it and a 4-byte field into an 8-byte object leaves the upper half uninitialized. Both silent. The exposure is a build-config mismatch, not an OS one: index_t / int_t are flag-selected ( BELFEM_INT64 ), and those are exactly the pointer and index arrays SpMatrix::save and the .bfm meshes write.
The loaders now pass datatype<T>() as the memory type, so HDF5 converts widths itself and a mixed-width file stays READABLE. This function refuses the case conversion cannot fix: a different datatype CLASS ( a float dataset read into an integer, say ), where HDF5 would happily produce numerically meaningless values. Always-active tier — the old class check was a BELFEM_ASSERT and vanished in release, which is where this bites.