#include <HDFDatabase.h>
Public Member Functions | |
HDFDatabase () | |
Default constructor. | |
virtual | ~HDFDatabase () |
Destructor. | |
virtual bool | create (const std::string &file_name) |
Creates a new HDF5 database file with the supplied name. More... | |
virtual bool | open (const std::string &file_name, const std::string &type) |
Opens an existing HDF5 database file with the supplied name. More... | |
virtual bool | close () |
Closes the currently open HDF5 database file. More... | |
virtual void | putIntegerArray (const std::string &key, const int *const data, int nelements) |
Writes an array of integers associated with the supplied key to the currently open HDF5 database file. More... | |
virtual void | putDoubleArray (const std::string &key, const double *const data, int nelements) |
Writes an array of doubles associated with the supplied key to the currently open HDF5 database file. More... | |
virtual void | getIntegerArray (const std::string &key, int *data, int nelements) |
Reads an array of integers associated with the supplied key from the currently open HDF5 database file. More... | |
virtual void | getDoubleArray (const std::string &key, double *data, int nelements) |
Reads an array of doubles associated with the supplied key from the currently open HDF5 database file. More... | |
virtual void | getDoubleArray (const std::string &key, double *data, int nelements, int block_size, int stride) |
Reads an array of doubles associated with the supplied key from the currently open HDF5 database file. More... | |
![]() | |
Database () | |
Default constructor. | |
virtual | ~Database () |
Destructor. | |
void | putInteger (const std::string &key, int data) |
Writes an integer associated with the supplied key to currently open database file. More... | |
void | putDouble (const std::string &key, double data) |
Writes a double associated with the supplied key to currently open database file. More... | |
void | getInteger (const std::string &key, int &data) |
Reads an integer associated with the supplied key from the currently open database file. More... | |
void | getDouble (const std::string &key, double &data) |
Reads a double associated with the supplied key from the currently open database file. More... | |
Additional Inherited Members | |
![]() | |
enum | formats { HDF5 } |
Implemented database file formats. Add to this enum each time a new database format is implemented. | |
HDFDatabase implements the interface of Database for HDF5 database files.
|
virtual |
Closes the currently open HDF5 database file.
Implements CAROM::Database.
|
virtual |
Creates a new HDF5 database file with the supplied name.
[in] | file_name | Name of HDF5 database file to create. |
Implements CAROM::Database.
|
virtual |
Reads an array of doubles associated with the supplied key from the currently open HDF5 database file.
[in] | key | The key associated with the array of values to be read. |
[out] | data | The allocated array of double values to be read. |
[in] | nelements | The number of doubles in the array. |
Implements CAROM::Database.
|
virtual |
Reads an array of doubles associated with the supplied key from the currently open HDF5 database file.
[in] | key | The key associated with the array of values to be read. |
[out] | data | The allocated array of double values to be read. |
[in] | nelements | The number of doubles in the array. |
[in] | block_size | The block size to read from the HDF5 dataset. |
[in] | stride | The stride to read from the HDF5 dataset. |
Implements CAROM::Database.
|
virtual |
Reads an array of integers associated with the supplied key from the currently open HDF5 database file.
[in] | key | The key associated with the array of values to be read. |
[out] | data | The allocated array of integer values to be read. |
[in] | nelements | The number of integers in the array. |
Implements CAROM::Database.
|
virtual |
Opens an existing HDF5 database file with the supplied name.
[in] | file_name | Name of existing HDF5 database file to open. |
[in] | type | Read/write type ("r"/"wr") |
Implements CAROM::Database.
|
virtual |
Writes an array of doubles associated with the supplied key to the currently open HDF5 database file.
[in] | key | The key associated with the array of values to be written. |
[in] | data | The array of double values to be written. |
[in] | nelements | The number of doubles in the array. |
Implements CAROM::Database.
|
virtual |
Writes an array of integers associated with the supplied key to the currently open HDF5 database file.
[in] | key | The key associated with the array of values to be written. |
[in] | data | The array of integer values to be written. |
[in] | nelements | The number of integers in the array. |
Implements CAROM::Database.