Heart 1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Loading...
Searching...
No Matches
QH::AbstractTask Class Referenceabstract

The AbstractTask class. All tasks executed on separate thread. More...

#include <abstracttask.h>

Collaboration diagram for QH::AbstractTask:
Collaboration graph

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.

Detailed Description

The AbstractTask class. All tasks executed on separate thread.

Definition at line 33 of file abstracttask.h.

Member Enumeration Documentation

◆ TimeValMsec

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.

Constructor & Destructor Documentation

◆ AbstractTask()

QH::AbstractTask::AbstractTask ( )
default

◆ ~AbstractTask()

virtual QH::AbstractTask::~AbstractTask ( )
virtualdefault
Here is the call graph for this function:

Member Function Documentation

◆ execute()

virtual bool QH::AbstractTask::execute ( AbstractNode * node) const
pure virtual

execute This method will be invoked when task be executed.

Parameters
nodeThis is pointer to node object.
Returns
true if the work winished successfull
Here is the call graph for this function:

◆ isValid()

bool QH::AbstractTask::isValid ( ) const
virtual

isValid This method check task configuration and return true if task is valid else false.

Returns
true if task is valid else false.

Definition at line 39 of file abstracttask.cpp.

Here is the caller graph for this function:

◆ mode()

ScheduleMode QH::AbstractTask::mode ( ) const

mode This method retunr current mode of this task.

Returns
current mode of this task.
See also
AbstractTask::setMode

Definition at line 17 of file abstracttask.cpp.

Here is the caller graph for this function:

◆ setMode()

void QH::AbstractTask::setMode ( ScheduleMode newMode)

setMode This method sets new mode of this task.

Parameters
newModenew mode of this task.
See also
AbstractTask::mode

Definition at line 21 of file abstracttask.cpp.

Here is the caller graph for this function:

◆ setTime()

void QH::AbstractTask::setTime ( quint64 newTime)

setTime This method sets new value for the AbstractTask::time property.

Parameters
newTimeThis is new value of the time propertye.
See also
AbstractTask::time

Definition at line 30 of file abstracttask.cpp.

Here is the caller graph for this function:

◆ taskId()

int QH::AbstractTask::taskId ( ) const

taskId This method return id of this task.

Returns
id of this task.

Definition at line 35 of file abstracttask.cpp.

Here is the caller graph for this function:

◆ time()

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.

Returns
time property.
See also
AbstractTask::setTime

Definition at line 26 of file abstracttask.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: