Debian Codegraph @

Source/Reasoner/Kernel/Process/CConceptProcessDescriptor.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 "CConceptProcessDescriptor.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Kernel {
29
30 namespace Process {
31
32
33 CConceptProcessDescriptor::CConceptProcessDescriptor(CConceptDescriptor *conceptDescriptor, CConceptProcessPriority processPriority, bool conceptReapplied, CDependencyTrackPoint *dependencyTrackPoint) : CSortedLinkerBase<CConceptProcessDescriptor*,CConceptProcessDescriptor>(this) {
34 conceptDes = conceptDescriptor;
35 priority = processPriority;
36 depTrackPoint = dependencyTrackPoint;
37 mReapplied = conceptReapplied;
38 mProcSpec = nullptr;
39 }
40
41
42 CConceptProcessDescriptor::CConceptProcessDescriptor() : CSortedLinkerBase<CConceptProcessDescriptor*,CConceptProcessDescriptor>(this) {
43 conceptDes = nullptr;
44 depTrackPoint = nullptr;
45 mProcSpec = nullptr;
46 mReapplied = false;
47 priority = 0.;
48 }
49
50
51 CConceptProcessDescriptor *CConceptProcessDescriptor::init(CConceptDescriptor *conceptDescriptor, CConceptProcessPriority processPriority, bool conceptReapplied, CDependencyTrackPoint *dependencyTrackPoint, CProcessingRestrictionSpecification* procSpec) {
52 conceptDes = conceptDescriptor;
53 priority = processPriority;
54 depTrackPoint = dependencyTrackPoint;
55 mReapplied = conceptReapplied;
56 mProcSpec = procSpec;
57 return this;
58 }
59
60 CConceptProcessDescriptor* CConceptProcessDescriptor::initCopy(CConceptProcessDescriptor* conceptProcessDes) {
61 conceptDes = conceptProcessDes->conceptDes;
62 priority = conceptProcessDes->priority;
63 depTrackPoint = conceptProcessDes->depTrackPoint;
64 mReapplied = conceptProcessDes->mReapplied;
65 mProcSpec = conceptProcessDes->mProcSpec;
66 return this;
67 }
68
69
70 CConceptDescriptor *CConceptProcessDescriptor::getConceptDescriptor() {
71 return conceptDes;
72 }
73
74 CConceptProcessPriority CConceptProcessDescriptor::getProcessPriority() {
75 return priority;
76 }
77
78 CDependencyTrackPoint *CConceptProcessDescriptor::getDependencyTrackPoint() {
79 return depTrackPoint;
80 }
81
82 bool CConceptProcessDescriptor::isConceptReapplied() {
83 return mReapplied;
84 }
85
86 CProcessingRestrictionSpecification *CConceptProcessDescriptor::getProcessingRestrictionSpecification() {
87 return mProcSpec;
88 }
89
90 bool CConceptProcessDescriptor::operator<=(const CConceptProcessDescriptor &descriptor) {
91 return descriptor.priority <= priority;
92 }
93
94
95 }; // end namespace Kernel
96
97 }; // end namespace Process
98
99 }; // end namespace Reasoner
100
101 }; // end namespace Konclude