#include <ctimer.hxx>
Inheritance diagram for control::ctimer:


Public Member Functions | |
| ctimer (const std::string &nameid, const sigc::slot< bool > &exec_hook) | |
| ctimer () | |
| virtual | ~ctimer () |
| bool | pause () |
| virtual bool | start (unsigned long delay, bool once=false) |
| bool | resume () |
| void | stop () |
| virtual bool | controller_loop () |
Protected Attributes | |
| unsigned long | _duration |
| bool | _single_shot |
Definition at line 31 of file ctimer.hxx.
|
||||||||||||
|
Definition at line 24 of file ctimer.cc. References control::ccontrol::init(). 00024 : ccontrol(nameid, sigc::mem_fun<bool>(this, &ccontrol::noop) ) 00025 { 00026 _state = ::control::pause; 00027 init(); 00028 }
|
Here is the call graph for this function:

|
|
Definition at line 31 of file ctimer.cc. References control::ccontrol::init().
|
Here is the call graph for this function:

|
|
Definition at line 37 of file ctimer.cc. 00038 {
00039 }
|
|
|
Reimplemented from control::ccontrol. Definition at line 90 of file ctimer.cc. References _duration, _single_shot, stop(), and control::ccontrol::wait(). 00091 {
00092 do{
00093 switch(_state){
00094 case ::control::proceed:
00095 usleep( _duration );
00096 cthread::notify();
00097 if( _single_shot) stop();
00098 break;
00099 case ::control::terminate:
00100 return false;
00101 case ::control::pause:
00102 do wait(); while(_state == ::control::pause );
00103 break;
00104 }
00105 }while(_state != ::control::terminate );
00106 return true;
00107 }
|
Here is the call graph for this function:

|
|
Definition at line 48 of file ctimer.cc. 00049 {
00050 _state = ::control::pause;
00051 return true;
00052 }
|
|
|
Definition at line 70 of file ctimer.cc. 00071 {
00072 _state = control::proceed;
00073 ccontrol::signal();
00074 return true;
00075 }
|
|
||||||||||||
|
Definition at line 58 of file ctimer.cc. References _duration, and _single_shot. 00059 {
00060 _duration = delay;
00061 _state = ::control::proceed;
00062 _single_shot = once;
00063 return ccontrol::start();
00064 }
|
|
|
Definition at line 81 of file ctimer.cc. Referenced by controller_loop(). 00082 {
00083 _state = ::control::pause;
00084 }
|
|
|
Definition at line 47 of file ctimer.hxx. Referenced by controller_loop(), and start(). |
|
|
Definition at line 48 of file ctimer.hxx. Referenced by controller_loop(), and start(). |
1.4.0