Debian Codegraph @

Source/Reasoner/Consistiser/COntologyPrecomputationItem.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_CONSISTISER_CONTOLOGYPRECOMPUTATIONITEM_H
22 #define KONCLUDE_REASONER_CONSISTISER_CONTOLOGYPRECOMPUTATIONITEM_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ConsistiserSettings.h"
29 #include "CPrecomputatorStatistics.h"
30
31
32 // Other includes
33 #include "Reasoner/Ontology/CConcreteOntology.h"
34 #include "Reasoner/Ontology/COntologyProcessingRequirement.h"
35
36 #include "Reasoner/Consistence/CConsistenceCalculationStatisticsCollection.h"
37 #include "Reasoner/Consistence/CConsistenceStatisticsCollectionStrings.h"
38
39
40 #include "Concurrent/Callback/CCallbackRememberLinkedExecuter.h"
41 #include "Concurrent/Callback/CCallbackData.h"
42 #include "Concurrent/Callback/CCallbackListExecuter.h"
43
44 #include "Config/CConfigurationBase.h"
45 #include "Config/CConfigDataReader.h"
46
47
48 // Logger includes
49 #include "Logger/CLogger.h"
50
51
52 namespace Konclude {
53
54 using namespace Concurrent::Callback;
55 using namespace Config;
56
57 namespace Reasoner {
58
59 using namespace Ontology;
60 using namespace Consistence;
61
62 namespace Consistiser {
63
64
65 /*!
66 *
67 * \class COntologyPrecomputationItem
68 * \author Andreas Steigmiller
69 * \version 0.1
70 * \brief TODO
71 *
72 */
73 class COntologyPrecomputationItem {
74 // public methods
75 public:
76 //! Constructor
77 COntologyPrecomputationItem();
78
79 COntologyPrecomputationItem* initPrecomputationItem(CConcreteOntology* ontology, CConfigurationBase* config);
80
81 virtual COntologyPrecomputationItem* addPrecomputationRequirement(COntologyProcessingRequirement* ontoRequirement);
82
83 bool isPrecomputationFinished();
84 COntologyPrecomputationItem* setPrecomputationFinished(bool finished, bool doCallbacks = true);
85 COntologyPrecomputationItem* doPrecomputationFinishedCallback(bool doCallbacks);
86
87 COntologyPrecomputationItem* addPrecomputationFinishedCallback(CCallbackData* callback);
88
89 CConfigurationBase* getConfiguration();
90 CConcreteOntology* getOntology();
91
92
93 QSet<CPrecomputationTestingItem*>* getPrecomputationTestingItemSet();
94 cint64 getCurrentPrecomputationTestingCount();
95 bool hasCurrentPrecomputationTesting();
96
97
98 CPrecomputatorStatistics* getPrecomputatorStatistics();
99 CConsistenceStatisticsCollectionStrings* getConsistenceStatisticsCollectionStrings();
100 CConsistenceCalculationStatisticsCollection* getCalculationStatisticsCollection();
101 COntologyPrecomputationItem* reuseCalculationStatisticsCollection(CConsistenceCalculationStatisticsCollection* statColl);
102
103 bool isProcessStatisticsCollectionConfigured();
104
105 // protected methods
106 protected:
107
108 // protected variables
109 protected:
110 CConcreteOntology* mOntology;
111 CConfigurationBase* mConfig;
112
113 bool mPrecomputationFinishedFlag;
114 CCallbackListExecuter mCallbackExecuter;
115 QSet<CPrecomputationTestingItem*> mTestItemSet;
116
117
118 bool mConfCollectProcessStatistics;
119 CPrecomputatorStatistics mPrecomputatorStatistics;
120 CConsistenceStatisticsCollectionStrings* mConsistenceStatCollStrings;
121 QList<CConsistenceCalculationStatisticsCollection*> mReuseStatCollList;
122
123
124 // private methods
125 private:
126
127 // private variables
128 private:
129
130 };
131
132 }; // end namespace Consistiser
133
134 }; // end namespace Reasoner
135
136 }; // end namespace Konclude
137
138 #endif // KONCLUDE_REASONER_CONSISTISER_CONTOLOGYPRECOMPUTATIONITEM_H