|
YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
计时器。 更多...
#include <ytimer.h>


Public 类型 | |
| typedef map< u32, Timer * > | TimerMap |
| 计时器组。 | |
Public 成员函数 | |
| Timer (const Duration &={}, bool=false) | |
| 构造:使用时间间隔和激活状态。 | |
| ~Timer () | |
| 析构:自动停用。 | |
| bool | IsActive () const |
| 判断 Timer 是否处于激活状态。 | |
| TimePoint | GetBaseTick () const ynothrow |
| Duration | GetInterval () const ynothrow |
| void | SetInterval (const TimeSpan &i) |
| 设置时间间隔。 | |
| void | SetInterval (const Duration &) |
| 设置时间间隔。 | |
| void | Delay (const Duration &d) |
| 延迟。 | |
| bool | Refresh () |
| 刷新。 | |
| void | Reset () |
| 复位。 | |
静态 Public 成员函数 | |
| static bool | RefreshAll () |
| 刷新计时器组中的所有计时器。 | |
| static void | ResetAll () |
| 复位计时器组中的所有计时器。 | |
Protected 属性 | |
| TimePoint | nBase |
| Duration | nInterval |
静态 Protected 属性 | |
| static TimerMap | mTimers |
友元 | |
| YF_API friend void | Activate (Timer &) |
| 激活。 | |
| YF_API friend void | Deactivate (Timer &) |
| 停用。 | |
额外继承的成员函数 | |
Protected 成员函数 继承自 YSLib::GMCounter< Timer > | |
| GMCounter () ynothrow | |
| 构造。 | |
| GMCounter (const GMCounter &) ynothrow | |
| 复制构造。 | |
| GMCounter (GMCounter &&)=default | |
| 转移构造。 | |
| yconstfn u32 | GetObjectID () const ynothrow |
| ~GMCounter () ynothrow | |
| 析构。 | |
| void | ResetID () ynothrow |
| 复位实例标识序列号。 | |
静态 Protected 成员函数 继承自 YSLib::GMCounter< Timer > | |
| static u32 | GetCount () ynothrow |
| static u32 | GetTotal () ynothrow |
| static void | ResetCount () ynothrow |
| 复位实例生成计数。 | |
| static void | ResetTotal () ynothrow |
| 复位实例计数。 | |
Private 成员函数 继承自 ystdex::noncopyable | |
| noncopyable (const noncopyable &)=delete | |
| 禁止复制构造。 | |
| noncopyable & | operator= (const noncopyable &)=delete |
| 禁止赋值复制。 | |
| noncopyable ()=default | |
protected 构造:默认实现。 | |
| ~noncopyable ()=default | |
protected 析构:默认实现。 | |
| typedef map<u32, Timer*> YSLib::Timers::Timer::TimerMap |
|
explicit |
|
inline |
|
inline |
| bool Timer::IsActive | ( | ) | const |
判断 Timer 是否处于激活状态。
在文件 ytimer.cpp 第 79 行定义.
参考 YSLib::GMCounter< Timer >::GetObjectID() , 以及 mTimers.
参考自 ShlTextReader::OnKeyDown() , 以及 ShlTextReader::Scroll().


| bool Timer::Refresh | ( | ) |
刷新。
在文件 ytimer.cpp 第 100 行定义.
参考 nBase,nInterval,YSLib::Timers::HighResolutionClock::now() , 以及 YB_LIKELY.
参考自 YSLib::UI::InputTimer::Refresh() , 以及 ShlTextReader::Scroll().


|
static |
|
inline |
|
static |
|
inline |
设置时间间隔。
参考自 YSLib::UI::InputTimer::Refresh() , 以及 YSLib::UI::InputTimer::Reset().

| void YSLib::Timers::Timer::SetInterval | ( | const Duration & | ) |
设置时间间隔。
|
staticprotected |
参考自 Activate(),Deactivate(),IsActive(),RefreshAll() , 以及 ResetAll().