Cppcheck
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
XmlReport Class Referenceabstract

Base class for XML report classes. More...

#include <xmlreport.h>

Inheritance diagram for XmlReport:
Report XmlReportV1 XmlReportV2

Public Member Functions

 XmlReport (const QString &filename)
 
virtual QList< ErrorItemRead ()=0
 Read contents of the report file. More...
 
- Public Member Functions inherited from Report
 Report (const QString &filename)
 
virtual ~Report ()
 
virtual bool Create ()
 Create the report (file). More...
 
virtual bool Open ()
 Open the existing report (file). More...
 
virtual 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...
 

Static Public Member Functions

static QString quoteMessage (const QString &message)
 Quote the message. More...
 
static QString unquoteMessage (const QString &message)
 Unquote the message. More...
 
static int determineVersion (const QString &filename)
 Get the XML report format version from the file. More...
 

Additional Inherited Members

- Public Types inherited from Report
enum  Type { TXT, XML, XMLV2, CSV }
 
- Protected Member Functions inherited from Report
QFile * GetFile ()
 Get the file object where the report is written to. More...
 

Detailed Description

Base class for XML report classes.

Definition at line 36 of file xmlreport.h.

Constructor & Destructor Documentation

XmlReport::XmlReport ( const QString &  filename)

Definition at line 29 of file xmlreport.cpp.

Member Function Documentation

int XmlReport::determineVersion ( const QString &  filename)
static

Get the XML report format version from the file.

Parameters
filenameFilename of the report file.
Returns
XML report format version or 0 if error happened.

Definition at line 56 of file xmlreport.cpp.

References ResultElementName, and VersionAttribute.

Referenced by ResultsView::ReadErrorsXml().

QString XmlReport::quoteMessage ( const QString &  message)
static

Quote the message.

Parameters
messageMessage to quote.
Returns
quoted message.

Definition at line 34 of file xmlreport.cpp.

Referenced by XmlReportV1::WriteError(), and XmlReportV2::WriteError().

virtual QList<ErrorItem> XmlReport::Read ( )
pure virtual

Read contents of the report file.

Implemented in XmlReportV2, and XmlReportV1.

Referenced by ResultsView::ReadErrorsXml().

QString XmlReport::unquoteMessage ( const QString &  message)
static

Unquote the message.

Parameters
messageMessage to quote.
Returns
quoted message.

Definition at line 45 of file xmlreport.cpp.

Referenced by XmlReportV1::ReadError(), and XmlReportV2::ReadError().


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