Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Notification_Strategy.h
blob39453792ded5766c410ccac37a711a222a53f3f3
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Notification_Strategy.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
10 #ifndef ACE_NOTIFICATION_STRATEGY_H
11 #define ACE_NOTIFICATION_STRATEGY_H
12 #include /**/ "ace/pre.h"
14 #include "ace/Event_Handler.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
22 // Forward decls.
23 class ACE_Reactor;
25 /**
26 * @class ACE_Notification_Strategy
28 * @brief Abstract class used for notifying an interested party
30 * A vehicle for extending the behavior of ACE_Message_Queue wrt
31 * notification *without subclassing*. Thus, it's an example of
32 * the Bridge/Strategy patterns.
34 class ACE_Export ACE_Notification_Strategy
36 public:
37 /// Constructor.
38 ACE_Notification_Strategy (ACE_Event_Handler *eh, ACE_Reactor_Mask mask);
40 /// Destructor.
41 virtual ~ACE_Notification_Strategy () = default;
43 virtual int notify () = 0;
44 virtual int notify (ACE_Event_Handler *, ACE_Reactor_Mask mask) = 0;
46 /// Get the event handler.
47 ACE_Event_Handler *event_handler ();
49 /// Set the event handler.
50 void event_handler (ACE_Event_Handler *eh);
52 /// Get the reactor mask.
53 ACE_Reactor_Mask mask () const;
55 /// Set the reactor mask.
56 void mask (ACE_Reactor_Mask m);
58 protected:
59 /// The event handler.
60 ACE_Event_Handler *eh_;
62 /// The reactor mask.
63 ACE_Reactor_Mask mask_;
66 ACE_END_VERSIONED_NAMESPACE_DECL
68 #if defined (__ACE_INLINE__)
69 #include "ace/Notification_Strategy.inl"
70 #endif /* __ACE_INLINE __ */
72 #include /**/ "ace/post.h"
73 #endif /*ACE_NOTIFICATION_STRATEGY_H */