|
| HDFFile (std::string filename, FileAccess flag) |
| Constructor from filename and access mode. More...
|
|
| ~HDFFile () |
| Destructor. More...
|
|
size_t | size (std::string dataset) const |
| Get size of the dataset of valid file. More...
|
|
template<typename T > |
bool | read (std::string dataset, T *buffer, size_t length) const |
| load data from a valid file. More...
|
|
template<typename T > |
bool | write (std::string dataset, T const *data, size_t length) |
| Write data to a valid file. More...
|
|
bool | valid () const |
| Check that the file is valid. More...
|
|
template<> |
bool | read (std::string dataset, int *buffer, size_t length) const |
|
template<> |
bool | read (std::string dataset, unsigned int *buffer, size_t length) const |
|
template<> |
bool | read (std::string dataset, long *buffer, size_t length) const |
|
template<> |
bool | read (std::string dataset, unsigned long *buffer, size_t length) const |
|
template<> |
bool | read (std::string dataset, double *buffer, size_t length) const |
|
template<> |
bool | read (std::string dataset, Complex *buffer, size_t length) const |
|
template<> |
bool | write (std::string dataset, int const *buffer, size_t length) |
|
template<> |
bool | write (std::string dataset, unsigned int const *buffer, size_t length) |
|
template<> |
bool | write (std::string dataset, long const *buffer, size_t length) |
|
template<> |
bool | write (std::string dataset, unsigned long const *buffer, size_t length) |
|
template<> |
bool | write (std::string dataset, double const *buffer, size_t length) |
|
template<> |
bool | write (std::string dataset, Complex const *buffer, size_t length) |
|
This class abstracts the raw functions for work with HDF files, so that template functions can be used and the user doesn't need to bother with type specializations. The typical usage is
*
* ...
*
*
* if (hdffile.valid())
* hdffile.write(
"nums", nums.
data(), nums.
size());
* else
*
throw exception (
"Cannot write to test.hdf!");
*
*