EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
ehm_dal::SavedGame Class Reference

The SavedGame class parses uncompressed EHM .sav saved games. More...

#include <saved_game.h>

Public Member Functions

 SavedGame ()
 Default constructor.
 
 ~SavedGame ()
 Default destructor.
 
void clearAll ()
 Clear all of the saved game tables.
 
bool read (const QString &file_path)
 Reads the .sav file at file_path and parses the saved game and the Database within.
 

Static Public Member Functions

static std::shared_ptr< ehm_dal::saved_game::SavedGameDatadata ()
 Returns the saved game data comprising saved game sub-files.
 

Detailed Description

The SavedGame class parses uncompressed EHM .sav saved games.

The database contained within the saved game is automatically detected and then parsed by the Database class. The class is compatible uncompressed saved games only. The parsed sub-files are static members of Saved Game, allowing easy access without the need to continually construct or pass an instantation of Saved Game to functions.

Member Function Documentation

◆ data()

static std::shared_ptr< ehm_dal::saved_game::SavedGameData > ehm_dal::SavedGame::data ( )
static

Returns the saved game data comprising saved game sub-files.

Returns
a shared_ptr to the saved game data.

◆ read()

bool ehm_dal::SavedGame::read ( const QString &  file_path)

Reads the .sav file at file_path and parses the saved game and the Database within.

Parameters
file_pathfile_path Path to the database.db file; e.g. "C:\Users\archibalduk\Desktop\my_saved_game.sav"
Returns
whether the file was successfully opened and parsed.