|
solarpowerlog trunk
|
#include <CWorkScheduler.h>

Public Member Functions | |
| CWorkScheduler () | |
| virtual | ~CWorkScheduler () |
| void | ScheduleWork (ICommand *Command) |
| void | ScheduleWork (ICommand *Commmand, struct timespec ts) |
| bool | DoWork (bool block=false) |
Protected Attributes | |
| boost::mutex | mut |
Friends | |
| class | CTimedWork |
This class implements the work scheduler:
Objects derived from CommandTarget can schedule work to be done:
call again later: (when they are not able to complete it immediatly)
call again at .... (when they expect to do some work in some specific time
Definition at line 71 of file CWorkScheduler.h.
| CWorkScheduler::CWorkScheduler | ( | ) |
Definition at line 59 of file CWorkScheduler.cpp.
| CWorkScheduler::~CWorkScheduler | ( | ) | [virtual] |
Definition at line 68 of file CWorkScheduler.cpp.
| bool CWorkScheduler::DoWork | ( | bool | block = false | ) |
Call this method to do dispatch due work. Note: Returns after each piece of work has been done!
returns true, if work has been done, false, if no work was available.
| block | if false (default), it will return if there is no work, else it will wait for work. |
Definition at line 73 of file CWorkScheduler.cpp.

| void CWorkScheduler::ScheduleWork | ( | ICommand * | Command | ) |
Definition at line 98 of file CWorkScheduler.cpp.
| void CWorkScheduler::ScheduleWork | ( | ICommand * | Commmand, |
| struct timespec | ts | ||
| ) |
Schedule a work for later
Definition at line 105 of file CWorkScheduler.cpp.
friend class CTimedWork [friend] |
Definition at line 73 of file CWorkScheduler.h.
boost::mutex CWorkScheduler::mut [protected] |
Definition at line 123 of file CWorkScheduler.h.