Debian Codegraph @

Source/Reasoner/Kernel/Process/CPropagationRepresentativeTransitionExtension.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 #include "CPropagationRepresentativeTransitionExtension.h"
22 #include "CIndividualProcessNode.h"
23
24
25 namespace Konclude {
26
27 namespace Reasoner {
28
29 namespace Kernel {
30
31 namespace Process {
32
33
34 CPropagationRepresentativeTransitionExtension::CPropagationRepresentativeTransitionExtension(CProcessContext* processContext) : mLeftRepPropMap(processContext),mRightRepPropMap(processContext) {
35 mProcessContext = processContext;
36 }
37
38
39 CPropagationRepresentativeTransitionExtension* CPropagationRepresentativeTransitionExtension::initPropagationRepresentativeTransitionExtension(CPropagationRepresentativeTransitionExtension* propVarBindTransExtension) {
40 if (propVarBindTransExtension) {
41 mLastAnalysedPropBindDes = propVarBindTransExtension->mLastAnalysedPropBindDes;
42 mLastAnalysedPropagateAllFlag = propVarBindTransExtension->mLastAnalysedPropagateAllFlag;
43 mLeftLastRepPropDes = propVarBindTransExtension->mLeftLastRepPropDes;
44 mRightLastRepPropDes = propVarBindTransExtension->mRightLastRepPropDes;
45 mLeftRepPropMap = propVarBindTransExtension->mLeftRepPropMap;
46 mRightRepPropMap = propVarBindTransExtension->mRightRepPropMap;
47 } else {
48 mLastAnalysedPropBindDes = nullptr;
49 mLastAnalysedPropagateAllFlag = false;
50 mRightLastRepPropDes = nullptr;
51 mLeftLastRepPropDes = nullptr;
52 mLeftRepPropMap.clear();
53 mRightRepPropMap.clear();
54 }
55 return this;
56 }
57
58 bool CPropagationRepresentativeTransitionExtension::getLastAnalysedPropagateAllFlag() {
59 return mLastAnalysedPropagateAllFlag;
60 }
61
62 CPropagationRepresentativeTransitionExtension* CPropagationRepresentativeTransitionExtension::setLastAnalysedPropagateAllFlag(bool propagateAllFlag) {
63 mLastAnalysedPropagateAllFlag = propagateAllFlag;
64 return this;
65 }
66
67
68 CPropagationBindingDescriptor* CPropagationRepresentativeTransitionExtension::getLastAnalysedPropagationBindingDescriptor() {
69 return mLastAnalysedPropBindDes;
70 }
71
72 CPropagationRepresentativeTransitionExtension* CPropagationRepresentativeTransitionExtension::setLastAnalysedPropagationBindingDescriptor(CPropagationBindingDescriptor* lastAnalPropBindDes) {
73 mLastAnalysedPropBindDes = lastAnalPropBindDes;
74 return this;
75 }
76
77 CRepresentativePropagationDescriptor* CPropagationRepresentativeTransitionExtension::getLeftLastRepresentativeJoiningDescriptor() {
78 return mLeftLastRepPropDes;
79 }
80
81 CRepresentativePropagationDescriptor* CPropagationRepresentativeTransitionExtension::getRightLastRepresentativeJoiningDescriptor() {
82 return mRightLastRepPropDes;
83 }
84
85
86 CPropagationRepresentativeTransitionExtension* CPropagationRepresentativeTransitionExtension::setLeftLastRepresentativeJoiningDescriptor(CRepresentativePropagationDescriptor* varBindPathDes) {
87 mLeftLastRepPropDes = varBindPathDes;
88 return this;
89 }
90
91 CPropagationRepresentativeTransitionExtension* CPropagationRepresentativeTransitionExtension::setRightLastRepresentativeJoiningDescriptor(CRepresentativePropagationDescriptor* varBindPathDes) {
92 mRightLastRepPropDes = varBindPathDes;
93 return this;
94 }
95
96 CRepresentativePropagationMap* CPropagationRepresentativeTransitionExtension::getLeftRepresentativePropagationMap() {
97 return &mLeftRepPropMap;
98 }
99
100 CRepresentativePropagationMap* CPropagationRepresentativeTransitionExtension::getRightRepresentativePropagationMap() {
101 return &mRightRepPropMap;
102 }
103
104
105
106 }; // end namespace Process
107
108 }; // end namespace Kernel
109
110 }; // end namespace Reasoner
111
112 }; // end namespace Konclude