The Persistency class. More...
#include <persistency.h>


Public Member Functions | |
| Persistency ()=default | |
| Default Constructor. | |
| Persistency (std::string default_path) | |
| Constructor with default path. More... | |
| void | save_profile (const Tournament &tournament_to_save, const std::string &to_file) const final |
| void | save_profile (const Tournament &tournament_to_save) const final |
| Tournament | load_profile (const std::string &from_file) final |
| Tournament | load_profile () final |
| Load the default profile. More... | |
Public Member Functions inherited from TournamentRunner::IPersistency | |
| IPersistency (const IPersistency &)=default | |
| IPersistency (IPersistency &&)=default | |
| IPersistency & | operator= (const IPersistency &)=default |
| IPersistency & | operator= (IPersistency &&)=default |
The Persistency class.
Handles loading and saving tournament data (profiles). A tournament is serialized and saved to a file.
|
explicit |
Constructor with default path.
| default_path | The default path to profile files. |
|
finalvirtual |
| std::ios_base::failure | Thrown if the profile can not be loaded, e.g. the file doesn't exist |
Implements TournamentRunner::IPersistency.

|
finalvirtual |
Load the default profile.
| std::ios_base::failure | Thrown if the default profile can not be loaded, e.g. the file doesn't exist or the default file ist not set. |
Implements TournamentRunner::IPersistency.

|
finalvirtual |
| std::ios_base::failure | Thrown if the profile can not be saved. |
Implements TournamentRunner::IPersistency.

|
finalvirtual |
| std::ios_base::failure | Thrown if the profile can not be saved. |
Implements TournamentRunner::IPersistency.

1.8.6