ASPiK SDK
VSTGUI::CVSTGUITimer Class Referencefinal

A timer class, which posts timer messages to CBaseObjects or calls a lambda function (c++11 only). More...

#include <cvstguitimer.h>

Inheritance diagram for VSTGUI::CVSTGUITimer:
VSTGUI::CBaseObject VSTGUI::IPlatformTimerCallback VSTGUI::ReferenceCounted< T > VSTGUI::IReference

Public Types

using CallbackFunc = std::function< void(CVSTGUITimer *)>
 

Public Member Functions

 CVSTGUITimer (const CallbackFunc &callback, uint32_t fireTime=100, bool doStart=true)
 
 CVSTGUITimer (CallbackFunc &&callback, uint32_t fireTime=100, bool doStart=true)
 
 CVSTGUITimer (CBaseObject *timerObject, uint32_t fireTime=100, bool doStart=false)
 
bool start ()
 starts the timer
 
bool stop ()
 stops the timer, returns whether timer was running or not
 
bool setFireTime (uint32_t newFireTime)
 in milliseconds
 
uint32_t getFireTime () const
 in milliseconds
 
- Public Member Functions inherited from VSTGUI::CBaseObject
 CBaseObject (const CBaseObject &o)
 
CBaseObjectoperator= (const CBaseObject &obj)
 
virtual CMessageResult notify (CBaseObject *sender, IdStringPtr message)
 
- Public Member Functions inherited from VSTGUI::ReferenceCounted< T >
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
void forget () override
 decrease refcount and delete object if refcount == 0
 
void remember () override
 increase refcount
 
virtual int32_t getNbReference () const
 get refcount
 

Static Public Attributes

static IdStringPtr kMsgTimer = "timer fired"
 message string posted to CBaseObject's notify method
 

Protected Member Functions

void beforeDelete () override
 
void fire () override
 

Protected Attributes

uint32_t fireTime
 
CallbackFunc callbackFunc
 
SharedPointer< IPlatformTimerplatformTimer
 

Detailed Description

A timer class, which posts timer messages to CBaseObjects or calls a lambda function (c++11 only).


The documentation for this class was generated from the following files: