The SavedGameSubFile class represents a sub-file of a saved game and provides access to the binary data.
More...
#include <saved_game_sub_file.h>
|
| SavedGameSubFile () |
| Default constructor.
|
|
| ~SavedGameSubFile () |
| Default destructor.
|
|
void | readHeader (QDataStream &in) |
| Reads the saved game header relating to the SavedGameTable.
|
|
void | readTable (QDataStream &in) |
| Reads the raw binary data relating to the SavedGameTable.
|
|
bool | isDatabaseTable () const |
| Returns whether or not the SavedGameTable is the saved game's Database table (i.e. database.zdb)
|
|
qint32 | estimatedBytesPerRow () const |
| Returns the estimated size of each row in bytes. This is based on the estimated record count.
|
|
qint32 | estimatedRowCount () const |
| Returns the estimated row count based on the integer or short value of the first four or two bytes of the raw data. Whether or not an integer (4 bytes) or short (2 bytes) is more suitable is automatically detected.
|
|
QString | fileName () const |
| Returns the file name.
|
|
quint32 | filePosition () const |
| Returns the sub-file position (i.e. offset) within the saved game file.
|
|
double | fileSizeKilobytes () const |
| Returns the file size in KB (kilobytes). 1 KB = 1024 bytes.
|
|
QByteArray * | data () |
| Returns a pointer to the raw data of the sub-file.
|
|
The SavedGameSubFile class represents a sub-file of a saved game and provides access to the binary data.
◆ ENUM_FLAGS
The ENUM_TEXT_LENGTH enum denotes the fixed length of 8-bit char
arrays of table names in the saved game header.
Enumerator |
---|
TABLE_NAME_LENGTH | fixed length of 8-bit char arrays of table names in the saved game header
|
◆ data()
QByteArray * ehm_dal::saved_game::SavedGameSubFile::data |
( |
| ) |
|
Returns a pointer to the raw data of the sub-file.
- Returns
- a pointer to the
QByteArray
raw data.
◆ estimatedBytesPerRow()
qint32 ehm_dal::saved_game::SavedGameSubFile::estimatedBytesPerRow |
( |
| ) |
const |
|
inline |
Returns the estimated size of each row in bytes. This is based on the estimated record count.
- Returns
- the estimated size of each row in bytes.
◆ estimatedRowCount()
qint32 ehm_dal::saved_game::SavedGameSubFile::estimatedRowCount |
( |
| ) |
const |
|
inline |
Returns the estimated row count based on the integer or short value of the first four or two bytes of the raw data. Whether or not an integer (4 bytes) or short (2 bytes) is more suitable is automatically detected.
- Returns
- the estimated row count.
◆ fileName()
QString ehm_dal::saved_game::SavedGameSubFile::fileName |
( |
| ) |
const |
|
inline |
Returns the file name.
- Returns
- the file name.
◆ filePosition()
quint32 ehm_dal::saved_game::SavedGameSubFile::filePosition |
( |
| ) |
const |
|
inline |
Returns the sub-file position (i.e. offset) within the saved game file.
- Returns
- the file position/offset.
◆ fileSizeKilobytes()
double ehm_dal::saved_game::SavedGameSubFile::fileSizeKilobytes |
( |
| ) |
const |
Returns the file size in KB (kilobytes). 1 KB = 1024 bytes.
- Returns
- the file size in KB (kilobytes).
◆ isDatabaseTable()
bool ehm_dal::saved_game::SavedGameSubFile::isDatabaseTable |
( |
| ) |
const |
|
inline |
◆ readHeader()
void ehm_dal::saved_game::SavedGameSubFile::readHeader |
( |
QDataStream & |
in | ) |
|
Reads the saved game header relating to the SavedGameTable.
- Parameters
-
in | QDataStream attached to the saved game |
◆ readTable()
void ehm_dal::saved_game::SavedGameSubFile::readTable |
( |
QDataStream & |
in | ) |
|
Reads the raw binary data relating to the SavedGameTable.
- Parameters
-
in | QDataStream attached to the saved game |