Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ace / Timer_Queue_T.inl
blob15c0e8ef99d5f83a6498805ccbb3e56bde313601
1 // -*- C++ -*-
2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 template <class TYPE, class FUNCTOR> ACE_INLINE FUNCTOR &
5 ACE_Timer_Queue_Upcall_Base<TYPE, FUNCTOR>::upcall_functor ()
7   return *this->upcall_functor_;
10 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> ACE_INLINE void
11 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::timer_skew (const ACE_Time_Value &skew)
13   timer_skew_ = skew;
16 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> ACE_INLINE const ACE_Time_Value &
17 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::timer_skew () const
19   return timer_skew_;
22 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> int
23 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::dispatch_info (const ACE_Time_Value &cur_time,
24                                                            ACE_Timer_Node_Dispatch_Info_T<TYPE> &info)
26   ACE_TRACE ("ACE_Timer_Queue_T::dispatch_info");
27   ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, 0));
29   return this->dispatch_info_i (cur_time, info);
32 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> ACE_INLINE void
33 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::upcall (ACE_Timer_Node_Dispatch_Info_T<TYPE> &info,
34                                                     const ACE_Time_Value &cur_time)
36   this->upcall_functor ().timeout (*this,
37                                    info.type_,
38                                    info.act_,
39                                    info.recurring_timer_,
40                                    cur_time);
43 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> ACE_INLINE void
44 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::preinvoke (ACE_Timer_Node_Dispatch_Info_T<TYPE> &info,
45                                                        const ACE_Time_Value &cur_time,
46                                                        const void *&upcall_act)
48   this->upcall_functor ().preinvoke (*this,
49                                      info.type_,
50                                      info.act_,
51                                      info.recurring_timer_,
52                                      cur_time,
53                                      upcall_act);
56 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> ACE_INLINE void
57 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::postinvoke (ACE_Timer_Node_Dispatch_Info_T<TYPE> &info,
58                                                         const ACE_Time_Value &cur_time,
59                                                         const void *upcall_act)
61   this->upcall_functor ().postinvoke (*this,
62                                       info.type_,
63                                       info.act_,
64                                       info.recurring_timer_,
65                                       cur_time,
66                                       upcall_act);
69 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> ACE_INLINE ACE_Time_Value
70 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::gettimeofday_static ()
72   // Get the current time according to the time policy.
73   return this->time_policy_ ();
76 template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> ACE_INLINE void
77 ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::set_time_policy (TIME_POLICY const & rhs)
79   this->time_policy_ = rhs;
82 ACE_END_VERSIONED_NAMESPACE_DECL