00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Reactor_Notification_Strategy.h 00006 * 00007 * $Id: Reactor_Notification_Strategy.h 70893 2006-02-10 10:42:34Z jwillemsen $ 00008 * 00009 * @author Doug Schmidt 00010 */ 00011 //============================================================================= 00012 #ifndef ACE_REACTOR_NOTIFICATION_STRATEGY_H 00013 #define ACE_REACTOR_NOTIFICATION_STRATEGY_H 00014 00015 #include /**/ "ace/pre.h" 00016 00017 #include "ace/Notification_Strategy.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00024 00025 /** 00026 * @class ACE_Reactor_Notification_Strategy 00027 * 00028 * @brief Used to notify an ACE_Reactor 00029 * 00030 * Integrates the ACE_Message_Queue notification into the 00031 * <ACE_Reactor::notify> method. 00032 */ 00033 class ACE_Export ACE_Reactor_Notification_Strategy : public ACE_Notification_Strategy 00034 { 00035 public: 00036 ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor, 00037 ACE_Event_Handler *eh, 00038 ACE_Reactor_Mask mask); 00039 00040 /// Default dtor. 00041 virtual ~ACE_Reactor_Notification_Strategy (void); 00042 00043 virtual int notify (void); 00044 00045 virtual int notify (ACE_Event_Handler *, 00046 ACE_Reactor_Mask mask); 00047 00048 /// Get the reactor 00049 ACE_Reactor *reactor (void); 00050 00051 /// Set the reactor 00052 void reactor (ACE_Reactor *r); 00053 00054 protected: 00055 /// The Reactor 00056 ACE_Reactor *reactor_; 00057 }; 00058 00059 ACE_END_VERSIONED_NAMESPACE_DECL 00060 00061 #if defined (__ACE_INLINE__) 00062 #include "ace/Reactor_Notification_Strategy.inl" 00063 #endif /* __ACE_INLINE __ */ 00064 00065 #include /**/ "ace/post.h" 00066 00067 #endif /*ACE_REACTOR_NOTIFICATION_STRATEGY_H */