Cppcheck
|
A base class for reports. More...
#include <report.h>
Public Types | |
enum | Type { TXT , XMLV2 , CSV } |
Public Member Functions | |
Report (QString filename) | |
~Report () override | |
virtual bool | create () |
Create the report (file). More... | |
virtual bool | open () |
Open the existing report (file). More... | |
void | close () |
Close the report (file). More... | |
virtual void | writeHeader ()=0 |
Write report header. More... | |
virtual void | writeFooter ()=0 |
Write report footer. More... | |
virtual void | writeError (const ErrorItem &error)=0 |
Write error to report. More... | |
Protected Member Functions | |
QFile * | getFile () |
Get the file object where the report is written to. More... | |
Private Attributes | |
QString | mFilename |
Filename of the report. More... | |
QFile | mFile |
Fileobject for the report file. More... | |
enum Report::Type |
|
explicit |
Definition at line 25 of file report.cpp.
|
override |
Definition at line 29 of file report.cpp.
References close().
void Report::close | ( | ) |
Close the report (file).
Definition at line 54 of file report.cpp.
References mFile.
Referenced by ResultsTree::updateFromOldReport(), and ~Report().
|
virtual |
Create the report (file).
Reimplemented in XmlReportV2, TxtReport, PrintableReport, and CsvReport.
Definition at line 34 of file report.cpp.
References mFile, and mFilename.
Referenced by CsvReport::create(), TxtReport::create(), XmlReportV2::create(), and ResultsView::save().
|
protected |
Get the file object where the report is written to.
Definition at line 60 of file report.cpp.
References mFile.
Referenced by CsvReport::create(), TxtReport::create(), XmlReportV2::create(), and XmlReportV2::open().
|
virtual |
Open the existing report (file).
Reimplemented in XmlReportV2.
Definition at line 44 of file report.cpp.
References mFile, and mFilename.
Referenced by XmlReportV2::open().
|
pure virtual |
Write error to report.
error | Error data. |
Implemented in XmlReportV2, TxtReport, PrintableReport, and CsvReport.
Referenced by ResultsTree::saveErrors().
|
pure virtual |
Write report footer.
Implemented in XmlReportV2, TxtReport, PrintableReport, and CsvReport.
Referenced by ResultsTree::saveResults().
|
pure virtual |
Write report header.
Implemented in XmlReportV2, TxtReport, PrintableReport, and CsvReport.
Referenced by ResultsTree::saveResults().
|
private |
|
private |