6 #ifndef SWIFT_MISC_SIMULATION_BACKGROUNDVALIDATION_H
7 #define SWIFT_MISC_SIMULATION_BACKGROUNDVALIDATION_H
12 #include <QReadWriteLock>
22 namespace swift::misc::simulation
31 static const QStringList &getLogCategories();
38 void setCurrentSimulator(
const CSimulatorInfo &simulator,
const QString &simDirectory,
39 const QStringList &modelDirList);
59 bool triggerValidation(
const CSimulatorInfo &simulator,
const QString &simDirectory);
64 bool requestLastValidationResults();
76 virtual void beforeQuit() noexcept override;
79 mutable QReadWriteLock m_lock;
80 std::atomic_bool m_inWork {
false };
81 std::atomic_bool m_wasStopped {
false };
82 CSimulatorInfo m_simulator;
83 QString m_simDirectory;
84 QStringList m_modelDirList;
86 CAircraftModelList m_lastResultValid;
87 CAircraftModelList m_lastResultInvalid;
88 CSimulatorInfo m_lastResultSimulator;
90 bool m_lastResultWasStopped =
false;
91 std::atomic_int m_timerBasedRuns { 0 };
94 CSetting<settings::TModelMatching> m_matchingSettings {
this };
97 data::CModelSetCaches m_modelSets {
false,
this };
Base class for a long-lived worker object which lives in its own thread.
Status messages, e.g. from Core -> GUI.
Value object encapsulating a list of aircraft models.
Validate model files from the sets and check if the model still exists.
void validating(bool running)
Validating.
bool isValidating() const
Validation in progress.
void validated(const CSimulatorInfo &simulator, const CAircraftModelList &validModels, const CAircraftModelList &invalidModels, bool stopped, const CStatusMessageList &msgs)
Validated for simulator.
Simple hardcoded info about the corresponding simulator.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.