#include <loop_thread_obj.h>


Public Member Functions | |
| LoopThreadObj (const std::string) | |
| virtual | ~LoopThreadObj () |
| void | Main () |
| Main method executed in a separate thread. | |
| unsigned int | GetSleepTime () |
| Get the current delay between each loop execution. | |
Protected Member Functions | |
| virtual void | Loop ()=0 |
| Thread loop. | |
| void | WakeUp () |
| Wake up the loop. | |
This class can be used to execute a loop in a separate thread. A delay is introduced between each loop to decrease it execution rate, when it's not used.
Definition at line 31 of file loop_thread_obj.h.
| LoopThreadObj::LoopThreadObj | ( | const std::string | n | ) |
Definition at line 26 of file loop_thread_obj.cpp.
| LoopThreadObj::~LoopThreadObj | ( | ) | [virtual] |
Definition at line 33 of file loop_thread_obj.cpp.
| unsigned int LoopThreadObj::GetSleepTime | ( | ) |
Get the current delay between each loop execution.
Definition at line 76 of file loop_thread_obj.cpp.
| virtual void LoopThreadObj::Loop | ( | ) | [protected, pure virtual] |
| void LoopThreadObj::Main | ( | ) | [virtual] |
Main method executed in a separate thread.
This method is executed in a separate thread when a call to Start is done.
Reimplemented from FastLoopThreadObj.
Definition at line 52 of file loop_thread_obj.cpp.
| void LoopThreadObj::WakeUp | ( | ) | [protected] |
Wake up the loop.
When called the execution rate of the loop is increased. After being waked up (or after the first start), the execution of the loop is delayed:
Definition at line 44 of file loop_thread_obj.cpp.
1.5.8