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

Persists the managed club's inbox (table InboxMessages) and the inbox screen's filters (table InboxView). More...

#include <inbox_repository.h>

Public Member Functions

 InboxRepository (std::shared_ptr< DatabaseConnection > db_conn)
 
std::vector< InboxMessage > loadAll () const
 
void replaceAll (const std::vector< InboxMessage > &messages) const
 
InboxView loadView () const
 
void saveView (const InboxView &view) const
 

Private Attributes

std::shared_ptr< DatabaseConnection > db_conn
 

Detailed Description

Persists the managed club's inbox (table InboxMessages) and the inbox screen's filters (table InboxView).

Constructor & Destructor Documentation

◆ InboxRepository()

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

Member Function Documentation

◆ loadAll()

std::vector< InboxMessage > InboxRepository::loadAll ( ) const

Loads every message ordered by id.

◆ loadView()

InboxView InboxRepository::loadView ( ) const

Saved filters of the inbox screen (defaults when none were stored).

◆ replaceAll()

void InboxRepository::replaceAll ( const std::vector< InboxMessage > &  messages) const

Replaces the stored messages (the inbox is capped, so this is cheap).

◆ saveView()

void InboxRepository::saveView ( const InboxView &  view) const

Stores the filters of the inbox screen (table InboxView).

Member Data Documentation

◆ db_conn

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

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