SmartSoft Component-Developer API
Public Member Functions | List of all members
Smart::ITimerHandler Class Referenceabstract

#include <smartITimerHandler.h>

Inheritance diagram for Smart::ITimerHandler:
Smart::TimedTaskTrigger

Public Member Functions

virtual ~ITimerHandler ()=default
 
virtual void timerExpired (const TimePoint &abs_time, const void *act)=0
 hook called on timer expiration More...
 
virtual void timerCancelled ()=0
 hook called when the timer is cancelled More...
 
virtual void timerDeleted (const void *act)=0
 hook called when the timer is deleted More...
 

Constructor & Destructor Documentation

◆ ~ITimerHandler()

virtual Smart::ITimerHandler::~ITimerHandler ( )
virtualdefault

Member Function Documentation

◆ timerCancelled()

virtual void Smart::ITimerHandler::timerCancelled ( )
pure virtual

hook called when the timer is cancelled

Whenever the cancel method of the timer manager is triggered for a timer that is associated with this handler, then this method is called. Be aware that this method might be called from within a different thread than the timerExpired method, so make sure you do not concurrently write the same data from within the different handler methods.

Implemented in Smart::TimedTaskTrigger.

◆ timerDeleted()

virtual void Smart::ITimerHandler::timerDeleted ( const void *  act)
pure virtual

hook called when the timer is deleted

Typically when the TimerManager is commanded to shut-down, it calls all associated timers to clean-up their resources using this callback. Be aware that this method might be called from within a different thread than the timerExpired method, so make sure you do not concurrently write the same data from within the different handler methods.

Parameters
acta pointer (to a pointer) to retrieve the act that was given on scheduleTimer(). Can be used to release resources (see Asynchronous Completion Token (ACT), POSA2).

Implemented in Smart::TimedTaskTrigger.

◆ timerExpired()

virtual void Smart::ITimerHandler::timerExpired ( const TimePoint abs_time,
const void *  act 
)
pure virtual

hook called on timer expiration

Parameters
abs_timethe time-point of the current timeout (which is independent of when the thread actually executed this method)
acta pointer (to a pointer) to retrieve the act that was given on scheduleTimer(). Can be used to release resources (see Asynchronous Completion Token (ACT), POSA2).

Implemented in Smart::TimedTaskTrigger.


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