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

The Karateka class. More...

#include <karateka.h>

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

Public Member Functions

Karateka & with_name (const std::string &karateka_name)
 
Karateka & with_name (std::string &&karateka_name) noexcept
 
Karateka & with_surname (const std::string &karateka_surname)
 
Karateka & with_surname (std::string &&karateka_surname) noexcept
 
Karateka & with_birthdate (const Date &birthdate)
 
Karateka & with_birthdate (Date &&birthdate) noexcept
 
Karateka & with_birthdate (const std::string &birthdate_as_string)
 
Karateka & from_dojo (const std::string &dojo_name)
 
Karateka & from_dojo (std::string &&dojo_name) noexcept
 
Karateka & with_grade (const std::string &grade_as_string)
 
Karateka & with_grade (std::string &&grade_as_string) noexcept
 
void set_startnumber (size_t start_number)
 set_startnumber More...
 
size_t get_startnumber () const
 Return the startnumber. More...
 
void add_kata_score (float score) final
 Add a kata score for the current round. More...
 
void add_deduction (float deduction) final
 Add a deduction, which is subtracted from the overall score. More...
 
uint8_t next_round () final
 Move to next round. More...
 
float get_maximum_score_of_round (uint8_t round) const final
 Return the maximum score of the given round. More...
 
float get_minimum_score_of_round (uint8_t round) const final
 Return the minimum score of the given round. More...
 
float get_overall_score_of_round (uint8_t round) const final
 Return the overall score of the given round. More...
 
float get_maximum_score_of_current_round () const final
 Return the maximum score of the current round. More...
 
float get_minimum_score_of_current_round () const final
 Return the minimum score of the current round. More...
 
float get_overall_score_of_current_round () const final
 Return the overall score of the current round. More...
 
KataRoundScores::ScoreVectorType get_scores (uint8_t round) const
 Return all scores of a round. More...
 
float get_deduction (uint8_t round) const
 
std::string name () const
 Return the name of the Karateka. More...
 
std::string surname () const
 Return the surname of the Karateka. More...
 
std::string date_of_birth_as_string () const
 Return the date of birth of the Karateka. More...
 
Date date_of_birth () const
 Return a date of birth string of the Karateka. More...
 
std::string dojo () const
 Return the dojo the Karateka belongs to. More...
 
std::string grade () const
 Return the rank of the Karateka. More...
 
- Public Member Functions inherited from TournamentRunner::IKataPerformer
 IKataPerformer (const IKataPerformer &)=default
 
 IKataPerformer (IKataPerformer &&)=default
 
IKataPerformer & operator= (const IKataPerformer &)=default
 
IKataPerformer & operator= (IKataPerformer &&)=default
 

Friends

class boost::serialization::access
 

Detailed Description

The Karateka class.

A karateka is a person practicing karate and participating at a tournament.

Remarks
Serializable

Member Function Documentation

void TournamentRunner::Karateka::add_deduction ( float  deduction)
finalvirtual

Add a deduction, which is subtracted from the overall score.

Parameters
deductionDeduction value
Exceptions
std::length_errorexception if more than number_of_kata_scores_per_round scores are added

Implements TournamentRunner::IKataPerformer.

Here is the caller graph for this function:

void TournamentRunner::Karateka::add_kata_score ( float  score)
finalvirtual

Add a kata score for the current round.

Parameters
scoreThe score given
Exceptions
std::length_errorexception if more than number_of_kata_scores_per_round scores are added

Implements TournamentRunner::IKataPerformer.

Here is the caller graph for this function:

Date TournamentRunner::Karateka::date_of_birth ( ) const
inline

Return a date of birth string of the Karateka.

Returns
The karateka's date of birth
std::string TournamentRunner::Karateka::date_of_birth_as_string ( ) const
inline

Return the date of birth of the Karateka.

Returns
The karateka's date of birth as string

Here is the call graph for this function:

std::string TournamentRunner::Karateka::dojo ( ) const
inline

Return the dojo the Karateka belongs to.

Returns
The dojo the Karateka belongs to

Here is the caller graph for this function:

float TournamentRunner::Karateka::get_maximum_score_of_current_round ( ) const
finalvirtual

Return the maximum score of the current round.

Returns
the maximum score of the current round

Implements TournamentRunner::IKataPerformer.

float TournamentRunner::Karateka::get_maximum_score_of_round ( uint8_t  round) const
finalvirtual

Return the maximum score of the given round.

Parameters
roundThe round we want the maximum score from
Returns
the maximum score

Implements TournamentRunner::IKataPerformer.

float TournamentRunner::Karateka::get_minimum_score_of_current_round ( ) const
finalvirtual

Return the minimum score of the current round.

Returns
the minimum score of the current round

Implements TournamentRunner::IKataPerformer.

float TournamentRunner::Karateka::get_minimum_score_of_round ( uint8_t  round) const
finalvirtual

Return the minimum score of the given round.

Parameters
roundThe round we want the minimum score from
Returns
the minimum score

Implements TournamentRunner::IKataPerformer.

float TournamentRunner::Karateka::get_overall_score_of_current_round ( ) const
finalvirtual

Return the overall score of the current round.

Returns
the overall score of the current round

Implements TournamentRunner::IKataPerformer.

float TournamentRunner::Karateka::get_overall_score_of_round ( uint8_t  round) const
finalvirtual

Return the overall score of the given round.

Parameters
roundThe round we want the overall score from
Returns
the overall score

Implements TournamentRunner::IKataPerformer.

KataRoundScores::ScoreVectorType TournamentRunner::Karateka::get_scores ( uint8_t  round) const

Return all scores of a round.

Parameters
roundWhich round ?
Returns
All scores of round round
size_t TournamentRunner::Karateka::get_startnumber ( ) const
inline

Return the startnumber.

Returns
startnumber

Here is the caller graph for this function:

std::string TournamentRunner::Karateka::grade ( ) const
inline

Return the rank of the Karateka.

Returns
The karateka's rank
std::string TournamentRunner::Karateka::name ( ) const
inline

Return the name of the Karateka.

Returns
The karateka's name

Here is the caller graph for this function:

uint8_t TournamentRunner::Karateka::next_round ( )
finalvirtual

Move to next round.

Returns
the round number of the current round (after update)
Exceptions
std::length_errorexception if we try to move to a round larger than max_number_of_kata_rounds

Implements TournamentRunner::IKataPerformer.

Here is the caller graph for this function:

void TournamentRunner::Karateka::set_startnumber ( size_t  start_number)
inline

set_startnumber

Parameters
start_number

Here is the caller graph for this function:

std::string TournamentRunner::Karateka::surname ( ) const
inline

Return the surname of the Karateka.

Returns
The karateka's surname

Here is the caller graph for this function:


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