Debian Codegraph @

Source/Reasoner/Answerer/Composition/CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector.cpp

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_COMPOSITION_CQTCONCURRENTVARIABLEMAPPINGSCOMPOSITIONPROPAGATIONREALIZATIONSCHEDULINGBATCHLINKERVECTOR_CPP
22 #define KONCLUDE_REASONER_ANSWERER_COMPOSITION_CQTCONCURRENTVARIABLEMAPPINGSCOMPOSITIONPROPAGATIONREALIZATIONSCHEDULINGBATCHLINKERVECTOR_CPP
23
24
25 #include "CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector.h"
26
27 namespace Konclude {
28
29 namespace Reasoner {
30
31 namespace Answerer {
32
33 namespace Composition {
34
35 template<class T>
36 CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>::CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector(cint64 size) : CQtConcurrentVariableMappingsCompositionBaseBatchLinkerVector<T>(size) {
37 mFirstRealizationSchedulingIterationDataLinker = nullptr;
38 mLastRealizationSchedulingIterationDataLinker = nullptr;
39 }
40
41
42 template<class T>
43 CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>::CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector() {
44 mFirstRealizationSchedulingIterationDataLinker = nullptr;
45 mLastRealizationSchedulingIterationDataLinker = nullptr;
46 }
47
48
49 template<class T>
50 CXLinker<COptimizedComplexVariableRolePropagationProcessingRealizationIteratorDataMemoryManaged*>* CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>::getFirstRealizationSchedulingIterationDataLinker() const {
51 return mFirstRealizationSchedulingIterationDataLinker;
52 }
53
54
55
56 template<class T>
57 CXLinker<COptimizedComplexVariableRolePropagationProcessingRealizationIteratorDataMemoryManaged*>* CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>::getLastRealizationSchedulingIterationDataLinker() const {
58 return mLastRealizationSchedulingIterationDataLinker;
59 }
60
61
62
63 template<class T>
64 CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>* CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>::addRealizationSchedulingIterationData(COptimizedComplexVariableRolePropagationProcessingRealizationIteratorDataMemoryManaged* iterationData) {
65 CXLinker<COptimizedComplexVariableRolePropagationProcessingRealizationIteratorDataMemoryManaged*>* linker = CObjectAllocator< CXLinker<COptimizedComplexVariableRolePropagationProcessingRealizationIteratorDataMemoryManaged*> >::allocateAndConstruct(CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>::getMemoryAllocationManager());
66 linker->initLinker(iterationData);
67 mFirstRealizationSchedulingIterationDataLinker = linker->append(mFirstRealizationSchedulingIterationDataLinker);
68 if (!mLastRealizationSchedulingIterationDataLinker) {
69 mLastRealizationSchedulingIterationDataLinker = linker;
70 }
71 return this;
72 }
73
74
75
76 template<class T>
77 CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>* CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>::mergeRealizationSchedulingIterationDataLinkers(const CQtConcurrentVariableMappingsCompositionPropagationRealizationSchedulingBatchLinkerVector<T>& reduceVec) {
78
79 CXLinker<COptimizedComplexVariableRolePropagationProcessingRealizationIteratorDataMemoryManaged*>* reduceFirstRealizationSchedulingIterationDataLinker = reduceVec.mFirstRealizationSchedulingIterationDataLinker;
80 CXLinker<COptimizedComplexVariableRolePropagationProcessingRealizationIteratorDataMemoryManaged*>* reduceLastRealizationSchedulingIterationDataLinker = reduceVec.mLastRealizationSchedulingIterationDataLinker;
81
82 if (reduceFirstRealizationSchedulingIterationDataLinker) {
83 if (mLastRealizationSchedulingIterationDataLinker) {
84 mLastRealizationSchedulingIterationDataLinker->setNext(reduceFirstRealizationSchedulingIterationDataLinker);
85 } else {
86 mFirstRealizationSchedulingIterationDataLinker = reduceFirstRealizationSchedulingIterationDataLinker;
87 }
88 mLastRealizationSchedulingIterationDataLinker = reduceLastRealizationSchedulingIterationDataLinker;
89 }
90
91 return this;
92 }
93
94
95
96 }; // end namespace Composition
97
98 }; // end namespace Answerer
99
100 }; // end namespace Reasoner
101
102 }; // end namespace Konclude
103
104 #endif // KONCLUDE_REASONER_ANSWERER_COMPOSITION_CQTCONCURRENTVARIABLEMAPPINGSCOMPOSITIONPROPAGATIONREALIZATIONSCHEDULINGBATCHLINKERVECTOR_CPP
105