Debian Codegraph @

Source/Reasoner/Answerer/CComplexQueryProcessingData.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_REASONER_ANSWERER_CCOMPLEXQUERYPROCESSINGDATA_H
22 #define KONCLUDE_REASONER_ANSWERER_CCOMPLEXQUERYPROCESSINGDATA_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "AnswererSettings.h"
29 #include "CAnsweringHandlingStatistics.h"
30
31
32
33 // Other includes
34 #include "Reasoner/Query/CComplexAnsweringQuery.h"
35
36 #include "Concurrent/Callback/CCallbackData.h"
37
38 // Logger includes
39 #include "Logger/CLogger.h"
40
41
42 namespace Konclude {
43
44 using namespace Concurrent::Callback;
45
46 namespace Reasoner {
47
48 using namespace Query;
49
50 namespace Answerer {
51
52
53 /*!
54 *
55 * \class CComplexQueryProcessingData
56 * \author Andreas Steigmiller
57 * \version 0.1
58 * \brief TODO
59 *
60 */
61 class CComplexQueryProcessingData {
62 // public methods
63 public:
64 //! Constructor
65 CComplexQueryProcessingData(CComplexAnsweringQuery* query = nullptr, CCallbackData* callback = nullptr);
66
67 ~CComplexQueryProcessingData();
68
69
70 CComplexAnsweringQuery* getComplexAnsweringQuery();
71 CCallbackData* getCallback();
72
73
74
75 bool isUnsatisfiable();
76 CComplexQueryProcessingData* setUnsatisfiable(bool unsat);
77
78
79
80 bool isProcessingStarted();
81 CComplexQueryProcessingData* setProcessingStarted(bool started = true);
82
83 bool isProcessingFinished();
84 CComplexQueryProcessingData* setProcessingFinished(bool finished = true);
85
86 bool isSubQueryProcessingFinished();
87 CComplexQueryProcessingData* setSubQueryProcessingFinished(bool finished = true);
88
89 qint64 getTotalProcessingTime();
90 qint64 getSubQueryProcessingTime();
91
92
93
94
95 CAnsweringHandlingStatistics* getQueryProcessingInitializedAnsweringStatistics();
96 CComplexQueryProcessingData* setQueryProcessingInitializedAnsweringStatistics(CAnsweringHandlingStatistics* stats);
97
98 // protected methods
99 protected:
100
101 // protected variables
102 protected:
103 CComplexAnsweringQuery* mComplexAnsweringQuery;
104 CCallbackData* mCallback;
105
106
107 bool mUnsatisfiable;
108
109 bool mProcessingStarted = false;
110 bool mProcessingFinished = false;
111 bool mSubQueryProcessingFinished = false;
112 qint64 mProcessingTime = 0;
113 qint64 mSubQueryProcessingTime = 0;
114 QTime mProcessingTimer;
115
116
117 CAnsweringHandlingStatistics* mQueryProcessingInitializedAnsweringStatistics;
118
119
120
121
122 // private methods
123 private:
124
125 // private variables
126 private:
127
128 };
129
130 }; // end namespace Answerer
131
132 }; // end namespace Reasoner
133
134 }; // end namespace Konclude
135
136 #endif // KONCLUDE_REASONER_ANSWERER_CCOMPLEXQUERYPROCESSINGDATA_H