![]() |
Dataflow Runtime API
3.0.3.0
|
This class implements a timer that sends ticks in regular intervals to the attached timer listeners. More...
#include <Imt.Base.OS.WinEC7/UITimer.h>
Public Member Functions | |
UITimer (const std::wstring &id, const TimePeriod &tickPeriod) | |
Constructor. More... | |
virtual | ~UITimer (void) |
Destructor. More... | |
void | start (void) |
Starts the given ui timer. More... | |
void | stop (void) |
Stops the given ui timer. More... | |
void | setPeriod (const TimePeriod &tickPeriod) |
Sets the interval to the given tick period. More... | |
const TimePeriod & | getPeriod (void) const |
Returns the interval in ms. More... | |
bool | isRunning (void) const |
Returns the ui timer state. More... | |
void | addTimerListener (TimerListenerIfc &listener) |
Listener that get notified when a timer tick occurs. More... | |
void | removeTimerListener (const TimerListenerIfc &listener) |
Removes the given listener from the list. More... | |
const std::wstring & | getId (void) const |
Get identification of the ui timer. More... | |
Friends | |
class | UITimerHelper |
This class implements a timer that sends ticks in regular intervals to the attached timer listeners.
The ticks of this timer are executed by the UI thread. So when you use this timer, you can access data belonging to the ui thread without taking care of synchronization issues and race conditions.
|
explicit |
Constructor.
id | Identifier of the timer |
tickPeriod | Tickperiod of the timer |
|
virtual |
Destructor.
void imt::base::os::winec7::UITimer::addTimerListener | ( | TimerListenerIfc & | listener | ) |
Listener that get notified when a timer tick occurs.
listener | Listener to add. |
const std::wstring& imt::base::os::winec7::UITimer::getId | ( | void | ) | const |
Get identification of the ui timer.
const TimePeriod& imt::base::os::winec7::UITimer::getPeriod | ( | void | ) | const |
Returns the interval in ms.
bool imt::base::os::winec7::UITimer::isRunning | ( | void | ) | const |
Returns the ui timer state.
void imt::base::os::winec7::UITimer::removeTimerListener | ( | const TimerListenerIfc & | listener | ) |
Removes the given listener from the list.
listener | Listener to remove. |
void imt::base::os::winec7::UITimer::setPeriod | ( | const TimePeriod & | tickPeriod | ) |
Sets the interval to the given tick period.
This method may stop and restart the timer to change the period.
tickPeriod | tick period of the timer. |
void imt::base::os::winec7::UITimer::start | ( | void | ) |
Starts the given ui timer.
void imt::base::os::winec7::UITimer::stop | ( | void | ) |
Stops the given ui timer.
|
friend |