EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
saved_game_data.h
1#pragma once
2
3
4// Application headers
5#include "saved_game_sub_file.h"
6
7// Qt headers
8class QDataStream;
9#include <QtGlobal>
10#include <memory>
11#include <vector>
12
18{
19public:
28
29 // File i/o
35 bool read(QDataStream &in);
36
37 // Find data
44 std::vector<std::shared_ptr<SavedGameSubFile>> find(
45 const QString &sub_file_name, const Qt::CaseSensitivity cs = Qt::CaseInsensitive);
46
47 // Get data - header
52 inline bool isCompressed() const { return compressed_flag_ != 0; }
53
54private:
55 // Header
56 qint32 compressed_flag_{0};
57 qint32 header_flag_{22};
58 qint32 table_count_{0};
59
60 // Tables
61 std::vector<std::shared_ptr<SavedGameSubFile>> tables_;
62};
63
64} // namespace ehm_dal::saved_game
65
66
The SavedGameData class contains the individual binary sub-files comprising the saved game.
Definition: saved_game_data.h:18
~SavedGameData()
Default destructor.
bool read(QDataStream &in)
Reads the saved game file from the QDataStream.
std::vector< std::shared_ptr< SavedGameSubFile > > find(const QString &sub_file_name, const Qt::CaseSensitivity cs=Qt::CaseInsensitive)
Finds all sub-files containing sub_file_name and returns all results in a vector.
SavedGameData()
Default constructor.
bool isCompressed() const
Returns whether the saved game is compressed.
Definition: saved_game_data.h:52
namespace ehm_dal::saved_game
Definition: saved_game_data.h:13