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