Debian Codegraph @

Source/Reasoner/Answerer/CComplexConceptStepComputationProcess.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 "CComplexConceptStepComputationProcess.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Answerer {
29
30
31 CComplexConceptStepComputationProcess::CComplexConceptStepComputationProcess(ComplexConceptStepComputationProcessType computationType) {
32 mComputationType = computationType;
33 mFinished = false;
34 mStarted = false;
35 mRequired = false;
36 mQueued = false;
37 mProcessing = false;
38
39 mCurrentlyRunningComputationCount = 0;
40 mFinishedComputationCount = 0;
41 mDerivedComputationCount = 0;
42 }
43
44
45 CComplexConceptStepComputationProcess::~CComplexConceptStepComputationProcess() {
46 }
47
48
49 ComplexConceptStepComputationProcessType CComplexConceptStepComputationProcess::getComputationType() {
50 return mComputationType;
51 }
52
53
54 bool CComplexConceptStepComputationProcess::isComputationProcessFinished() {
55 return mFinished;
56 }
57
58 bool CComplexConceptStepComputationProcess::isComputationProcessStarted() {
59 return mStarted;
60 }
61
62 bool CComplexConceptStepComputationProcess::isComputationProcessQueued() {
63 return mQueued;
64 }
65
66 bool CComplexConceptStepComputationProcess::isComputationProcessProcessing() {
67 return mProcessing;
68 }
69
70 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::setComputationProcessStarted(bool started) {
71 mStarted = started;
72 return this;
73 }
74
75 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::setComputationProcessQueued(bool queued) {
76 mQueued = queued;
77 return this;
78 }
79
80 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::setComputationProcessFinished(bool finished) {
81 mFinished = finished;
82 return this;
83 }
84
85 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::setComputationProcessRequired(bool required) {
86 mRequired = required;
87 return this;
88 }
89
90 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::setComputationProcessProcessing(bool processing) {
91 mProcessing = processing;
92 return this;
93 }
94
95 bool CComplexConceptStepComputationProcess::isComputationProcessRequired() {
96 return mRequired && !mFinished;
97 }
98
99
100 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::incCurrentlyRunningComputationCount(cint64 incCount) {
101 mCurrentlyRunningComputationCount += incCount;
102 return this;
103 }
104
105 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::decCurrentlyRunningComputationCount(cint64 decCount) {
106 mCurrentlyRunningComputationCount -= decCount;
107 return this;
108 }
109
110 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::incFinishedComputationCount(cint64 incCount) {
111 mFinishedComputationCount += incCount;
112 return this;
113 }
114
115 CComplexConceptStepComputationProcess* CComplexConceptStepComputationProcess::incDerivedComputationCount(cint64 incCount) {
116 mDerivedComputationCount += incCount;
117 return this;
118 }
119
120
121 cint64 CComplexConceptStepComputationProcess::getCurrentlyRunningComputationCount() {
122 return mCurrentlyRunningComputationCount;
123 }
124
125 cint64 CComplexConceptStepComputationProcess::getFinishedComputationCount() {
126 return mFinishedComputationCount;
127 }
128
129
130 cint64 CComplexConceptStepComputationProcess::getDerivedComputationCount() {
131 return mDerivedComputationCount;
132 }
133
134
135 }; // end namespace Answerer
136
137 }; // end namespace Reasoner
138
139 }; // end namespace Konclude