SmartSoft Component-Developer API
Public Member Functions | Protected Member Functions | List of all members
Smart::TimedTaskTrigger Class Reference

#include <smartTimedTaskTrigger.h>

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

Public Member Functions

 TimedTaskTrigger ()
 
virtual ~TimedTaskTrigger ()
 
- Public Member Functions inherited from Smart::ITimerHandler
virtual ~ITimerHandler ()=default
 
- Public Member Functions inherited from Smart::TaskTriggerSubject
 TaskTriggerSubject ()
 
virtual ~TaskTriggerSubject ()
 
void attach (TaskTriggerObserver *observer, const unsigned int &prescaleFactor=1)
 
void detach (TaskTriggerObserver *observer)
 

Protected Member Functions

virtual void timerExpired (const TimePoint &abs_time, const void *act) override
 hook called on timer expiration More...
 
virtual void timerCancelled () override
 hook called when the timer is cancelled More...
 
virtual void timerDeleted (const void *act) override
 hook called when the timer is deleted More...
 
- Protected Member Functions inherited from Smart::TaskTriggerSubject
void trigger_all_tasks ()
 

Constructor & Destructor Documentation

◆ TimedTaskTrigger()

Smart::TimedTaskTrigger::TimedTaskTrigger ( )
inline

◆ ~TimedTaskTrigger()

virtual Smart::TimedTaskTrigger::~TimedTaskTrigger ( )
inlinevirtual

Member Function Documentation

◆ timerCancelled()

virtual void Smart::TimedTaskTrigger::timerCancelled ( )
inlineoverrideprotectedvirtual

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.

Implements Smart::ITimerHandler.

◆ timerDeleted()

virtual void Smart::TimedTaskTrigger::timerDeleted ( const void *  act)
inlineoverrideprotectedvirtual

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).

Implements Smart::ITimerHandler.

◆ timerExpired()

virtual void Smart::TimedTaskTrigger::timerExpired ( const TimePoint abs_time,
const void *  act 
)
inlineoverrideprotectedvirtual

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).

Implements Smart::ITimerHandler.


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