Kata Tournament Runner  0.1.00
 All Classes Namespaces Functions Variables Enumerations Groups Pages
Public Member Functions | List of all members
TournamentRunner::Persistency Class Reference

The Persistency class. More...

#include <persistency.h>

Inheritance diagram for TournamentRunner::Persistency:
Inheritance graph
[legend]
Collaboration diagram for TournamentRunner::Persistency:
Collaboration graph
[legend]

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
 

Detailed Description

The Persistency class.

Handles loading and saving tournament data (profiles). A tournament is serialized and saved to a file.

Constructor & Destructor Documentation

TournamentRunner::Persistency::Persistency ( std::string  default_path)
explicit

Constructor with default path.

Parameters
default_pathThe default path to profile files.

Member Function Documentation

Tournament TournamentRunner::Persistency::load_profile ( const std::string &  from_file)
finalvirtual

Exceptions
std::ios_base::failureThrown if the profile can not be loaded, e.g. the file doesn't exist

Implements TournamentRunner::IPersistency.

Here is the call graph for this function:

Tournament TournamentRunner::Persistency::load_profile ( )
finalvirtual

Load the default profile.

Returns
The tournament loaded
Exceptions
std::ios_base::failureThrown if the default profile can not be loaded, e.g. the file doesn't exist or the default file ist not set.
See Also
Persistency(std::string)

Implements TournamentRunner::IPersistency.

Here is the caller graph for this function:

void TournamentRunner::Persistency::save_profile ( const Tournament &  tournament_to_save,
const std::string &  to_file 
) const
finalvirtual

Exceptions
std::ios_base::failureThrown if the profile can not be saved.

Implements TournamentRunner::IPersistency.

Here is the caller graph for this function:

void TournamentRunner::Persistency::save_profile ( const Tournament &  tournament_to_save) const
finalvirtual

Exceptions
std::ios_base::failureThrown if the profile can not be saved.

Implements TournamentRunner::IPersistency.

Here is the call graph for this function:


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