Heart 1.3.848.aa44c26
Heart is base back end library for your c++ Qt projects.
|
The AbstractTask class. All tasks executed on separate thread. More...
#include <abstracttask.h>
Public Types | |
enum | TimeValMsec : qint64 { Msec = 1 , Sec = 1000 * Msec , Min = 60 * Sec , Hour = 60 * Min , Day = 24 * Hour } |
The TimeVal enum contains all time values for a tasks scheduling. More... | |
Public Member Functions | |
AbstractTask ()=default | |
virtual | ~AbstractTask ()=default |
ScheduleMode | mode () const |
mode This method retunr current mode of this task. | |
void | setMode (ScheduleMode newMode) |
setMode This method sets new mode of this task. | |
quint64 | time () const |
time This is universal property. This property has its own meaning for each AbstractTask::mode. For more information see the ScheduleMode enum. | |
void | setTime (quint64 newTime) |
setTime This method sets new value for the AbstractTask::time property. | |
virtual bool | execute (AbstractNode *node) const =0 |
execute This method will be invoked when task be executed. | |
int | taskId () const |
taskId This method return id of this task. | |
virtual bool | isValid () const |
isValid This method check task configuration and return true if task is valid else false. | |
The AbstractTask class. All tasks executed on separate thread.
Definition at line 33 of file abstracttask.h.
enum QH::AbstractTask::TimeValMsec : qint64 |
The TimeVal enum contains all time values for a tasks scheduling.
Enumerator | |
---|---|
Msec | Milessecundes. |
Sec | Secundes. |
Min | Minutes. |
Hour | Hours. |
Day | Days. |
Definition at line 40 of file abstracttask.h.
|
default |
|
virtualdefault |
|
pure virtual |
execute This method will be invoked when task be executed.
node | This is pointer to node object. |
|
virtual |
isValid This method check task configuration and return true if task is valid else false.
Definition at line 39 of file abstracttask.cpp.
ScheduleMode QH::AbstractTask::mode | ( | ) | const |
mode This method retunr current mode of this task.
Definition at line 17 of file abstracttask.cpp.
void QH::AbstractTask::setMode | ( | ScheduleMode | newMode | ) |
setMode This method sets new mode of this task.
newMode | new mode of this task. |
Definition at line 21 of file abstracttask.cpp.
void QH::AbstractTask::setTime | ( | quint64 | newTime | ) |
setTime This method sets new value for the AbstractTask::time property.
newTime | This is new value of the time propertye. |
Definition at line 30 of file abstracttask.cpp.
int QH::AbstractTask::taskId | ( | ) | const |
taskId This method return id of this task.
Definition at line 35 of file abstracttask.cpp.
quint64 QH::AbstractTask::time | ( | ) | const |
time This is universal property. This property has its own meaning for each AbstractTask::mode. For more information see the ScheduleMode enum.
Definition at line 26 of file abstracttask.cpp.