SObjectizer  5.5
Public Member Functions | Private Types | List of all members
timertt::timer_list_thread_template< Timer_Action, Error_Logger, Actor_Exception_Handler > Class Template Reference

A timer list thread template. More...

#include <all.hpp>

Inheritance diagram for timertt::timer_list_thread_template< Timer_Action, Error_Logger, Actor_Exception_Handler >:
timertt::details::thread_impl_template< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > > timertt::details::basic_methods_impl_mixin< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler >, consumer_type::thread >

Public Member Functions

 timer_list_thread_template ()
 Default constructor. More...
 
 timer_list_thread_template (Error_Logger error_logger, Actor_Exception_Handler actor_exception_handler)
 Constructor with all parameters. More...
 
- Public Member Functions inherited from timertt::details::thread_impl_template< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > >
 thread_impl_template (Args &&... args)
 Constructor with all parameters. More...
 
 ~thread_impl_template ()
 Destructor. More...
 
void start ()
 Start timer thread. More...
 
void shutdown ()
 Initiate shutdown for the timer thread without waiting for completion. More...
 
void join ()
 Wait for completion of timer thread. More...
 
void shutdown_and_join ()
 Initiate shutdown and wait for completion. More...
 
- Public Member Functions inherited from timertt::details::basic_methods_impl_mixin< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler >, consumer_type::thread >
 basic_methods_impl_mixin (Args &&... args)
 Constructor with all parameters. More...
 
timer_holder allocate ()
 Allocate of new timer object. More...
 
void activate (timer_holder timer, Duration_1 pause, timer_action action)
 Activate timer and schedule it for execution. More...
 
void activate (scoped_timer_object &timer, Duration_1 pause, timer_action action)
 Activate a scoped timer and schedule it for execution. More...
 
void activate (Duration_1 pause, timer_action action)
 Activate timer and schedule it for execution. More...
 
void activate (timer_holder timer, Duration_1 pause, Duration_2 period, timer_action action)
 Activate timer and schedule it for execution. More...
 
void activate (scoped_timer_object &timer, Duration_1 pause, Duration_2 period, timer_action action)
 Activate a scoped timer and schedule it for execution. More...
 
void activate (Duration_1 pause, Duration_2 period, timer_action action)
 Activate timer and schedule it for execution. More...
 
void reschedule (timer_holder timer, Duration_1 pause, timer_action action)
 Perform an attempt to reschedule a timer. More...
 
void reschedule (timer_holder timer, Duration_1 pause, Duration_2 period, timer_action action)
 Perform an attempt to reschedule a timer. More...
 
void deactivate (timer_holder timer)
 Deactivate timer and remove it from the list. More...
 
void deactivate (scoped_timer_object &timer)
 Deactivate timer and remove it from the list. More...
 
timer_quantities get_timer_quantities ()
 Count of timers of various types. More...
 
bool empty ()
 Check for emptiness. More...
 

Private Types

using base_type = details::thread_impl_template< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > >
 

Additional Inherited Members

- Public Types inherited from timertt::details::basic_methods_impl_mixin< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler >, consumer_type::thread >
using thread_safety = typename details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > ::thread_safety
 A typedef for thread safety type from Engine. More...
 
using timer_action = typename details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > ::timer_action
 An alias for timer_action type. More...
 
using scoped_timer_object = typename details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > ::scoped_timer_object
 An alias for scoped timer objects. More...
 
using timer_holder = timer_object_holder< typename details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > ::thread_safety >
 Shorthand for timer objects' smart pointer. More...
 
- Protected Member Functions inherited from timertt::details::thread_impl_template< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > >
void body ()
 Thread body. More...
 
void sleep_for_next_event (typename base_type::lock_guard &lock)
 Waiting for next event to process. More...
 
- Protected Attributes inherited from timertt::details::thread_impl_template< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > >
bool m_shutdown
 Shutdown flag. More...
 
- Protected Attributes inherited from timertt::details::basic_methods_impl_mixin< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler >, consumer_type::thread >
details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > m_engine
 Actual timer engine instance. More...
 

Detailed Description

template<typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
class timertt::timer_list_thread_template< Timer_Action, Error_Logger, Actor_Exception_Handler >

A timer list thread template.

Note
Please see description of details::timer_list_engine for the details of this timer mechanism.
Template Parameters
Timer_Actiontype of functor to perform an user-defined action when timer expires. This must be Moveable and MoveConstructible type.
Error_Loggertype of logger for errors detected during timer thread execution. Interface for error logger is defined by default_error_logger class.
Actor_Exception_Handlertype of handler for dealing with exceptions thrown from timer actors. Interface for exception handler is defined by default_actor_exception_handler.

Member Typedef Documentation

◆ base_type

template<typename Timer_Action , typename Error_Logger , typename Actor_Exception_Handler >
using timertt::timer_list_thread_template< Timer_Action, Error_Logger, Actor_Exception_Handler >::base_type = details::thread_impl_template< details::timer_list_engine< ::timertt::thread_safety::safe, Timer_Action, Error_Logger, Actor_Exception_Handler > >
private

Constructor & Destructor Documentation

◆ timer_list_thread_template() [1/2]

template<typename Timer_Action , typename Error_Logger , typename Actor_Exception_Handler >
timertt::timer_list_thread_template< Timer_Action, Error_Logger, Actor_Exception_Handler >::timer_list_thread_template ( )
inline

Default constructor.

◆ timer_list_thread_template() [2/2]

template<typename Timer_Action , typename Error_Logger , typename Actor_Exception_Handler >
timertt::timer_list_thread_template< Timer_Action, Error_Logger, Actor_Exception_Handler >::timer_list_thread_template ( Error_Logger  error_logger,
Actor_Exception_Handler  actor_exception_handler 
)
inline

Constructor with all parameters.


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