Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / LF_Event_Loop_Thread_Helper.h
blobf47ec1c814b772105074a9e8120c3524a478810d
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file LF_Event_Loop_Thread_Helper.h
7 * @author Carlos O'Ryan <coryan@uci.edu>
8 */
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)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
24 /**
25 * @brief Helper class to enter and exit the Leader/Followers event
26 * loop.
28 * Uses the Guard idiom to enter and exit the Leader/Followers event
29 * loop.
31 class TAO_Export TAO_LF_Event_Loop_Thread_Helper
33 public:
34 /// Constructor
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);
39 /// Destructor
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;
45 private:
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 */