Player12
An open source football management simulator
Loading...
Searching...
No Matches
guidance.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <cstddef>
12#include <memory>
13#include <vector>
14
15#include "model/data_hub.h"
16#include "model/delegation.h"
17#include "model/onboarding.h"
19
21
32{
33 public:
35 static constexpr std::size_t MAX_SNAPSHOTS = 130;
36
40
42 void addSnapshot(ManagedMatchSnapshot snapshot);
43 const std::vector<ManagedMatchSnapshot>& getSnapshots() const
44 {
45 return snapshots;
46 }
47
49 bool wasStored() const { return stored; }
50
51 void load(const std::shared_ptr<DatabaseConnection>& db_conn);
53 void save(const std::shared_ptr<DatabaseConnection>& db_conn) const;
55 void onSaved();
56
57 private:
58 std::vector<ManagedMatchSnapshot> snapshots;
60 std::size_t unsaved_from = 0;
62 bool pruned = false;
63 bool stored = false;
64};
Per-career state of the guidance features: first-week checklist, delegation policy,...
Definition guidance.h:32
OnboardingState onboarding
Definition guidance.h:37
bool wasStored() const
Definition guidance.h:49
void load(const std::shared_ptr< DatabaseConnection > &db_conn)
Definition guidance.cpp:67
void addSnapshot(ManagedMatchSnapshot snapshot)
Definition guidance.cpp:44
DelegationPolicy delegation
Definition guidance.h:38
bool pruned
Definition guidance.h:62
std::size_t unsaved_from
Definition guidance.h:60
const std::vector< ManagedMatchSnapshot > & getSnapshots() const
Definition guidance.h:43
static constexpr std::size_t MAX_SNAPSHOTS
Definition guidance.h:35
std::vector< ManagedMatchSnapshot > snapshots
Definition guidance.h:58
OppositionPlan opposition
Definition guidance.h:39
void onSaved()
Definition guidance.cpp:226
bool stored
Definition guidance.h:63
void save(const std::shared_ptr< DatabaseConnection > &db_conn) const
Definition guidance.cpp:149
Manages the SQLite database connection and transaction lifecycle.
Definition database_connection.h:24
Who handles each duty of the managed club.
Definition delegation.h:61
Progress of the first-week checklist.
Definition onboarding.h:42
Instructions against upcoming opponents, per opponent and player (OppositionInstruction is declared i...
Definition opposition_report.h:40
Detail of a managed match that the persisted report does not keep: shot positions,...
Definition data_hub.h:48