Debian Codegraph @

Source/Reasoner/Answerer/CComplexConceptStepInstanceComputationProcess.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_CCOMPLEXCONCEPTSTEPINSTANCECOMPUTATIONPROCESS_H
22 #define KONCLUDE_REASONER_ANSWERER_CCOMPLEXCONCEPTSTEPINSTANCECOMPUTATIONPROCESS_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "AnswererSettings.h"
29 #include "CComplexConceptStepComputationProcess.h"
30 #include "CComputedItemDataNotificationLinker.h"
31
32
33
34 // Other includes
35 #include "Utilities/UtilitiesSettings.h"
36
37
38
39 // Logger includes
40 #include "Logger/CLogger.h"
41
42
43 namespace Konclude {
44
45 using namespace Utilities;
46
47 namespace Reasoner {
48
49 namespace Answerer {
50
51
52
53 /*!
54 *
55 * \class CComplexConceptStepInstanceComputationProcess
56 * \author Andreas Steigmiller
57 * \version 0.1
58 * \brief TODO
59 *
60 */
61 class CComplexConceptStepInstanceComputationProcess : public CComplexConceptStepComputationProcess {
62 // public methods
63 public:
64 //! Constructor
65 CComplexConceptStepInstanceComputationProcess();
66
67 ~CComplexConceptStepInstanceComputationProcess();
68
69 bool requiresAdditionalInstanceComputation();
70
71 bool requiresAllInstanceComputation();
72 CComplexConceptStepInstanceComputationProcess* setAllInstanceComputationRequired(bool allInstancesRequired);
73
74
75 bool hasAllInstancesComputed();
76 CComplexConceptStepInstanceComputationProcess* setAllInstancesComputed(bool allInstancesComputed);
77
78
79 double getExpectedInstancesCount();
80 CComplexConceptStepInstanceComputationProcess* setExpectedInstancesCount(double expectedCount);
81
82 cint64 getComputedInstancesCount();
83 cint64 getRequiredInstancesCount();
84 cint64 getAdditionalRequiredComputedInstancesCount();
85
86 CComplexConceptStepInstanceComputationProcess* updateComputedInstancesCount(cint64 instancesCount, function<void(CComputedItemDataNotificationLinker* notificationLinker)> waitingHandlerFunction);
87 CComplexConceptStepInstanceComputationProcess* updateAllInstancesComputed(function<void(CComputedItemDataNotificationLinker* notificationLinker)> waitingHandlerFunction);
88
89
90 CComplexConceptStepInstanceComputationProcess* addComputedInstancesCountRequirement(cint64 count, CComputedItemDataNotificationLinker* notificationLinker);
91
92 CComplexConceptStepInstanceComputationProcess* clearComputedInstancesCount();
93
94
95 // protected methods
96 protected:
97
98 // protected variables
99 protected:
100 QMap<cint64, CRequirementWaitingDependencyData> mCountDataMap;
101
102 bool mRequiredAllInstances;
103
104
105 bool mAllInstancesComputed;
106
107 double mExpectedInstancesCount;
108
109
110 cint64 mComputedInstancesCount;
111 cint64 mMaximalRequiredInstancesCount;
112
113 // private methods
114 private:
115
116 // private variables
117 private:
118
119 };
120
121 }; // end namespace Answerer
122
123 }; // end namespace Reasoner
124
125 }; // end namespace Konclude
126
127 #endif // KONCLUDE_REASONER_ANSWERER_CCOMPLEXCONCEPTSTEPINSTANCECOMPUTATIONPROCESS_H