summaryrefslogtreecommitdiff
path: root/ace/Reactor_Notification_Strategy.h
blob: 4a38f37ec25c241a1ed2a432e08bd02dbf77297a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file   Reactor_Notification_Strategy.h
 *
 *  $Id$
 *
 *  @author Doug Schmidt
 */
//=============================================================================
#ifndef ACE_REACTOR_NOTIFICATION_STRATEGY_H
#define ACE_REACTOR_NOTIFICATION_STRATEGY_H
#include /**/ "ace/pre.h"

#include "ace/Notification_Strategy.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

/**
 * @class ACE_Reactor_Notification_Strategy
 *
 * @brief Used to notify an ACE_Reactor
 *
 * Integrates the <ACE_Message_Queue> notification into the
 * <ACE_Reactor::notify> method.
 */
class ACE_Export ACE_Reactor_Notification_Strategy : public ACE_Notification_Strategy
{
public:
  ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor,
                                     ACE_Event_Handler *eh,
                                     ACE_Reactor_Mask mask);

  /// Default dtor.
  virtual ~ACE_Reactor_Notification_Strategy (void);

  virtual int notify (void);

  virtual int notify (ACE_Event_Handler *,
                      ACE_Reactor_Mask mask);

  /// Get the reactor
  ACE_Reactor *reactor (void);

  /// Set the reactor
  void reactor (ACE_Reactor *r);

protected:
  /// The Reactor
  ACE_Reactor *reactor_;
};

#if defined (__ACE_INLINE__)
#include "ace/Reactor_Notification_Strategy.inl"
#endif /* __ACE_INLINE __ */

#include /**/ "ace/post.h"
#endif /*ACE_REACTOR_NOTIFICATION_STRATEGY_H */