Cppcheck
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ThreadExecutor Class Reference

This class will take a list of filenames and settings and check then all files using threads. More...

#include <threadexecutor.h>

Inheritance diagram for ThreadExecutor:
ErrorLogger

List of all members.

Public Member Functions

 ThreadExecutor (const std::map< std::string, std::size_t > &files, Settings &settings, ErrorLogger &_errorLogger)
virtual ~ThreadExecutor ()
unsigned int check ()
virtual void reportOut (const std::string &outmsg)
 Information about progress is directed here.
virtual void reportErr (const ErrorLogger::ErrorMessage &msg)
 Information about found errors and warnings is directed here.
virtual void reportInfo (const ErrorLogger::ErrorMessage &msg)
 Output information messages.
void addFileContent (const std::string &path, const std::string &content)
 Add content to a file, to be used in unit testing.

Static Public Member Functions

static bool isEnabled ()

Private Member Functions

 ThreadExecutor (const ThreadExecutor &)
 disabled copy constructor
void operator= (const ThreadExecutor &)
 disabled assignment operator

Private Attributes

const std::map< std::string,
std::size_t > & 
_files
Settings_settings
ErrorLogger_errorLogger
unsigned int _fileCount

Detailed Description

This class will take a list of filenames and settings and check then all files using threads.

Definition at line 43 of file threadexecutor.h.


Constructor & Destructor Documentation

ThreadExecutor::ThreadExecutor ( const std::map< std::string, std::size_t > &  files,
Settings settings,
ErrorLogger _errorLogger 
)

Definition at line 47 of file threadexecutor.cpp.

Definition at line 60 of file threadexecutor.cpp.

disabled copy constructor


Member Function Documentation

void ThreadExecutor::addFileContent ( const std::string &  path,
const std::string &  content 
)

Add content to a file, to be used in unit testing.

Parameters:
pathFile name (used as a key to link with real file).
contentIf the file would be a real file, this should be the content of the file.

Definition at line 499 of file threadexecutor.cpp.

unsigned int ThreadExecutor::check ( )

Definition at line 504 of file threadexecutor.cpp.

Referenced by CppCheckExecutor::check().

static bool ThreadExecutor::isEnabled ( ) [inline, static]
Returns:
true if support for threads exist.

Definition at line 132 of file threadexecutor.h.

Referenced by CppCheckExecutor::check().

void ThreadExecutor::operator= ( const ThreadExecutor ) [private]

disabled assignment operator

void ThreadExecutor::reportErr ( const ErrorLogger::ErrorMessage msg) [virtual]

Information about found errors and warnings is directed here.

Override this to receive the errormessages.

Parameters:
msgLocation and other information about the found error.

Implements ErrorLogger.

Definition at line 513 of file threadexecutor.cpp.

void ThreadExecutor::reportInfo ( const ErrorLogger::ErrorMessage msg) [virtual]

Output information messages.

Parameters:
msgLocation and other information about the found error.

Reimplemented from ErrorLogger.

Definition at line 518 of file threadexecutor.cpp.

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

Information about progress is directed here.

Override this to receive the progress messages.

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

Implements ErrorLogger.

Definition at line 509 of file threadexecutor.cpp.


Member Data Documentation

Definition at line 65 of file threadexecutor.h.

unsigned int ThreadExecutor::_fileCount [private]

Definition at line 66 of file threadexecutor.h.

const std::map<std::string, std::size_t>& ThreadExecutor::_files [private]

Definition at line 63 of file threadexecutor.h.

Definition at line 64 of file threadexecutor.h.


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