3 //=============================================================================
5 * @file LF_Event_Loop_Thread_Helper.h
7 * @author Carlos O'Ryan <coryan@uci.edu>
9 //=============================================================================
11 #ifndef TAO_LF_EVENT_LOOP_THREAD_HELPER_H
12 #define TAO_LF_EVENT_LOOP_THREAD_HELPER_H
14 #include /**/ "ace/pre.h"
16 #include "tao/LF_Strategy.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 * @brief Helper class to enter and exit the Leader/Followers event
28 * Uses the Guard idiom to enter and exit the Leader/Followers event
31 class TAO_Export TAO_LF_Event_Loop_Thread_Helper
35 TAO_LF_Event_Loop_Thread_Helper (TAO_Leader_Follower
&leader_follower
,
36 TAO_LF_Strategy
&lf_strategy
,
37 ACE_Time_Value
*max_wait_time
);
40 ~TAO_LF_Event_Loop_Thread_Helper ();
42 /// Calls @c set_event_loop_thread on the leader/followers object.
43 int event_loop_return () const;
46 /// Reference to leader/followers object.
47 TAO_Leader_Follower
&leader_follower_
;
49 /// The Leader/Follower Strategy used by this ORB.
50 TAO_LF_Strategy
&lf_strategy_
;
52 /// Remembers the status returned while trying to enter the event loop.
53 int event_loop_return_
;
56 TAO_END_VERSIONED_NAMESPACE_DECL
58 #if defined (__ACE_INLINE__)
59 # include "tao/LF_Event_Loop_Thread_Helper.inl"
60 #endif /* __ACE_INLINE__ */
62 #include /**/ "ace/post.h"
64 #endif /* TAO_LF_EVENT_LOOP_THREAD_HELPER_H */