Player12
An open source football management simulator
Loading...
Searching...
No Matches
TrainingRepository Class Reference

Persists club training plans and familiarity (table TeamTraining) and player focus and workload (table PlayerTraining). More...

#include <training_repository.h>

Public Member Functions

 TrainingRepository (std::shared_ptr< DatabaseConnection > db_conn)
 
std::unordered_map< TeamID, TeamTrainingPlan > loadPlans () const
 
std::unordered_map< PlayerID, PlayerTrainingState > loadPlayers () const
 
void replaceAll (const TrainingRegistry &registry) const
 

Private Attributes

std::shared_ptr< DatabaseConnection > db_conn
 

Detailed Description

Persists club training plans and familiarity (table TeamTraining) and player focus and workload (table PlayerTraining).

Constructor & Destructor Documentation

◆ TrainingRepository()

TrainingRepository::TrainingRepository ( std::shared_ptr< DatabaseConnection >  db_conn)
explicit

Member Function Documentation

◆ loadPlans()

std::unordered_map< TeamID, TeamTrainingPlan > TrainingRepository::loadPlans ( ) const

Loads every stored club plan.

◆ loadPlayers()

std::unordered_map< PlayerID, PlayerTrainingState > TrainingRepository::loadPlayers ( ) const

Loads every stored player state.

◆ replaceAll()

void TrainingRepository::replaceAll ( const TrainingRegistry &  registry) const

Replaces the stored plans and player states (caller's transaction).

Member Data Documentation

◆ db_conn

std::shared_ptr<DatabaseConnection> TrainingRepository::db_conn
private

The documentation for this class was generated from the following files: