Player12
An open source football management simulator
Loading...
Searching...
No Matches
save_manager.h File Reference
#include <sqlite3.h>
#include <cstdint>
#include <filesystem>
#include <functional>
#include <memory>
#include <string>
#include <vector>
#include "database/database_exception.h"
#include "model/gamedate.h"

Go to the source code of this file.

Classes

struct  SaveError
 
class  SaveFailure
 
struct  SaveMetadata
 
struct  SaveInspection
 
struct  SaveBackup
 
struct  SaveTimings
 
struct  AutosavePolicy
 
class  SaveManager
 

Enumerations

enum class  SaveStatus : std::uint8_t {
  Ok , Missing , Incomplete , Corrupt ,
  FutureVersion
}
 
enum class  SaveErrorKind : std::uint8_t {
  None , Missing , Incomplete , Corrupt ,
  FutureVersion , DiskFull , PermissionDenied , Io
}
 
enum class  SaveCheck : std::uint8_t { Quick , Full }
 
enum class  AutosaveFrequency : std::uint8_t {
  Off , Daily , Weekly , Monthly ,
  Matchday , SeasonEnd
}
 

Enumeration Type Documentation

◆ AutosaveFrequency

enum class AutosaveFrequency : std::uint8_t
strong

When the game saves on its own.

Enumerator
Off 
Daily 
Weekly 
Monthly 
Matchday 

The day after a match of the managed club.

SeasonEnd 

When a new season starts.

◆ SaveCheck

enum class SaveCheck : std::uint8_t
strong

How thoroughly SaveManager::inspect checks a file.

Enumerator
Quick 

PRAGMA quick_check (load screens).

Full 

PRAGMA integrity_check + foreign_key_check (before loading).

◆ SaveErrorKind

enum class SaveErrorKind : std::uint8_t
strong

Why a save or load failed.

Enumerator
None 
Missing 
Incomplete 
Corrupt 
FutureVersion 
DiskFull 
PermissionDenied 
Io 

◆ SaveStatus

enum class SaveStatus : std::uint8_t
strong

Health of a save file as seen by a load screen.

Enumerator
Ok 
Missing 
Incomplete 

No game state: the game stopped while creating it.

Corrupt 

Damaged file (integrity check failed / not a database).

FutureVersion 

Written by a newer game; left untouched.