soui
5.0.0.1
Soui5 Doc
Loading...
Searching...
No Matches
STimer.cpp
1
#include "include/souistd.h"
2
#include "helper/STimer.h"
3
#include "helper/STimerGenerator.h"
4
5
SNSBEGIN
6
STimer::STimer
(IEvtSlot *pSlot)
7
: m_uTimerId(0)
8
{
9
m_evtSlot.Attach(pSlot->Clone());
10
}
11
12
STimer::~STimer
(
void
)
13
{
14
KillTimer
();
15
}
16
17
BOOL
STimer::StartTimer
(THIS_
int
nElapse, BOOL bRepeat, LPARAM uData)
18
{
19
KillTimer
();
20
m_uTimerId =
STimerGenerator::getSingletonPtr
()->SetTimer(m_evtSlot, nElapse, bRepeat, uData);
21
return
m_uTimerId != 0;
22
}
23
24
void
STimer::KillTimer
(THIS)
25
{
26
if
(m_uTimerId)
27
{
28
STimerGenerator::getSingletonPtr
()->ClearTimer(m_uTimerId);
29
m_uTimerId = 0;
30
}
31
}
32
33
SNSEND
SSingleton2< TClass >::getSingletonPtr
static TClass * getSingletonPtr(void)
Definition
SSingleton2.h:70
STimer::~STimer
~STimer(void)
析构函数
Definition
STimer.cpp:12
STimer::STimer
STimer(IEvtSlot *pSlot)
构造函数
Definition
STimer.cpp:6
STimer::StartTimer
BOOL StartTimer(int nElapse, BOOL bRepeat, LPARAM uData=0) OVERRIDE
启动定时器
Definition
STimer.cpp:17
STimer::KillTimer
void KillTimer() OVERRIDE
停止定时器
Definition
STimer.cpp:24
SOUI
src
helper
STimer.cpp
Generated by
1.13.2