Cppcheck
Public Member Functions | Private Attributes | List of all members
CheckStatistics Class Reference

A class for check statistics. More...

#include <checkstatistics.h>

Inheritance diagram for CheckStatistics:

Public Member Functions

 CheckStatistics (QObject *parent=nullptr)
 
void addItem (const QString &tool, ShowTypes::ShowType type)
 Add new checked item to statistics. More...
 
void addChecker (const QString &checker)
 Add checker to statistics. More...
 
void clear ()
 Clear the statistics. More...
 
unsigned getCount (const QString &tool, ShowTypes::ShowType type) const
 Return statistics for given type. More...
 
const std::set< std::string > & getActiveCheckers () const
 
int getNumberOfActiveCheckers () const
 
QStringList getTools () const
 Get tools with results. More...
 
void setCheckersReport (QString report)
 
const QString & getCheckersReport () const
 

Private Attributes

QMap< QString, unsigned > mStyle
 
QMap< QString, unsigned > mWarning
 
QMap< QString, unsigned > mPerformance
 
QMap< QString, unsigned > mPortability
 
QMap< QString, unsigned > mInformation
 
QMap< QString, unsigned > mError
 
std::set< std::string > mActiveCheckers
 
QString mCheckersReport
 

Detailed Description

A class for check statistics.

Definition at line 39 of file checkstatistics.h.

Constructor & Destructor Documentation

◆ CheckStatistics()

CheckStatistics::CheckStatistics ( QObject *  parent = nullptr)
explicit

Definition at line 25 of file checkstatistics.cpp.

References clear().

Member Function Documentation

◆ addChecker()

void CheckStatistics::addChecker ( const QString &  checker)

Add checker to statistics.

Definition at line 68 of file checkstatistics.cpp.

References mActiveCheckers.

Referenced by ResultsView::error().

◆ addItem()

void CheckStatistics::addItem ( const QString &  tool,
ShowTypes::ShowType  type 
)

◆ clear()

void CheckStatistics::clear ( )

Clear the statistics.

Definition at line 73 of file checkstatistics.cpp.

References mActiveCheckers, mCheckersReport, mError, mInformation, mPerformance, mPortability, mStyle, and mWarning.

Referenced by CheckStatistics(), and ResultsView::clear().

◆ getActiveCheckers()

const std::set<std::string>& CheckStatistics::getActiveCheckers ( ) const
inline

Definition at line 71 of file checkstatistics.h.

References mActiveCheckers.

Referenced by ResultsView::checkingFinished().

◆ getCheckersReport()

const QString& CheckStatistics::getCheckersReport ( ) const
inline

Definition at line 85 of file checkstatistics.h.

References mCheckersReport.

Referenced by StatsDialog::setStatistics().

◆ getCount()

unsigned CheckStatistics::getCount ( const QString &  tool,
ShowTypes::ShowType  type 
) const

◆ getNumberOfActiveCheckers()

int CheckStatistics::getNumberOfActiveCheckers ( ) const
inline

Definition at line 75 of file checkstatistics.h.

References mActiveCheckers.

Referenced by StatsDialog::setStatistics().

◆ getTools()

QStringList CheckStatistics::getTools ( ) const

Get tools with results.

Definition at line 108 of file checkstatistics.cpp.

References mError, mPerformance, mPortability, mStyle, and mWarning.

Referenced by ResultsView::saveStatistics().

◆ setCheckersReport()

void CheckStatistics::setCheckersReport ( QString  report)
inline

Definition at line 82 of file checkstatistics.h.

References mCheckersReport.

Referenced by ResultsView::checkingFinished().

Member Data Documentation

◆ mActiveCheckers

std::set<std::string> CheckStatistics::mActiveCheckers
private

Definition at line 96 of file checkstatistics.h.

Referenced by addChecker(), clear(), getActiveCheckers(), and getNumberOfActiveCheckers().

◆ mCheckersReport

QString CheckStatistics::mCheckersReport
private

Definition at line 97 of file checkstatistics.h.

Referenced by clear(), getCheckersReport(), and setCheckersReport().

◆ mError

QMap<QString, unsigned> CheckStatistics::mError
private

Definition at line 95 of file checkstatistics.h.

Referenced by addItem(), clear(), getCount(), and getTools().

◆ mInformation

QMap<QString, unsigned> CheckStatistics::mInformation
private

Definition at line 94 of file checkstatistics.h.

Referenced by addItem(), clear(), and getCount().

◆ mPerformance

QMap<QString, unsigned> CheckStatistics::mPerformance
private

Definition at line 92 of file checkstatistics.h.

Referenced by addItem(), clear(), getCount(), and getTools().

◆ mPortability

QMap<QString, unsigned> CheckStatistics::mPortability
private

Definition at line 93 of file checkstatistics.h.

Referenced by addItem(), clear(), getCount(), and getTools().

◆ mStyle

QMap<QString, unsigned> CheckStatistics::mStyle
private

Definition at line 90 of file checkstatistics.h.

Referenced by addItem(), clear(), getCount(), and getTools().

◆ mWarning

QMap<QString, unsigned> CheckStatistics::mWarning
private

Definition at line 91 of file checkstatistics.h.

Referenced by addItem(), clear(), getCount(), and getTools().


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