Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
QH::TaskScheduler Class Reference

The TaskScheduler class This class contains queue of all shedule tasks. More...

#include <taskscheduler.h>

Inheritance diagram for QH::TaskScheduler:
Inheritance graph
Collaboration diagram for QH::TaskScheduler:
Collaboration graph

Signals

void sigPushWork (QSharedPointer< QH::AbstractTask > work)
 sigPushWork This signal emited when the task work neet to execute.
 

Public Member Functions

 TaskScheduler ()
 
 ~TaskScheduler ()
 
bool shedule (const QSharedPointer< AbstractTask > &task)
 shedule This method shedule new task in this node.
 
bool remove (const QSharedPointer< AbstractTask > &task)
 remove This method remove the task from a tasks queue.
 
bool remove (int task)
 remove This method remove the task with task id.
 
int taskCount () const
 taskCount This method return tasks count.
 

Detailed Description

The TaskScheduler class This class contains queue of all shedule tasks.

See also
AbstractTask

Definition at line 24 of file taskscheduler.h.

Constructor & Destructor Documentation

◆ TaskScheduler()

QH::TaskScheduler::TaskScheduler ( )

Definition at line 14 of file taskscheduler.cpp.

◆ ~TaskScheduler()

QH::TaskScheduler::~TaskScheduler ( )

Definition at line 20 of file taskscheduler.cpp.

Member Function Documentation

◆ remove() [1/2]

bool QH::TaskScheduler::remove ( const QSharedPointer< AbstractTask > &  task)

remove This method remove the task from a tasks queue.

Parameters
taskThis is removed task.
Returns
true if the task remove successful

Definition at line 67 of file taskscheduler.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [2/2]

bool QH::TaskScheduler::remove ( int  task)

remove This method remove the task with task id.

Parameters
taskThis is id of the removed task.
Returns
true if the method removed successful

Definition at line 71 of file taskscheduler.cpp.

◆ shedule()

bool QH::TaskScheduler::shedule ( const QSharedPointer< AbstractTask > &  task)

shedule This method shedule new task in this node.

Parameters
taskThis is sharedpointe to taskObject.
Returns
true if the task sheduled successful. If the task alredy sheduled the return false.

Definition at line 30 of file taskscheduler.cpp.

Here is the caller graph for this function:

◆ sigPushWork

void QH::TaskScheduler::sigPushWork ( QSharedPointer< QH::AbstractTask work)
signal

sigPushWork This signal emited when the task work neet to execute.

Parameters
workThis is needed to execute task.
Here is the caller graph for this function:

◆ taskCount()

int QH::TaskScheduler::taskCount ( ) const

taskCount This method return tasks count.

Returns
tasks count

Definition at line 80 of file taskscheduler.cpp.

Here is the caller graph for this function:

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