Debian Codegraph @

Source/Test/Evaluation/CReasonerEvaluationUpdaterThread.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_TEST_EVALUATION_CREASONEREVALUATIONUPDATERTHREAD_H
22 #define KONCLUDE_TEST_EVALUATION_CREASONEREVALUATIONUPDATERTHREAD_H
23
24 // Libraries includes
25 #include <QFileSystemWatcher>
26
27 // Namespace includes
28 #include "EvaluationSettings.h"
29 #include "CReasonerEvaluationUpdater.h"
30
31
32 // Other includes
33 #include "Config/CConfiguration.h"
34
35 #include "Concurrent/CThread.h"
36
37 #include "Test/Evaluation/Events/CReasonerEvaluationUpdateEvent.h"
38 #include "Test/Evaluation/Events/CReasonerEvaluationProgramFileChangedEvent.h"
39
40 #include "Control/Command/CConfigManagerReader.h"
41
42 // Logger includes
43 #include "Logger/CLogger.h"
44
45
46
47 namespace Konclude {
48
49 using namespace Config;
50 using namespace Concurrent;
51 using namespace Control::Command;
52
53 namespace Test {
54
55 namespace Evaluation {
56
57 using namespace Evaluation::Events;
58
59
60 /*!
61 *
62 * \class CReasonerEvaluationUpdaterThread
63 * \author Andreas Steigmiller
64 * \version 0.1
65 * \brief TODO
66 *
67 */
68 class CReasonerEvaluationUpdaterThread : public CThread, public CReasonerEvaluationUpdater {
69 Q_OBJECT
70
71 // public methods
72 public:
73 //! Constructor
74 CReasonerEvaluationUpdaterThread();
75
76 //! Destructor
77 virtual ~CReasonerEvaluationUpdaterThread();
78
79
80 void addProgramFile(const QString& changedFile);
81
82 // protected methods
83 protected:
84 virtual void threadStarted();
85 virtual void threadStopped();
86
87 virtual bool processCustomsEvents(QEvent::Type type, CCustomEvent* event);
88
89
90 // protected slots
91 protected slots:
92 void watchedProgramFileChanged(const QString& changedFile);
93
94
95 // protected variables
96 protected:
97 QFileSystemWatcher* mSystemWatcher;
98 QStringList mNextChangedProgramFileList;
99 QSet<QString> mNextChangedProgramFileSet;
100
101 bool mProgramRunning;
102
103 // private methods
104 private:
105
106 // private variables
107 private:
108
109 };
110
111 }; // end namespace Evaluation
112
113 }; // end namespace Test
114
115 }; // end namespace Konclude
116
117 #endif // KONCLUDE_TEST_EVALUATION_CREASONEREVALUATIONUPDATERTHREAD_H