Cppcheck
Classes | Public Member Functions | Static Public Member Functions
ErrorLogger Class Reference

This is an interface, which the class responsible of error logging should implement. More...

#include <errorlogger.h>

Inheritance diagram for ErrorLogger:
CppCheck CppCheckExecutor ThreadExecutor ThreadResult

List of all members.

Classes

class  ErrorMessage
 Wrapper for error messages, provided by reportErr() More...

Public Member Functions

 ErrorLogger ()
virtual ~ErrorLogger ()
virtual void reportOut (const std::string &outmsg)=0
 Information about progress is directed here.
virtual void reportErr (const ErrorLogger::ErrorMessage &msg)=0
 Information about found errors and warnings is directed here.
virtual void reportProgress (const std::string &filename, const char stage[], const std::size_t value)
 Report progress to client.
virtual void reportInfo (const ErrorLogger::ErrorMessage &msg)
 Output information messages.
void reportUnmatchedSuppressions (const std::list< Suppressions::SuppressionEntry > &unmatched)
 Report list of unmatched suppressions.

Static Public Member Functions

static std::string callStackToString (const std::list< ErrorLogger::ErrorMessage::FileLocation > &callStack)

Detailed Description

This is an interface, which the class responsible of error logging should implement.

Definition at line 148 of file errorlogger.h.


Constructor & Destructor Documentation

Definition at line 261 of file errorlogger.h.

virtual ErrorLogger::~ErrorLogger ( ) [inline, virtual]

Definition at line 262 of file errorlogger.h.


Member Function Documentation

std::string ErrorLogger::callStackToString ( const std::list< ErrorLogger::ErrorMessage::FileLocation > &  callStack) [static]
virtual void ErrorLogger::reportErr ( const ErrorLogger::ErrorMessage msg) [pure virtual]
virtual void ErrorLogger::reportInfo ( const ErrorLogger::ErrorMessage msg) [inline, virtual]

Output information messages.

Parameters:
msgLocation and other information about the found error.

Reimplemented in CppCheck, CppCheckExecutor, and ThreadExecutor.

Definition at line 296 of file errorlogger.h.

Referenced by Preprocessor::missingInclude(), CppCheck::reportInfo(), and Preprocessor::validateCfgError().

virtual void ErrorLogger::reportOut ( const std::string &  outmsg) [pure virtual]

Information about progress is directed here.

Override this to receive the progress messages.

Parameters:
outmsgMessage to show e.g. "Checking main.cpp..."

Implemented in CppCheck, ThreadResult, CppCheckExecutor, and ThreadExecutor.

Referenced by CppCheck::checkFunctionUsage(), CppCheck::findError(), Tokenizer::printUnknownTypes(), CppCheck::processFile(), and CppCheck::reportOut().

virtual void ErrorLogger::reportProgress ( const std::string &  filename,
const char  stage[],
const std::size_t  value 
) [inline, virtual]

Report progress to client.

Parameters:
filenamemain file that is checked
stagefor example preprocess / tokenize / simplify / check
valueprogress value (0-100)

Reimplemented in CppCheck, and CppCheckExecutor.

Definition at line 286 of file errorlogger.h.

Referenced by CheckBufferOverrun::checkGlobalAndLocalVariable(), Preprocessor::getcfgs(), Preprocessor::handleIncludes(), CppCheck::reportProgress(), Tokenizer::simplifyKnownVariablesSimplify(), and Tokenizer::simplifyTypedef().

Report list of unmatched suppressions.

Parameters:
unmatchedlist of unmatched suppressions (from Settings::Suppressions::getUnmatched(Local|Global)Suppressions)

Definition at line 325 of file errorlogger.cpp.

References Severity::information, and reportErr().

Referenced by CppCheckExecutor::check(), and CppCheck::processFile().


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