47 bool read(
const QString &file_path);
54 bool read(QDataStream &in);
62 bool read(QDataStream &in,
const qsizetype file_size);
80 static TableData table_data_;
83 static QByteArray end_of_file_data_;
86 qsizetype remainingBytes(QDataStream &in,
87 const qsizetype file_start_pos,
88 const qsizetype file_size);
89 bool readEndOfFile(QDataStream &in,
const qsizetype bytes_to_read);
93 void initChildTables();
The Database class parses the database.db file and provides access to its tables.
Definition: database.h:28
bool read(const QString &file_path)
Reads a database.db from the file_path and parses each of the tables.
bool read(QDataStream &in, const qsizetype file_size)
Reads file_size bytes a database.db file from QDataStream and parses each of the tables....
void clearAll()
Clear all of the database tables.
static std::shared_ptr< ehm_dal::tables::AbstractTable > table(const ehm_dal::tables::TableIndex table_id)
Returns a shared pointer to a Table with a ehm_dal::tables::TableIndex of table_id.
bool read(QDataStream &in)
Reads a database.db file from QDataStream and parses each of the tables. The QDataStream is parsed fr...
Database()
Default constructor.
qint32 tableCount() const
Returns the number of database tables.
namespace ehm_dal::tables
Definition: column.h:4
TableIndex
The TableIndex enum represents the id number of each table within the database.
Definition: table_index.h:14