Debian Codegraph @

Source/Reasoner/Kernel/Process/CMarkerIndividualNodeData.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 "CMarkerIndividualNodeData.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Kernel {
29
30 namespace Process {
31
32
33 CMarkerIndividualNodeData::CMarkerIndividualNodeData() {
34 mLinker = nullptr;
35 mLocIndiSet = nullptr;
36 mUseIndiSet = nullptr;
37 }
38
39 CMarkerIndividualNodeData::CMarkerIndividualNodeData(const CMarkerIndividualNodeData& data) {
40 mLinker = data.mLinker;
41 mLocIndiSet = nullptr;
42 mUseIndiSet = data.mUseIndiSet;
43 }
44
45
46 CMarkerIndividualNodeData* CMarkerIndividualNodeData::initMarkerIndividualNodeData(CMarkerIndividualNodeData* data) {
47 mLinker = nullptr;
48 mLocIndiSet = nullptr;
49 mUseIndiSet = nullptr;
50 if (data) {
51 mLinker = data->mLinker;
52 mLocIndiSet = nullptr;
53 mUseIndiSet = data->mUseIndiSet;
54 }
55 return this;
56 }
57
58 CXNegLinker<CIndividualProcessNode*>* CMarkerIndividualNodeData::getMarkerIndividualNodeLinker() const {
59 return mLinker;
60 }
61
62 CMarkerIndividualNodeData* CMarkerIndividualNodeData::addMarkerIndividualNodeLinker(CXNegLinker<CIndividualProcessNode*>* indiNodeLinker) {
63 mLinker = indiNodeLinker->append(mLinker);
64 return this;
65 }
66
67
68 CPROCESSSET< QPair<cint64, bool> >* CMarkerIndividualNodeData::getIndividualNondeterminismSet(bool localized) {
69 if (localized) {
70 return mLocIndiSet;
71 } else {
72 return mUseIndiSet;
73 }
74 }
75
76 CMarkerIndividualNodeData* CMarkerIndividualNodeData::setIndividualNondeterminismSet(bool localized, CPROCESSSET< QPair<cint64, bool> >* set) {
77 if (localized) {
78 mLocIndiSet = set;
79 } else {
80 mUseIndiSet = set;
81 }
82 return this;
83 }
84
85
86
87 }; // end namespace Process
88
89 }; // end namespace Kernel
90
91 }; // end namespace Reasoner
92
93 }; // end namespace Konclude