|
Player12
An open source football management simulator
|
Per-career state of the guidance features: first-week checklist, delegation policy, opposition instructions and the analytics snapshots of the managed club's matches. More...
#include <guidance.h>
Public Member Functions | |
| void | addSnapshot (ManagedMatchSnapshot snapshot) |
| const std::vector< ManagedMatchSnapshot > & | getSnapshots () const |
| bool | wasStored () const |
| void | load (const std::shared_ptr< DatabaseConnection > &db_conn) |
| void | save (const std::shared_ptr< DatabaseConnection > &db_conn) const |
| void | onSaved () |
Public Attributes | |
| OnboardingState | onboarding |
| DelegationPolicy | delegation |
| OppositionPlan | opposition |
Static Public Attributes | |
| static constexpr std::size_t | MAX_SNAPSHOTS = 130 |
Private Attributes | |
| std::vector< ManagedMatchSnapshot > | snapshots |
| std::size_t | unsaved_from = 0 |
| bool | pruned = false |
| bool | stored = false |
Per-career state of the guidance features: first-week checklist, delegation policy, opposition instructions and the analytics snapshots of the managed club's matches.
Persisted in GuidanceState, DelegatedDuties, OppositionInstructions and ManagedMatchAnalytics (assets/db/schema.sql) inside the game's save transaction.
| void CareerGuidance::addSnapshot | ( | ManagedMatchSnapshot | snapshot | ) |
Adds (or replaces the same fixture's) match snapshot.
|
inline |
| void CareerGuidance::load | ( | const std::shared_ptr< DatabaseConnection > & | db_conn | ) |
| void CareerGuidance::onSaved | ( | ) |
Marks the snapshots as persisted after a successful commit.
| void CareerGuidance::save | ( | const std::shared_ptr< DatabaseConnection > & | db_conn | ) | const |
Writes the state; must run inside the caller's transaction.
|
inline |
False for careers saved before the guidance features existed.
| DelegationPolicy CareerGuidance::delegation |
|
staticconstexpr |
Snapshots kept (oldest dropped): about two seasons of matches.
| OnboardingState CareerGuidance::onboarding |
| OppositionPlan CareerGuidance::opposition |
|
private |
Old snapshots were dropped since the last save.
|
private |
|
private |
|
private |
Snapshots from this index on are not in the database yet.