SObjectizer  5.7
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler > Class Template Reference

A common part for all timer engines. More...

#include <all.hpp>

Inheritance diagram for timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >:
timertt::details::timer_list_engine< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler > timertt::details::timer_heap_engine< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler > timertt::details::timer_wheel_engine< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >

Public Types

using thread_safety = Thread_Safety
 Indicator of thread-safety. More...
 
using timer_action = Timer_Action
 Alias for Timer_Action. More...
 

Public Member Functions

 engine_common (Error_Logger error_logger, Actor_Exception_Handler exception_handler)
 Initializing constructor. More...
 
timer_quantities get_timer_quantities () const
 Get the quantities of timers of various types. More...
 

Protected Member Functions

void inc_timer_count (timer_kind kind)
 Helper method for increment the count of timers of the specific type. More...
 
void dec_timer_count (timer_kind kind)
 Helper method for decrement the count of timers of the specific type. More...
 
void reset_timer_count ()
 Helper method for reseting quantities of timers to zero. More...
 

Protected Attributes

Error_Logger m_error_logger
 Error logger. More...
 
Actor_Exception_Handler m_exception_handler
 Exception handler. More...
 
timer_quantities m_timer_quantities
 Quantities of timers of various types. More...
 

Detailed Description

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
class timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >

A common part for all timer engines.

Will be used by concrete engines for storing instances of Error_Logger and Actor_Exception_Handler.

Also defines type thread_safety to be used later.

Template Parameters
Thread_SafetyThread-safety indicator. Must be timertt::thread_safety::unsafe or timertt::thread_safety::safe.
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 handling. 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.
Since
v.1.1.0

Member Typedef Documentation

◆ thread_safety

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
using timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::thread_safety = Thread_Safety

Indicator of thread-safety.

◆ timer_action

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
using timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::timer_action = Timer_Action

Alias for Timer_Action.

Constructor & Destructor Documentation

◆ engine_common()

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::engine_common ( Error_Logger  error_logger,
Actor_Exception_Handler  exception_handler 
)
inline

Initializing constructor.

Member Function Documentation

◆ dec_timer_count()

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
void timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::dec_timer_count ( timer_kind  kind)
inlineprotected

Helper method for decrement the count of timers of the specific type.

Since
v.1.1.1

◆ get_timer_quantities()

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
timer_quantities timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::get_timer_quantities ( ) const
inline

Get the quantities of timers of various types.

Since
v.1.1.1

◆ inc_timer_count()

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
void timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::inc_timer_count ( timer_kind  kind)
inlineprotected

Helper method for increment the count of timers of the specific type.

Since
v.1.1.1

◆ reset_timer_count()

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
void timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::reset_timer_count ( )
inlineprotected

Helper method for reseting quantities of timers to zero.

Since
v.1.1.1

Member Data Documentation

◆ m_error_logger

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
Error_Logger timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::m_error_logger
protected

Error logger.

◆ m_exception_handler

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
Actor_Exception_Handler timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::m_exception_handler
protected

Exception handler.

◆ m_timer_quantities

template<typename Thread_Safety, typename Timer_Action, typename Error_Logger, typename Actor_Exception_Handler>
timer_quantities timertt::details::engine_common< Thread_Safety, Timer_Action, Error_Logger, Actor_Exception_Handler >::m_timer_quantities
protected

Quantities of timers of various types.

Since
v.1.1.1

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