Cppcheck
|
This class will take a list of filenames and settings and check then all files using threads. More...
#include <executor.h>
Public Member Functions | |
Executor (const std::list< FileWithDetails > &files, const std::list< FileSettings > &fileSettings, const Settings &settings, SuppressionList &suppressions, ErrorLogger &errorLogger) | |
virtual | ~Executor ()=default |
Executor (const Executor &)=delete | |
Executor & | operator= (const Executor &)=delete |
virtual unsigned int | check ()=0 |
void | reportStatus (std::size_t fileindex, std::size_t filecount, std::size_t sizedone, std::size_t sizetotal) |
Information about how many files have been checked. More... | |
Protected Member Functions | |
bool | hasToLog (const ErrorMessage &msg) |
Check if message is being suppressed and unique. More... | |
Protected Attributes | |
const std::list< FileWithDetails > & | mFiles |
const std::list< FileSettings > & | mFileSettings |
const Settings & | mSettings |
SuppressionList & | mSuppressions |
ErrorLogger & | mErrorLogger |
Private Attributes | |
std::mutex | mErrorListSync |
std::unordered_set< std::string > | mErrorList |
This class will take a list of filenames and settings and check then all files using threads.
Definition at line 43 of file executor.h.
Executor::Executor | ( | const std::list< FileWithDetails > & | files, |
const std::list< FileSettings > & | fileSettings, | ||
const Settings & | settings, | ||
SuppressionList & | suppressions, | ||
ErrorLogger & | errorLogger | ||
) |
Definition at line 33 of file executor.cpp.
|
virtualdefault |
|
delete |
|
pure virtual |
Implemented in ThreadExecutor, SingleExecutor, and ProcessExecutor.
|
protected |
Check if message is being suppressed and unique.
msg | the message to check |
Definition at line 41 of file executor.cpp.
References ErrorMessage::file0, SuppressionList::isSuppressed(), Settings::library, mErrorList, mErrorListSync, mSettings, mSuppressions, Library::reportErrors(), ErrorMessage::toString(), and Settings::verbose.
Referenced by ProcessExecutor::handleRead(), and SyncLogForwarder::reportErr().
void Executor::reportStatus | ( | std::size_t | fileindex, |
std::size_t | filecount, | ||
std::size_t | sizedone, | ||
std::size_t | sizetotal | ||
) |
Information about how many files have been checked.
fileindex | This many files have been checked. |
filecount | This many files there are in total. |
sizedone | The sum of sizes of the files checked. |
sizetotal | The total sizes of the files. |
Definition at line 61 of file executor.cpp.
References FgBlue, mErrorLogger, and ErrorLogger::reportOut().
Referenced by ProcessExecutor::check(), SingleExecutor::check(), and SyncLogForwarder::reportStatus().
|
private |
Definition at line 80 of file executor.h.
Referenced by hasToLog().
|
private |
Definition at line 78 of file executor.h.
Referenced by hasToLog().
|
protected |
Definition at line 75 of file executor.h.
Referenced by ThreadExecutor::check(), ProcessExecutor::handleRead(), ProcessExecutor::reportInternalChildErr(), and reportStatus().
|
protected |
Definition at line 71 of file executor.h.
Referenced by ProcessExecutor::check(), SingleExecutor::check(), and ThreadExecutor::check().
|
protected |
Definition at line 72 of file executor.h.
Referenced by ProcessExecutor::check(), SingleExecutor::check(), and ThreadExecutor::check().
|
protected |
Definition at line 73 of file executor.h.
Referenced by ProcessExecutor::check(), SingleExecutor::check(), ThreadExecutor::check(), ProcessExecutor::checkLoadAverage(), hasToLog(), ProcessExecutor::ProcessExecutor(), SingleExecutor::SingleExecutor(), and ThreadExecutor::ThreadExecutor().
|
protected |
Definition at line 74 of file executor.h.
Referenced by hasToLog(), and ProcessExecutor::reportInternalChildErr().