Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_LF_Event_Loop_Thread_Helper Class Reference

Helper class to enter and exit the Leader/Followers event loop. More...

#include <LF_Event_Loop_Thread_Helper.h>

Collaboration diagram for TAO_LF_Event_Loop_Thread_Helper:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_LF_Event_Loop_Thread_Helper (TAO_Leader_Follower &leader_follower, TAO_LF_Strategy &lf_strategy, ACE_Time_Value *max_wait_time)
 Constructor. More...

 ~TAO_LF_Event_Loop_Thread_Helper (void)
 Destructor. More...

int event_loop_return (void) const
 Calls <set_event_loop_thread> on the leader/followers object. More...


Private Attributes

TAO_Leader_Followerleader_follower_
 Reference to leader/followers object. More...

TAO_LF_Strategylf_strategy_
 The Leader/Follower Strategy used by this ORB. More...

int event_loop_return_
 Remembers the status returned while trying to enter the event loop. More...


Detailed Description

Helper class to enter and exit the Leader/Followers event loop.

Uses the Guard idiom to enter and exit the Leader/Followers event loop.

Definition at line 31 of file LF_Event_Loop_Thread_Helper.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_LF_Event_Loop_Thread_Helper::TAO_LF_Event_Loop_Thread_Helper TAO_Leader_Follower   leader_follower,
TAO_LF_Strategy   lf_strategy,
ACE_Time_Value   max_wait_time
 

Constructor.

Definition at line 5 of file LF_Event_Loop_Thread_Helper.inl.

References event_loop_return_, leader_follower_, lf_strategy_, and TAO_LF_Strategy::set_event_loop_thread.

00008       : leader_follower_ (leader_follower)
00009       , lf_strategy_ (lf_strategy)
00010 {
00011   this->event_loop_return_ =
00012     this->lf_strategy_.set_event_loop_thread (max_wait_time, leader_follower_);
00013 }

ACE_INLINE TAO_LF_Event_Loop_Thread_Helper::~TAO_LF_Event_Loop_Thread_Helper void   
 

Destructor.

Definition at line 16 of file LF_Event_Loop_Thread_Helper.inl.

References event_loop_return_, lf_strategy_, and TAO_LF_Strategy::reset_event_loop_thread.

00017 {
00018   int call_reset = (this->event_loop_return_ == 0);
00019   this->lf_strategy_.reset_event_loop_thread (call_reset,
00020                                               this->leader_follower_);
00021 }


Member Function Documentation

ACE_INLINE int TAO_LF_Event_Loop_Thread_Helper::event_loop_return void    const
 

Calls <set_event_loop_thread> on the leader/followers object.

Definition at line 24 of file LF_Event_Loop_Thread_Helper.inl.

References event_loop_return_.

Referenced by TAO_ORB_Core::run.

00025 {
00026   return this->event_loop_return_;
00027 }


Member Data Documentation

int TAO_LF_Event_Loop_Thread_Helper::event_loop_return_ [private]
 

Remembers the status returned while trying to enter the event loop.

Definition at line 54 of file LF_Event_Loop_Thread_Helper.h.

Referenced by event_loop_return, TAO_LF_Event_Loop_Thread_Helper, and ~TAO_LF_Event_Loop_Thread_Helper.

TAO_Leader_Follower& TAO_LF_Event_Loop_Thread_Helper::leader_follower_ [private]
 

Reference to leader/followers object.

Definition at line 47 of file LF_Event_Loop_Thread_Helper.h.

Referenced by TAO_LF_Event_Loop_Thread_Helper.

TAO_LF_Strategy& TAO_LF_Event_Loop_Thread_Helper::lf_strategy_ [private]
 

The Leader/Follower Strategy used by this ORB.

Definition at line 50 of file LF_Event_Loop_Thread_Helper.h.

Referenced by TAO_LF_Event_Loop_Thread_Helper, and ~TAO_LF_Event_Loop_Thread_Helper.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:25:55 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002