|
Cppcheck
|
This class will take a list of filenames and settings and check then all files using threads. More...
#include <threadexecutor.h>
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 |
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.
| ThreadExecutor::ThreadExecutor | ( | const std::map< std::string, std::size_t > & | files, |
| Settings & | settings, | ||
| ErrorLogger & | _errorLogger | ||
| ) |
Definition at line 47 of file threadexecutor.cpp.
| ThreadExecutor::~ThreadExecutor | ( | ) | [virtual] |
Definition at line 60 of file threadexecutor.cpp.
| ThreadExecutor::ThreadExecutor | ( | const ThreadExecutor & | ) | [private] |
disabled copy constructor
| void ThreadExecutor::addFileContent | ( | const std::string & | path, |
| const std::string & | content | ||
| ) |
Add content to a file, to be used in unit testing.
| path | File name (used as a key to link with real file). |
| content | If 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] |
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.
| msg | Location 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.
| msg | Location 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.
| outmsg | Message to show e.g. "Checking main.cpp..." |
Implements ErrorLogger.
Definition at line 509 of file threadexecutor.cpp.
ErrorLogger& ThreadExecutor::_errorLogger [private] |
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.
Settings& ThreadExecutor::_settings [private] |
Definition at line 64 of file threadexecutor.h.
1.7.6.1