Debian Codegraph @

Source/Reasoner/Kernel/Cache/CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker.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_CACHE_CBACKENDREPRESENTATIVEMEMORYCACHETEMPORARYASSOCIATIONWRITEDATALINKER_H
22 #define KONCLUDE_REASONER_KERNEL_CACHE_CBACKENDREPRESENTATIVEMEMORYCACHETEMPORARYASSOCIATIONWRITEDATALINKER_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "CacheSettings.h"
29 #include "CBackendRepresentativeMemoryLabelCacheItem.h"
30 #include "CBackendRepresentativeMemoryCardinalityCacheItem.h"
31 #include "CBackendRepresentativeMemoryCacheTemporaryLabelWriteDataLinker.h"
32 #include "CBackendRepresentativeMemoryCacheTemporaryCardinalityWriteDataLinker.h"
33 #include "CBackendRepresentativeMemoryCachingFlags.h"
34 #include "CBackendRepresentativeMemoryCacheTemporaryIndividualRoleSetNeighbourUpdateDataLinker.h"
35 #include "CBackendRepresentativeMemoryCacheTemporaryLabelReference.h"
36
37
38 // Other includes
39 #include "Reasoner/Ontology/CIndividual.h"
40 #include "Reasoner/Ontology/CIRIName.h"
41
42 #include "Utilities/Container/CLinker.h"
43
44 // Logger includes
45 #include "Logger/CLogger.h"
46
47
48 namespace Konclude {
49
50 using namespace Utilities::Container;
51
52 namespace Reasoner {
53
54 using namespace Ontology;
55
56 namespace Kernel {
57
58 namespace Cache {
59
60
61 /*!
62 *
63 * \class CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker
64 * \author Andreas Steigmiller
65 * \version 0.1
66 * \brief TODO
67 *
68 */
69 class CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker : public CLinkerBase<CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker*,CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker>, public CBackendRepresentativeMemoryCachingFlags {
70 // public methods
71 public:
72 //! Constructor
73 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker();
74
75 enum UPDATE_TYPE {
76 ADDITION,
77 REPLACEMENT,
78 REMOVAL
79 };
80
81 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* initAccociationWriteData(CIndividual* individual, UPDATE_TYPE labelUpdateType, UPDATE_TYPE linksUpdateType);
82 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* initAccociationWriteData(cint64 individualID, UPDATE_TYPE labelUpdateType, UPDATE_TYPE linksUpdateType);
83
84 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setReferredTemporaryLabelData(cint64 labelType, CBackendRepresentativeMemoryCacheTemporaryLabelWriteDataLinker* referredTmpLabelData);
85 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setReferredLabelData(cint64 labelType, CBackendRepresentativeMemoryLabelCacheItem* referredLabelData);
86
87 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setReferredLabel(cint64 labelType, CBackendRepresentativeMemoryCacheTemporaryLabelReference& labelRef);
88
89
90 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setReferredTemporaryCardinalityData(CBackendRepresentativeMemoryCacheTemporaryCardinalityWriteDataLinker* referredTmpCardData);
91 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setReferredCardinalityData(CBackendRepresentativeMemoryCardinalityCacheItem* referredCardData);
92
93
94 CIndividual* getIndividual();
95 cint64 getIndividualID();
96
97 CBackendRepresentativeMemoryCacheTemporaryLabelWriteDataLinker* getReferredTemporaryLabelData(cint64 labelType);
98 CBackendRepresentativeMemoryLabelCacheItem* getReferredLabelData(cint64 labelType);
99
100 CBackendRepresentativeMemoryCacheTemporaryCardinalityWriteDataLinker* getReferredTemporaryCardinalityData();
101 CBackendRepresentativeMemoryCardinalityCacheItem* getReferredCardinalityData();
102
103 UPDATE_TYPE getLabelUpdateType();
104 UPDATE_TYPE getLinksUpdateType();
105 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setLinksUpdateType(UPDATE_TYPE updateType);
106
107
108 CBackendRepresentativeMemoryCacheTemporaryIndividualRoleSetNeighbourUpdateDataLinker* getRoleSetNeighbourUpdateDataLinker();
109 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setRoleSetNeighbourUpdateDataLinker(CBackendRepresentativeMemoryCacheTemporaryIndividualRoleSetNeighbourUpdateDataLinker* roleSetNeighbourUpdateDataLinker);
110
111 cint64 getUsedAssociationUpdateId();
112 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setUsedAssociationUpdateId(cint64 id);
113
114
115 cint64 getIntegratedIndirectlyConnectedIndividualsChangeId();
116 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setIntegratedIndirectlyConnectedIndividualsChangeId(cint64 integratedChangeId);
117
118 bool isIndirectlyConnectedNominalIndividual();
119 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setIndirectlyConnectedNominalIndividual(bool indirectlyConnected);
120
121 bool hasIndirectlyConnectedIndividualIntegration();
122 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setIndirectlyConnectedIndividualIntegration(bool indirectlyConnectedIndividualIntegration);
123
124
125
126 bool requireSameAsNeighboursCompletion();
127 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setRequireSameAsNeighboursCompletion(bool requireCompletion);
128
129
130 cint64 getRepresentativeSameIndividualId();
131 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setRepresentativeSameIndividualId(cint64 indiId);
132
133
134 cint64 getDeterministicSameIndividualId();
135 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setDeterministicSameIndividualId(cint64 indiId);
136
137
138 bool isScheduledIndividual();
139 CBackendRepresentativeMemoryCacheTemporaryAssociationWriteDataLinker* setScheduledIndividual(bool scheduled);
140
141 // protected methods
142 protected:
143
144 // protected variables
145 protected:
146 UPDATE_TYPE mLabelUpdateType;
147 UPDATE_TYPE mLinksUpdateType;
148
149 cint64 mAssociationUpdateId;
150 cint64 mIntegratedIndirectlyConnectedIndividualsChangeId;
151
152 bool mIndirectlyConnectedIndividualIntegration;
153 bool mIndirectlyConnectedNominalIndividual;
154
155 cint64 mIndividualID;
156 CIndividual* mIndividual;
157
158 CBackendRepresentativeMemoryCacheTemporaryLabelWriteDataLinker* mReferredTmpLabelData[CBackendRepresentativeMemoryLabelCacheItem::LABEL_CACHE_ITEM_ASSOCIATABLE_TYPE_COUNT];
159 CBackendRepresentativeMemoryLabelCacheItem* mReferredLabelData[CBackendRepresentativeMemoryLabelCacheItem::LABEL_CACHE_ITEM_ASSOCIATABLE_TYPE_COUNT];
160
161 CBackendRepresentativeMemoryCacheTemporaryCardinalityWriteDataLinker* mReferredTmpCardData;
162 CBackendRepresentativeMemoryCardinalityCacheItem* mReferredCardData;
163
164 CBackendRepresentativeMemoryCacheTemporaryIndividualRoleSetNeighbourUpdateDataLinker* mRoleSetNeighbourUpdateDataLinker;
165
166 cint64 mRepresentativeSameIndiId;
167 cint64 mDeterministicSameIndiId;
168 bool mRequireSameAsNeighboursCompletion;
169
170 bool mScheduledIndividual;
171
172 // private methods
173 private:
174
175 // private variables
176 private:
177
178
179 };
180
181
182 }; // end namespace Cache
183
184 }; // end namespace Kernel
185
186 }; // end namespace Reasoner
187
188 }; // end namespace Konclude
189
190 #endif // KONCLUDE_REASONER_KERNEL_CACHE_CBACKENDREPRESENTATIVEMEMORYCACHETEMPORARYASSOCIATIONWRITEDATALINKER_H