Debian Codegraph @

Source/Test/Evaluation/CReasonerKoncludeEvaluationProvider.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_CREASONERKONCLUDEEVALUATIONPROVIDER_H
22 #define KONCLUDE_TEST_EVALUATION_CREASONERKONCLUDEEVALUATIONPROVIDER_H
23
24 // Libraries includes
25 #include <QProcess>
26 #include <QString>
27 #include <QStringList>
28 #include <QDir>
29 #include <QObject>
30
31 // Namespace includes
32 #include "CReasonerEvaluationTerminationResult.h"
33 #include "CReasonerEvaluationProvider.h"
34
35
36 // Other includes
37 #include "Config/CConfigDataReader.h"
38
39 // Logger includes
40 #include "Logger/CLogger.h"
41
42
43
44 namespace Konclude {
45
46 using namespace Config;
47
48 namespace Test {
49
50 namespace Evaluation {
51
52
53 /*!
54 *
55 * \class CReasonerKoncludeEvaluationProvider
56 * \author Andreas Steigmiller
57 * \version 0.1
58 * \brief TODO
59 *
60 */
61 class CReasonerKoncludeEvaluationProvider : public QObject, public CReasonerEvaluationProvider {
62 Q_OBJECT
63
64 // public methods
65 public:
66 //! Constructor
67 CReasonerKoncludeEvaluationProvider();
68
69 //! Destructor
70 virtual ~CReasonerKoncludeEvaluationProvider();
71
72
73 virtual bool createReasoner(CConfiguration *config);
74 virtual CReasonerEvaluationTerminationResult* destroyReasoner();
75
76 virtual QString getReasonerAddressString();
77
78 // protected methods
79 protected:
80 bool assistTermination(Q_PID processID);
81
82 public slots:
83 void processError(QProcess::ProcessError error);
84 void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
85
86 // protected variables
87 protected:
88 QString mReasonerName;
89 QString mReasonerBinaryFile;
90 QString mReasonerBinaryArguments;
91 cint64 mReasonerPort;
92
93 QProcess* mProcess;
94 bool mProcessError;
95 bool mProcessFinished;
96
97 cint64 mKillTimeout;
98 QString mKillScriptString;
99 QString mKillScriptArgumentsString;
100
101 // private methods
102 private:
103
104 // private variables
105 private:
106
107 };
108
109 }; // end namespace Evaluation
110
111 }; // end namespace Test
112
113 }; // end namespace Konclude
114
115 #endif // KONCLUDE_TEST_EVALUATION_CREASONERKONCLUDEEVALUATIONPROVIDER_H