6 #ifndef SWIFT_MISC_SIMULATION_BACKGROUNDVALIDATION_H
7 #define SWIFT_MISC_SIMULATION_BACKGROUNDVALIDATION_H
12 #include <QReadWriteLock>
23 namespace swift::misc::simulation
32 static const QStringList &getLogCategories();
39 void setCurrentSimulator(
const CSimulatorInfo &simulator,
const QString &simDirectory,
40 const QStringList &modelDirList);
60 bool triggerValidation(
const CSimulatorInfo &simulator,
const QString &simDirectory);
65 bool requestLastValidationResults();
69 void startUpdating(std::chrono::milliseconds ms);
81 virtual void beforeQuit() noexcept override;
84 mutable QReadWriteLock m_lock;
85 std::atomic_bool m_inWork {
false };
86 std::atomic_bool m_wasStopped {
false };
87 CSimulatorInfo m_simulator;
88 QString m_simDirectory;
89 QStringList m_modelDirList;
91 CAircraftModelList m_lastResultValid;
92 CAircraftModelList m_lastResultInvalid;
93 CSimulatorInfo m_lastResultSimulator;
95 bool m_lastResultWasStopped =
false;
96 std::atomic_int m_timerBasedRuns { 0 };
99 CSetting<settings::TModelMatching> m_matchingSettings {
this };
102 data::CModelSetCaches m_modelSets {
false,
this };
104 CThreadedTimer m_updateTimer;
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.