2009-02-19 23:21:18 +01:00
|
|
|
/*
|
|
|
|
* Cppcheck - A tool for static C/C++ code analysis
|
2023-01-28 10:16:34 +01:00
|
|
|
* Copyright (C) 2007-2023 Cppcheck team.
|
2009-02-19 23:21:18 +01:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-09-27 17:08:31 +02:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2009-02-19 23:21:18 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef THREADEXECUTOR_H
|
|
|
|
#define THREADEXECUTOR_H
|
|
|
|
|
2022-07-08 16:42:57 +02:00
|
|
|
#include "executor.h"
|
|
|
|
|
2017-05-27 04:33:47 +02:00
|
|
|
#include <cstddef>
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
|
2012-04-26 15:29:39 +02:00
|
|
|
class Settings;
|
2022-02-22 09:54:35 +01:00
|
|
|
class ErrorLogger;
|
2023-08-07 18:39:57 +02:00
|
|
|
class Suppressions;
|
2012-04-26 15:29:39 +02:00
|
|
|
|
2011-02-01 07:33:02 +01:00
|
|
|
/// @addtogroup CLI
|
|
|
|
/// @{
|
|
|
|
|
2009-02-19 23:21:18 +01:00
|
|
|
/**
|
|
|
|
* This class will take a list of filenames and settings and check then
|
|
|
|
* all files using threads.
|
|
|
|
*/
|
2022-07-08 16:42:57 +02:00
|
|
|
class ThreadExecutor : public Executor {
|
2009-02-19 23:21:18 +01:00
|
|
|
public:
|
2023-08-07 18:39:57 +02:00
|
|
|
ThreadExecutor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
2019-07-15 18:45:06 +02:00
|
|
|
ThreadExecutor(const ThreadExecutor &) = delete;
|
|
|
|
void operator=(const ThreadExecutor &) = delete;
|
2014-03-25 18:35:59 +01:00
|
|
|
|
2022-07-08 16:42:57 +02:00
|
|
|
unsigned int check() override;
|
2012-12-12 19:09:37 +01:00
|
|
|
|
2023-03-04 12:05:17 +01:00
|
|
|
friend class SyncLogForwarder;
|
2009-02-19 23:21:18 +01:00
|
|
|
};
|
|
|
|
|
2011-02-01 07:33:02 +01:00
|
|
|
/// @}
|
|
|
|
|
2009-02-19 23:21:18 +01:00
|
|
|
#endif // THREADEXECUTOR_H
|