Debian Codegraph @

Source/Concurrent/CWatchDogThreadData.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 #include "CWatchDogThreadData.h"
21
22
23 namespace Konclude {
24
25 namespace Concurrent {
26
27
28 CWatchDogThreadData::CWatchDogThreadData() {
29 reg = false;
30 id = 0;
31 waitTime = 0;
32 runTime = 0;
33 thread = 0;
34 active = false;
35 updateNumber = 0;
36 error = false;
37 }
38
39 CWatchDogThreadData::~CWatchDogThreadData() {
40 }
41
42 bool CWatchDogThreadData::isRegisterThread() {
43 return reg;
44 }
45
46 void CWatchDogThreadData::setRegisterThread(bool isRegister) {
47 reg = isRegister;
48 }
49
50
51 void CWatchDogThreadData::setThreadName(QString threadName) {
52 name = threadName;
53 }
54
55 QString CWatchDogThreadData::getThreadName() {
56 return name;
57 }
58
59
60 void CWatchDogThreadData::setThreadID(qint64 threadID) {
61 id = threadID;
62 }
63
64 qint64 CWatchDogThreadData::getThreadID() {
65 return id;
66 }
67
68 void CWatchDogThreadData::setWaitTime(qint64 threadWaitTime) {
69 waitTime = threadWaitTime;
70 }
71
72 qint64 CWatchDogThreadData::getWaitTime() {
73 return waitTime;
74 }
75
76 void CWatchDogThreadData::setRunTime(qint64 threadRunTime) {
77 runTime = threadRunTime;
78 }
79
80 qint64 CWatchDogThreadData::getRunTime() {
81 return runTime;
82 }
83
84 CThread *CWatchDogThreadData::getThread() {
85 return thread;
86 }
87
88 void CWatchDogThreadData::setThread(CThread *threadObject) {
89 thread = threadObject;
90 }
91
92 void CWatchDogThreadData::setThreadActive(bool threadIsActive) {
93 active = threadIsActive;
94 }
95
96 bool CWatchDogThreadData::isThreadActive() {
97 return active;
98 }
99
100
101 void CWatchDogThreadData::setThreadError(bool threadHasError) {
102 error = threadHasError;
103 }
104
105 bool CWatchDogThreadData::isThreadError() {
106 return error;
107 }
108
109 void CWatchDogThreadData::setUpdateNumber(qint64 number, QDateTime updateTime) {
110 updateNumber = number;
111 upTime = updateTime;
112 }
113
114 qint64 CWatchDogThreadData::getUpdateNumber() {
115 return updateNumber;
116 }
117
118
119 void CWatchDogThreadData::setTaskDescription(QString description) {
120 taskDescription = description;
121 }
122
123 QString CWatchDogThreadData::getTaskDescription() {
124 return taskDescription;
125 }
126
127
128 }; // end namespace Concurrent
129
130 }; // end namespace Konclude