24.02.1
|
Abstract printer class used by the Framework to present output. More...
#include <Printer.h>
Public Member Functions | |
Printer ()=default | |
Default constructor. More... | |
Printer (std::ostream &stream) | |
Construct printer with given output stream. More... | |
Printer (const Printer &)=delete | |
Prevent instances of this class from being copy constructed. More... | |
Printer & | operator= (const Printer &)=delete |
Prevent instances of this class from being copied. More... | |
Printer (Printer &&)=default | |
Allow instances of this class to be move constructed. More... | |
Printer & | operator= (Printer &&)=default |
Allow instances of this class to be moved. More... | |
virtual | ~Printer ()=default |
Default destructor. More... | |
void | print (const std::string &str) |
Print given string. More... | |
virtual void | print_entry (const std::string &name, const std::string &value)=0 |
Print an entry consisting of a (name, value) pair. More... | |
virtual void | print_global_header ()=0 |
Print global header. More... | |
virtual void | print_global_footer ()=0 |
Print global footer. More... | |
virtual void | print_run_header ()=0 |
Print header before running all tests. More... | |
virtual void | print_run_footer ()=0 |
Print footer after running all tests. More... | |
virtual void | print_test_header (const TestInfo &info)=0 |
Print header before a test. More... | |
virtual void | print_test_footer ()=0 |
Print footer after a test. More... | |
virtual void | print_errors_header ()=0 |
Print header before errors. More... | |
virtual void | print_errors_footer ()=0 |
Print footer after errors. More... | |
virtual void | print_list_tests (const std::vector< TestInfo > &infos)=0 |
Print the list of all the tests. More... | |
virtual void | print_error (const std::exception &error, bool expected)=0 |
Print test error. More... | |
virtual void | print_info (const std::string &info)=0 |
Print test log info. More... | |
virtual void | print_profiler_header (const std::string &header_data)=0 |
Print header data. More... | |
virtual void | print_measurements (const Profiler::MeasurementsMap &measurements)=0 |
Print measurements for a test. More... | |
void | set_stream (std::ostream &stream) |
Set the output stream. More... | |
Abstract printer class used by the Framework to present output.
|
default |
Default constructor.
Prints values to std::cout.
Printer | ( | std::ostream & | stream | ) |
Construct printer with given output stream.
[out] | stream | Output stream. |
Definition at line 32 of file Printer.cpp.
|
virtualdefault |
Default destructor.
void print | ( | const std::string & | str | ) |
Print given string.
[in] | str | String. |
Definition at line 37 of file Printer.cpp.
References caffe_mnist_image_extractor::str.
|
pure virtual |
Print an entry consisting of a (name, value) pair.
[in] | name | Description of the value. |
[in] | value | Value. |
Implemented in PrettyPrinter, and JSONPrinter.
|
pure virtual |
Print test error.
[in] | error | Description of the error. |
[in] | expected | Whether the error was expected or not. |
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::log_failed_expectation().
|
pure virtual |
Print footer after errors.
Implemented in PrettyPrinter, and JSONPrinter.
|
pure virtual |
Print header before errors.
Implemented in PrettyPrinter, and JSONPrinter.
|
pure virtual |
Print global footer.
Implemented in PrettyPrinter, and JSONPrinter.
|
pure virtual |
Print global header.
Implemented in PrettyPrinter, and JSONPrinter.
|
pure virtual |
Print test log info.
[in] | info | Description of the log. |
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::log_info().
|
pure virtual |
Print the list of all the tests.
[in] | infos | List of tests to print |
Implemented in PrettyPrinter, and JSONPrinter.
|
pure virtual |
Print measurements for a test.
[in] | measurements | Measurements as collected by a Profiler. |
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::log_test_end(), and Framework::print_test_results().
|
pure virtual |
Print header data.
[in] | header_data | JSON formmated header data. |
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::log_test_end(), and Framework::print_test_results().
|
pure virtual |
Print footer after running all tests.
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::print_test_results(), and Framework::run().
|
pure virtual |
Print header before running all tests.
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::print_test_results(), and Framework::run().
|
pure virtual |
Print footer after a test.
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::log_test_end(), and Framework::print_test_results().
|
pure virtual |
Print header before a test.
[in] | info | Test info. |
Implemented in PrettyPrinter, and JSONPrinter.
Referenced by Framework::log_test_start(), and Framework::print_test_results().
void set_stream | ( | std::ostream & | stream | ) |
Set the output stream.
[out] | stream | Output stream. |
Definition at line 42 of file Printer.cpp.