#include <Database.h>
Public Types | |
| enum | formats { HDF5 } |
| Implemented database file formats. Add to this enum each time a new database format is implemented. | |
Public Member Functions | |
| Database () | |
| Default constructor. | |
| virtual | ~Database () |
| Destructor. | |
| virtual bool | create (const std::string &file_name)=0 |
| Creates a new database file with the supplied name. More... | |
| virtual bool | open (const std::string &file_name, const std::string &type)=0 |
| Opens an existing database file with the supplied name. More... | |
| virtual bool | close ()=0 |
| Closes the currently open database file. More... | |
| void | putInteger (const std::string &key, int data) |
| Writes an integer associated with the supplied key to currently open database file. More... | |
| virtual void | putIntegerArray (const std::string &key, const int *const data, int nelements)=0 |
| Writes an array of integers associated with the supplied key to the 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... | |
| virtual void | putDoubleArray (const std::string &key, const double *const data, int nelements)=0 |
| Writes an array of doubles associated with the supplied key to the 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... | |
| virtual void | getIntegerArray (const std::string &key, int *data, int nelements)=0 |
| Reads an array of integers 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... | |
| virtual void | getDoubleArray (const std::string &key, double *data, int nelements)=0 |
| Reads an array of doubles associated with the supplied key from the currently open database file. More... | |
| virtual void | getDoubleArray (const std::string &key, double *data, int nelements, int block_size, int stride)=0 |
| Reads an array of doubles associated with the supplied key from the currently open database file. More... | |
Class Database is an abstract base class that provides basic ability to write to and read from a file. It's capabilities are limited to what the SVD algorithm needs to read and write its basis vectors.
|
pure virtual |
Closes the currently open database file.
Implemented in CAROM::HDFDatabase.
|
pure virtual |
Creates a new database file with the supplied name.
| [in] | file_name | Name of database file to create. |
Implemented in CAROM::HDFDatabase.
|
inline |
Reads a double associated with the supplied key from the currently open database file.
| [in] | key | The key associated with the value to be read. |
| [out] | data | The double value read. |
|
pure virtual |
Reads an array of doubles associated with the supplied key from the currently open 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. |
Implemented in CAROM::HDFDatabase.
|
pure virtual |
Reads an array of doubles associated with the supplied key from the currently open 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. |
Implemented in CAROM::HDFDatabase.
|
inline |
Reads an integer associated with the supplied key from the currently open database file.
| [in] | key | The key associated with the value to be read. |
| [out] | data | The integer value read. |
|
pure virtual |
Reads an array of integers associated with the supplied key from the currently open 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. |
Implemented in CAROM::HDFDatabase.
|
pure virtual |
Opens an existing database file with the supplied name.
| [in] | file_name | Name of existing database file to open. |
| [in] | type | Read/write type ("r"/"wr") |
Implemented in CAROM::HDFDatabase.
|
inline |
Writes a double associated with the supplied key to currently open database file.
| [in] | key | The key associated with the value to be written. |
| [in] | data | The double value to be written. |
|
pure virtual |
Writes an array of doubles associated with the supplied key to the currently open 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. |
Implemented in CAROM::HDFDatabase.
|
inline |
Writes an integer associated with the supplied key to currently open database file.
| [in] | key | The key associated with the value to be written. |
| [in] | data | The integer value to be written. |
|
pure virtual |
Writes an array of integers associated with the supplied key to the currently open 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. |
Implemented in CAROM::HDFDatabase.
1.8.5