SObjectizer  5.5
Public Member Functions | Private Types | List of all members
timertt::details::manager_impl_template< Engine > Class Template Reference

Template-based implementation of timer manager. More...

#include <all.hpp>

Inheritance diagram for timertt::details::manager_impl_template< Engine >:
timertt::details::basic_methods_impl_mixin< Engine, consumer_type::manager >

Public Member Functions

template<typename... Args>
 manager_impl_template (Args &&... args)
 Constructor with all parameters. More...
 
void reset ()
 Reset all timers and return manager to the initial state. More...
 
void process_expired_timers ()
 Perform processing of expired timers. More...
 
std::tuple< bool, monotonic_clock::time_point > nearest_time_point ()
 Get the time for next process_expired_timers invocation. More...
 
template<typename Duration >
monotonic_clock::duration timeout_before_nearest_timer (Duration default_timeout)
 Get the sleeping time before the earlist timer expiration. More...
 
- Public Member Functions inherited from timertt::details::basic_methods_impl_mixin< Engine, consumer_type::manager >
 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 = basic_methods_impl_mixin< Engine, consumer_type::manager >
 Shorthand for base type. More...
 

Additional Inherited Members

- Public Types inherited from timertt::details::basic_methods_impl_mixin< Engine, consumer_type::manager >
using thread_safety = typename Engine::thread_safety
 A typedef for thread safety type from Engine. More...
 
using timer_action = typename Engine::timer_action
 An alias for timer_action type. More...
 
using scoped_timer_object = typename Engine::scoped_timer_object
 An alias for scoped timer objects. More...
 
using timer_holder = timer_object_holder< typename Engine::thread_safety >
 Shorthand for timer objects' smart pointer. More...
 
- Protected Attributes inherited from timertt::details::basic_methods_impl_mixin< Engine, consumer_type::manager >
Engine m_engine
 Actual timer engine instance. More...
 

Detailed Description

template<typename Engine>
class timertt::details::manager_impl_template< Engine >

Template-based implementation of timer manager.

Template Parameters
Engineactual type of engine to be used.
Since
v.1.1.0

Member Typedef Documentation

◆ base_type

template<typename Engine>
using timertt::details::manager_impl_template< Engine >::base_type = basic_methods_impl_mixin< Engine, consumer_type::manager >
private

Shorthand for base type.

Constructor & Destructor Documentation

◆ manager_impl_template()

template<typename Engine>
template<typename... Args>
timertt::details::manager_impl_template< Engine >::manager_impl_template ( Args &&...  args)
inline

Constructor with all parameters.

Member Function Documentation

◆ nearest_time_point()

template<typename Engine>
std::tuple< bool, monotonic_clock::time_point > timertt::details::manager_impl_template< Engine >::nearest_time_point ( )
inline

Get the time for next process_expired_timers invocation.

Returns
tuple<true,timepoint> if there is a timer to process. Or tuple<false,undefined> if there is no timers to be processed.

◆ process_expired_timers()

template<typename Engine>
void timertt::details::manager_impl_template< Engine >::process_expired_timers ( )
inline

Perform processing of expired timers.

◆ reset()

template<typename Engine>
void timertt::details::manager_impl_template< Engine >::reset ( )
inline

Reset all timers and return manager to the initial state.

◆ timeout_before_nearest_timer()

template<typename Engine>
template<typename Duration >
monotonic_clock::duration timertt::details::manager_impl_template< Engine >::timeout_before_nearest_timer ( Duration  default_timeout)
inline

Get the sleeping time before the earlist timer expiration.

Returns
actual sleeping time if there is at least one timer. Or default_timeout if there is no any timers.
Template Parameters
Durationtype for default_timeout
Parameters
default_timeoutDefault timeout value which will be used if there is no any timers.

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