Debian Codegraph @

Source/Reasoner/Kernel/Process/CReapplyConceptLabelSet.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_PROCESS_CREAPPLYCONCEPTLABELSET_H
22 #define KONCLUDE_REASONER_KERNEL_PROCESS_CREAPPLYCONCEPTLABELSET_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ProcessSettings.h"
29 #include "CProcessContext.h"
30 #include "CReapplyConceptLabelSetIterator.h"
31 #include "CClashedConceptDescriptor.h"
32 #include "CConceptSetSignature.h"
33 #include "CConceptSetFlags.h"
34 #include "CConceptDescriptorDependencyReapplyData.h"
35 #include "CConceptLabelSetModificationTag.h"
36 #include "CCoreConceptDescriptor.h"
37 #include "CConceptSetStructure.h"
38
39 // Other includes
40
41
42 // Logger includes
43 #include "Logger/CLogger.h"
44
45
46
47 namespace Konclude {
48
49 namespace Reasoner {
50
51 namespace Kernel {
52
53 namespace Process {
54
55 /*!
56 *
57 * \class CReapplyConceptLabelSet
58 * \author Andreas Steigmiller
59 * \version 0.1
60 * \brief TODO
61 *
62 */
63 class CReapplyConceptLabelSet : public CConceptLabelSetModificationTag {
64 // public methods
65 public:
66 //! Constructor
67 CReapplyConceptLabelSet(CProcessContext* processContext = nullptr);
68
69 //! Destructor
70 virtual ~CReapplyConceptLabelSet();
71
72 CReapplyConceptLabelSet* initConceptLabelSet(CReapplyConceptLabelSet* prevConceptLabelSet);
73
74 cint64 getConceptCount();
75
76 bool getConceptDescriptor(cint64 conTag, CConceptDescriptor*& conDes, CDependencyTrackPoint*& depTrackPoint);
77 bool getConceptDescriptor(CConcept* concept, CConceptDescriptor*& conDes, CDependencyTrackPoint*& depTrackPoint);
78
79 bool hasConceptDescriptor(CConceptDescriptor* conceptDescriptor);
80 bool hasConcept(CConcept* concept, bool negated);
81 bool hasConcept(CConcept* concept, bool* containsNegated = nullptr);
82 bool containsConcept(CConcept* concept, bool* containsNegated = nullptr);
83 bool containsConcept(CConcept* concept, bool negated);
84
85 bool containsConceptDescriptor(CConceptDescriptor* conceptDescriptor);
86 bool insertConceptIgnoreClash(CConceptDescriptor* conceptDescriptor, CDependencyTrackPoint* depTrackPoint, CCondensedReapplyQueueIterator* reapplyQueueIt = nullptr);
87 bool insertConceptGetClash(CConceptDescriptor* conceptDescriptor, CDependencyTrackPoint* depTrackPoint, CCondensedReapplyQueueIterator* reapplyQueueIt = nullptr, CConceptDescriptor** clashedConDes = nullptr, CDependencyTrackPoint** clashedDepTrackPoint = nullptr);
88
89 CClashedConceptDescriptor* insertConceptReturnClash(CConceptDescriptor* conceptDescriptor, CDependencyTrackPoint* depTrackPoint, bool* hasContained = nullptr, CCondensedReapplyQueueIterator* reapplyQueueIt = nullptr);
90 bool insertConceptThrowClashReturnContained(CConceptDescriptor* conceptDescriptor, CDependencyTrackPoint* depTrackPoint, CCondensedReapplyQueueIterator* reapplyQueueIt = nullptr);
91
92 CReapplyConceptLabelSetIterator getConceptLabelSetIterator(bool getSorted = false, bool getDependencies = false, bool getAllStructure = false);
93
94 CConceptSetFlags* getConceptFlags();
95 CConceptSetSignature* getConceptSignature();
96 CConceptSetStructure* getConceptStructure();
97 cint64 getConceptSignatureValue();
98
99 bool getConceptDescriptorAndReapplyQueue(cint64 conTag, CConceptDescriptor*& conDes, CDependencyTrackPoint*& depTrackPoint, CCondensedReapplyQueue*& reapplyQueue);
100 bool getConceptDescriptorAndReapplyQueue(CConcept* concept, CConceptDescriptor*& conDes, CDependencyTrackPoint*& depTrackPoint, CCondensedReapplyQueue*& reapplyQueue);
101 bool getConceptDescriptorOrReapplyQueue(cint64 conTag, CConceptDescriptor*& conDes, CDependencyTrackPoint*& depTrackPoint, CCondensedReapplyQueue*& reapplyQueue);
102 bool getConceptDescriptorOrReapplyQueue(CConcept* concept, CConceptDescriptor*& conDes, CDependencyTrackPoint*& depTrackPoint, CCondensedReapplyQueue*& reapplyQueue);
103 CCondensedReapplyQueue* getConceptDescriptorAndReapplyQueue(CConcept*& concept, CConceptDescriptor*& conDes, bool create = false);
104 CCondensedReapplyQueue* getConceptReapplyQueue(CConcept*& concept, bool& conceptNegation, bool create = false);
105 CCondensedReapplyQueue* getConceptReapplyQueue(cint64 conTag, bool create = false);
106 bool containsConceptReapplyQueue(CConcept *&concept, bool &conceptNegation);
107
108 CCondensedReapplyQueueIterator getConceptReapplyIterator(CConcept* concept, bool conceptNegation, bool clearDynamicReapplyQueue = true);
109 CCondensedReapplyQueueIterator getConceptReapplyIterator(CConceptDescriptor* conDes, bool clearDynamicReapplyQueue = true);
110
111 CConceptDescriptor* getAddingSortedConceptDescriptionLinker();
112
113 CConceptDescriptorDependencyReapplyData* getConceptDescriptorDependencyReapplyData(cint64 dataTag);
114
115
116 CCoreConceptDescriptor* getCoreConceptDescriptorLinker();
117 CReapplyConceptLabelSet* addCoreConceptDescriptor(CCoreConceptDescriptor* coreConDes);
118
119 // protected methods
120 protected:
121
122 // protected variables
123 protected:
124 CPROCESSMAP<cint64,CConceptDescriptorDependencyReapplyData> mConceptDesDepMap;
125 CPROCESSMAP<cint64,CConceptDescriptorDependencyReapplyData>* mAdditionalConceptDesDepMap;
126 CCoreConceptDescriptor* mCoreConDesLinker;
127 CConceptDescriptor* mConceptDesLinker;
128 CConceptDescriptor* mPrevConceptDesLinker;
129 CConceptSetSignature mConceptSignature;
130 CConceptSetStructure mConceptStructure;
131 CConceptSetFlags mConceptFlags;
132 cint64 mConceptCount;
133
134 CProcessContext* mProcessContext;
135
136 // private methods
137 private:
138
139 // private variables
140 private:
141
142 };
143
144 }; // end namespace Process
145
146 }; // end namespace Kernel
147
148 }; // end namespace Reasoner
149
150 }; // end namespace Konclude
151
152 #endif // KONCLUDE_REASONER_KERNEL_PROCESS_CREAPPLYCONCEPTLABELSET_H