Vocabulary Printer Class. More...
#include <vocprinter.H>
Public Member Functions | |
void | PrintWords (const std::vector< std::string > &words) |
Print Words function. | |
void | PrintCorrectString () |
Print correct string function. | |
void | PrintWrongString (const std::vector< std::string > &words, const bool &bBeep) |
Print wrong string function. | |
void | PrintStartString () |
Print start string function. | |
void | PrintEndString (size_t nWords, size_t nInquiries, size_t nWrong, size_t nSecs) |
Print end string function. |
Private Member Functions | |
void | printLine (std::string strLine) |
Helper function. | |
std::string | genWordString (const std::vector< std::string > &words) |
Helper function. | |
void | beep () |
Helper function. |
Vocabulary Printer Class.
This class handles all the functionality between writing to the console and Vocatra.
|
private |
Helper function.
Plays a beep sound
|
private |
Helper function.
Generates a string with the given words
words | vector with words to append to string |
void CVocPrinter::PrintCorrectString | ( | ) |
Print correct string function.
This function prints a string to the standard output stream, if the answer is correct.
Referenced by CVocTrainer::Learn().
void CVocPrinter::PrintEndString | ( | size_t | nWords, |
size_t | nInquiries, | ||
size_t | nWrong, | ||
size_t | nSecs | ||
) |
Print end string function.
This function prints the end string to the standard output stream.
nWords | number of learned vocabulary words |
nInquiries | number of word inquiries |
nWrong | number of wrong answers |
nSecs | number of seconds since the learning process has started |
Referenced by CVocTrainer::Learn().
|
private |
Helper function.
Prints line to stdout.
strLine | string to be printed |
void CVocPrinter::PrintStartString | ( | ) |
Print start string function.
This function prints the start string to the standard output stream.
Referenced by CVocTrainer::Learn().
void CVocPrinter::PrintWords | ( | const std::vector< std::string > & | words | ) |
Print Words function.
This function prints the words to stdout and separates them with a comma.
words | vector with words to print. |
Referenced by CVocTrainer::Learn().
void CVocPrinter::PrintWrongString | ( | const std::vector< std::string > & | words, |
const bool & | bBeep | ||
) |
Print wrong string function.
This function prints a string to the standard output stream, if the answer is wrong.
words | vector with words to print |
bBeep | If true, function will cause beep sound |
Referenced by CVocTrainer::Learn().
Generated for Vocatra by |