tfel
Loading...
Searching...
No Matches
tfel::check::PCILogDriver Struct Referenceabstract
Inheritance diagram for tfel::check::PCILogDriver:
tfel::check::PCJUnitDriver tfel::check::PCTextDriver

Public Member Functions

 PCILogDriver ()
 constructor
 PCILogDriver (std::ostream &)
 constructor
 PCILogDriver (const std::string &)
 constructor
 PCILogDriver (PCILogDriver &&) noexcept
 move constructor
 PCILogDriver (const PCILogDriver &)
 copy constructor
virtual void addMessage (const std::string &)=0
 Append a message to log. Append a message to log (to be implemented by inherited class).
virtual void reportSkippedTest (const std::string &)=0
 report that a test has been skipped
virtual void addTestResult (const std::string &testname, const std::string &step, const std::string &command, float time, bool success, const std::string &message="")=0
 add a test result to log. Append a test result to log (to be implemented by inherited class).
virtual void terminate ()
 terminate driver use.
virtual ~PCILogDriver ()
 destructor

Protected Member Functions

std::ostream & getStream ()
 get current ostream

Constructor & Destructor Documentation

◆ PCILogDriver() [1/2]

tfel::check::PCILogDriver::PCILogDriver ( std::ostream & )
explicit

constructor

Parameters
osoutput stream.

◆ PCILogDriver() [2/2]

tfel::check::PCILogDriver::PCILogDriver ( const std::string & )
explicit

constructor

Parameters
fstring containing the name of the file where logs are to be written. Default : write to stdout (screen).

Member Function Documentation

◆ addMessage()

virtual void tfel::check::PCILogDriver::addMessage ( const std::string & )
pure virtual

Append a message to log. Append a message to log (to be implemented by inherited class).

Parameters
[in]messagea message to send to log.

Implemented in tfel::check::PCJUnitDriver, and tfel::check::PCTextDriver.

◆ addTestResult()

virtual void tfel::check::PCILogDriver::addTestResult ( const std::string & testname,
const std::string & step,
const std::string & command,
float time,
bool success,
const std::string & message = "" )
pure virtual

add a test result to log. Append a test result to log (to be implemented by inherited class).

Parameters
testnamea string message explaining the test
stepa string describing the current step
commanda string describing the test command
timea float, test time execution
successa bool test success
messagea string message explaining the test result

Implemented in tfel::check::PCJUnitDriver, and tfel::check::PCTextDriver.

◆ getStream()

std::ostream & tfel::check::PCILogDriver::getStream ( )
protected

get current ostream

Method to be used by inherited class to obtain an ostream ref that as been redirected to file if necessary.

Exemple (for inherited class): this->getStream() << "This is an important message" << endl;

See also
PCILogDriver()
Return values
ostream&a reference to current ostream

◆ reportSkippedTest()

virtual void tfel::check::PCILogDriver::reportSkippedTest ( const std::string & )
pure virtual

report that a test has been skipped

Parameters
[in]ddescription of the test

Implemented in tfel::check::PCJUnitDriver, and tfel::check::PCTextDriver.

◆ terminate()

virtual void tfel::check::PCILogDriver::terminate ( )
virtual

terminate driver use.

declare end of use of driver to properly close driver (to be overloaded by inherited class if necessary).

Reimplemented in tfel::check::PCJUnitDriver.


The documentation for this struct was generated from the following file: