|
| 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 pass datatype<T>() as the MEMORY type, so HDF5 converts between widths and a file written with another index width ( index_t / int_t follow BELFEM_INT64, as in SpMatrix::save and the .bfm meshes ) stays readable. Passing the file type instead would mean "no conversion": HDF5 would copy at the file's element size and overrun or half-fill the object, silently.
This function refuses what conversion cannot fix: a different datatype CLASS ( a float dataset read into an integer, say ), where HDF5 would produce numerically meaningless values. Always-active tier, because the mismatch shows up in release builds.