Debian Codegraph @

Source/Reasoner/Kernel/Algorithm/CIndividualProcessNodeValueSpaceHandler.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_KERNEL_ALGORITHM_CINDIVIDUALPROCESSNODEVALUESPACEHANDLER_H
22 #define KONCLUDE_REASONER_KERNEL_ALGORITHM_CINDIVIDUALPROCESSNODEVALUESPACEHANDLER_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "AlgorithmSettings.h"
29 #include "CCalculationAlgorithmContext.h"
30 #include "CCalculationClashProcessingException.h"
31 #include "CDatatypeDependencyCollection.h"
32 #include "CDatatypeValueTestingCollection.h"
33 #include "CDependencyFactory.h"
34
35 // Other includes
36 #include "Reasoner/Kernel/Process/CIndividualProcessNode.h"
37 #include "Reasoner/Kernel/Process/CProcessingDataBox.h"
38
39 #include "Reasoner/Kernel/Process/Dependency/CDependencyTrackPoint.h"
40 #include "Reasoner/Kernel/Process/Dependency/CDATATYPETRIGGERDependencyNode.h"
41 #include "Reasoner/Kernel/Process/Dependency/CDATATYPECONNECTIONDependencyNode.h"
42
43
44 #include "Context/CContextBase.h"
45
46 // Logger includes
47 #include "Logger/CLogger.h"
48
49
50
51 namespace Konclude {
52
53 using namespace Context;
54
55 namespace Reasoner {
56
57 namespace Kernel {
58
59 using namespace Process;
60 using namespace Dependency;
61
62 namespace Algorithm {
63
64 /*!
65 *
66 * \class CIndividualProcessNodeValueSpaceHandler
67 * \author Andreas Steigmiller
68 * \version 0.1
69 * \brief TODO
70 *
71 */
72 class CIndividualProcessNodeValueSpaceHandler {
73 // public methods
74 public:
75 //! Constructor
76 CIndividualProcessNodeValueSpaceHandler(CDatatypeValueSpaceType* valueSpaceType);
77
78
79 virtual bool triggerDataLiteralConcept(CIndividualProcessNode* indiProcNode, CDataLiteral* dataLiteral, bool negated, CDependencyTrackPoint* depTrackPoint, CConcept* triggerConcept, bool otherValueSpacesClosed, bool* directlyTriggeredFlag, CDatatypeDependencyCollection* depCollection, CCalculationAlgorithmContext* calcAlgContext);
80 virtual bool triggerDatatypeConcept(CIndividualProcessNode* indiProcNode, CDatatype* datatype, bool negated, CDependencyTrackPoint* depTrackPoint, CConcept* triggerConcept, bool otherValueSpacesClosed, bool* directlyTriggeredFlag, CDatatypeDependencyCollection* depCollection, CCalculationAlgorithmContext* calcAlgContext);
81 virtual bool triggerDataRestrictionConcept(CIndividualProcessNode* indiProcNode, CConcept* dataRestricionConcept, bool negated, CDependencyTrackPoint* depTrackPoint, CConcept* triggerConcept, bool otherValueSpacesClosed, bool* directlyTriggeredFlag, CDatatypeDependencyCollection* depCollection, CCalculationAlgorithmContext* calcAlgContext);
82
83
84 virtual bool addDataLiteral(CIndividualProcessNode* indiProcNode, CDataLiteral* dataLiteral, bool negated, CDependencyTrackPoint* depTrackPoint, CCalculationAlgorithmContext* calcAlgContext);
85
86
87 virtual bool addDataRestriction(CIndividualProcessNode* indiProcNode, CConcept* dataRestricionConcept, bool negated, CDependencyTrackPoint* depTrackPoint, CCalculationAlgorithmContext* calcAlgContext);
88
89
90 virtual bool closeValueSpace(CIndividualProcessNode* indiProcNode, CDependencyTrackPoint* depTrackPoint, CCalculationAlgorithmContext* calcAlgContext);
91
92 virtual bool testValueSpaceClashed(CIndividualProcessNode* indiProcNode, CCalculationAlgorithmContext* calcAlgContext);
93
94
95 virtual CConceptDescriptor* triggerValueSpaceConcepts(CIndividualProcessNode* indiProcNode, CConceptDescriptor* appendConceptLinker, cint64& remainingRequiredValuesCount, CDatatypeDependencyCollection* depCollection, CCalculationAlgorithmContext* calcAlgContext);
96
97
98 virtual bool addValueSpaceDependencies(CIndividualProcessNode* indiProcNode, CDatatypeValueSpaceDependencyCollector* depCollection, CCalculationAlgorithmContext* calcAlgContext);
99
100 virtual bool countPossibleValueSpaceValues(CIndividualProcessNode* indiProcNode, CDatatypeValueSpaceValuesCounter* valueCounter, CCalculationAlgorithmContext* calcAlgContext);
101
102
103 virtual bool getNextPossibleDataValue(CIndividualProcessNode* indiProcNode, CDataLiteralValue*& nextValue, CDataLiteralValue* lastValue, CDatatypeValueTestingCollection* valueTestingCollection, CCalculationAlgorithmContext* calcAlgContext);
104
105
106 // protected methods
107 protected:
108
109 CConceptDescriptor* addConceptLinkerCollectionDependency(CIndividualProcessNode* indiProcNode, CConceptDescriptor* appendConceptLinker, CDatatypeValueSpaceConceptTriggerLinker* triggeringConceptLinker, CDatatypeDependencyCollection* depCollection, CCalculationAlgorithmContext* calcAlgContext);
110
111 CClashedDependencyDescriptor* createClashedDependencyDescriptor(CClashedDependencyDescriptor* appendDepDesLinker, CDependencyTrackPoint* depTrackPoint, CCalculationAlgorithmContext* calcAlgContext, cint64 testAlreadyContainedCount = 3);
112 CClashedDependencyDescriptor* copyClashedDependencyDescriptors(CClashedDependencyDescriptor* appendDepDesLinker, CClashedDependencyDescriptor* copyDepDesLinker, CCalculationAlgorithmContext* calcAlgContext);
113
114
115 CConceptDescriptor* addConceptLinker(CConceptDescriptor* appendConceptLinker, CConcept* concept, CDependencyTrackPoint* depTrackPoint, CCalculationAlgorithmContext* calcAlgContext);
116
117 CConceptDescriptor* addConceptLinker(CIndividualProcessNode* indiProcNode, CConceptDescriptor* appendConceptLinker, CDatatypeValueSpaceConceptTriggerLinker* triggeringConceptLinker, CDependencyTrackPoint* depTrackPoint, CDatatypeDependencyCollection* depCollection, CCalculationAlgorithmContext* calcAlgContext);
118
119
120
121 bool hasConceptTriggered(CIndividualProcessNode* indiProcNode, CConcept* concept, CCalculationAlgorithmContext* calcAlgContext);
122
123
124 // protected variables
125 protected:
126 CDatatypeValueSpaceType* mValueSpaceType;
127
128
129
130 // private methods
131 private:
132
133 // private variables
134 private:
135
136 };
137
138 }; // end namespace Algorithm
139
140 }; // end namespace Kernel
141
142 }; // end namespace Reasoner
143
144 }; // end namespace Konclude
145
146 #endif // KONCLUDE_REASONER_KERNEL_ALGORITHM_CINDIVIDUALPROCESSNODEVALUESPACEHANDLER_H