Public Member Functions | Private Member Functions | List of all members
CVocPrinter Class Reference

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.

Detailed Description

Vocabulary Printer Class.

This class handles all the functionality between writing to the console and Vocatra.

Member Function Documentation

void CVocPrinter::beep ( )
private

Helper function.

Plays a beep sound

std::string CVocPrinter::genWordString ( const std::vector< std::string > &  words)
private

Helper function.

Generates a string with the given words

Parameters
wordsvector with words to append to string
Returns
generated 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.
Parameters
nWordsnumber of learned vocabulary words
nInquiriesnumber of word inquiries
nWrongnumber of wrong answers
nSecsnumber of seconds since the learning process has started

Referenced by CVocTrainer::Learn().

void CVocPrinter::printLine ( std::string  strLine)
private

Helper function.

Prints line to stdout.

Parameters
strLinestring 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.

Parameters
wordsvector 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.

Parameters
wordsvector with words to print
bBeepIf true, function will cause beep sound

Referenced by CVocTrainer::Learn().


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

Get Vocatra at SourceForge.net. Fast, secure and Free Open Source software downloads Generated for Vocatra by doxygen