|
Public Member Functions |
void | Start () |
void | Stop () |
virtual void | HandleTask () |
bool | IsRunning () |
void | disconnect_all () |
void | signal_connect (CP_Signal *inSender) |
void | signal_disconnect (CP_Signal *inSender) |
void | SetID (FourCharCode inIdentifier) |
FourCharCode | GetID () |
void | RegisterSignal (const CP_SignalHolder &inSignal) |
CP_DataValueSignal * | FindSignal (const CP_String &inSignalName) |
UInt32 | GetNumberSignals () |
CP_String | GetNthSignalName (UInt32 inSignalIndex) |
void | RegisterSlot (const CP_SlotHolder &inSlot) |
CP_DataValueSlot | FindSlot (const CP_String &inSlotName) |
UInt32 | GetNumberSlots () |
CP_String | GetNthSlotName (UInt32 inSlotIndex) |
template<class R, class P1, class P2> |
CP_CommandHandlerSignal * | Connect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode) |
template<class R, class P1, class P2> |
void | Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2)) |
|
| CP_TimedTask (double inMilliSecFrequency, UInt32 inUserData=0) |
| Constructor.
|
virtual | ~CP_TimedTask () throw () |
| Destructor.
|
Static Public Member Functions |
static void | Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false) |
static void | Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue) |
Protected Member Functions |
EventLoopTimerUPP | GetTimerUPP () |
Protected Attributes |
bool | fIsRunning |
UInt32 | fUserData |
CP_DataValueSignal | fTimerTaskSignal |
double | fMilliSecFrequency |
EventLoopTimerRef | fTimer |
CP_Window * | fTimerWindow |
UINT | fWinTimer |
sender_set | fSenders |
CP_Signals_Array * | fSignals |
CP_Slots_Array * | fSlots |
FourCharCode | fObjectID |
Static Protected Attributes |
static FourCharCode | fObjectIDCount = 0 |
Private Member Functions |
void | CreateDummyTimerWindow () |
void | HandlerWMTimer (CPLAT::CP_Event_Base &inEvent) |
Static Private Member Functions |
static pascal void | CP_TimedTask_timerCallback (EventLoopTimerRef inTimer, void *userData) |
CPLAT::CP_TimedTask *timer = CP_new CPLAT::CP_TimedTask( kEventDurationSecond * 5, dataValue );
timer->FindSignal( kCP_Signal_TimedTask )->connect( CP_SigSlot::slot(this, &Timer_Application::TimerTask) );
timer->Start();
In this above example, the slot TimerTask will be called every 5 seconds. The dataValue passed to the CP_TimedTask constructor will be passed to the timer slot you have defined. You can use this data member anyway you want.