Debian Codegraph @

Source/Reasoner/Answerer/CAnsweringHandler.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_CANSWERINGHANDLER_H
22 #define KONCLUDE_REASONER_ANSWERER_CANSWERINGHANDLER_H
23
24 // Libraries includes
25 #include <QLinkedList>
26
27 // Namespace includes
28 #include "AnswererSettings.h"
29 #include "CAnsweringMessageData.h"
30 #include "CAnsweringProgress.h"
31 #include "CAnsweringStatistics.h"
32
33
34 // Other includes
35 #include "Reasoner/Query/CComplexAnsweringQuery.h"
36
37
38
39
40 // Logger includes
41 #include "Logger/CLogger.h"
42 #include "Logger/CLogIdentifier.h"
43
44
45
46
47
48 namespace Konclude {
49
50 namespace Reasoner {
51
52 using namespace Query;
53
54 namespace Answerer {
55
56
57
58 /*!
59 *
60 * \class CAnsweringHandler
61 * \author Andreas Steigmiller
62 * \version 0.1
63 * \brief TODO
64 *
65 */
66 class CAnsweringHandler {
67 // public methods
68 public:
69 //! Constructor
70 CAnsweringHandler();
71
72 //! Destructor
73 virtual ~CAnsweringHandler();
74
75 virtual bool addAnsweringComplexQuery(CComplexAnsweringQuery* complexAnsweringQuery, CCallbackData* callback = nullptr) = 0;
76
77 virtual bool canAnsweringComplexQuery(CComplexAnsweringQuery* complexAnsweringQuery) = 0;
78 virtual bool canAnsweringComplexQuery(bool composedQuery) = 0;
79
80
81 virtual bool initializeProcessing(CAnswererContext* answererContext) = 0;
82 virtual bool prepareProcessing(CAnswererContext* answererContext) = 0;
83
84
85 virtual bool continueCalculationCreation(CAnswererContext* answererContext) = 0;
86 virtual bool processCalculationMessage(CAnsweringMessageData* message, CAnswererContext* answererContext) = 0;
87 virtual bool processRequirementMessage(CAnsweringMessageData* message, CAnswererContext* answererContext) = 0;
88
89
90 virtual bool isAnsweringFinished(CAnswererContext* answererContext) = 0;
91
92 virtual CAnsweringProgress* getAnsweringProgress() = 0;
93
94
95 virtual CAnsweringHandler* addAnsweringStatistics(CAnsweringStatistics* stats, bool lastStoredDiff) = 0;
96 virtual CAnsweringHandler* storeAnsweringStatistics() = 0;
97
98
99 // protected methods
100 protected:
101
102 // protected variables
103 protected:
104
105
106 // private methods
107 private:
108
109 // private variables
110 private:
111
112 };
113
114 }; // end namespace Answerer
115
116 }; // end namespace Reasoner
117
118 }; // end namespace Konclude
119
120 #endif // KONCLUDE_REASONER_ANSWERER_CANSWERINGHANDLER_H