summaryrefslogtreecommitdiff
path: root/ace/Strategies.cpp
blob: 576faa6ee2b42111eedc5c0cd54832c1f02b413c (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Strategies.cpp
// $Id$

#if !defined (ACE_STRATEGIES_C)
#define ACE_STRATEGIES_C

#define ACE_BUILD_DLL
#include "ace/Reactor.h"
#include "ace/ReactorEx.h"
#include "ace/Strategies.h"

ACE_Notification_Strategy::ACE_Notification_Strategy (ACE_Event_Handler *eh,
						      ACE_Reactor_Mask mask)
  : eh_ (eh),
    mask_ (mask)
{
}

ACE_Notification_Strategy::~ACE_Notification_Strategy (void)
{
}

ACE_Event_Handler *
ACE_Notification_Strategy::event_handler (void)
{
  return eh_;
}

void 
ACE_Notification_Strategy::event_handler (ACE_Event_Handler *eh)
{
  this->eh_ = eh;
}

ACE_Reactor_Mask 
ACE_Notification_Strategy::mask (void)
{
  return mask_;
}

void 
ACE_Notification_Strategy::mask (ACE_Reactor_Mask m)
{
  this->mask_ = m;
}

ACE_Reactor_Notification_Strategy::ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor,
								      ACE_Event_Handler *eh,
								      ACE_Reactor_Mask mask)
  : ACE_Notification_Strategy (eh, mask),
    reactor_ (reactor)
{
}

int 
ACE_Reactor_Notification_Strategy::notify (void)
{
  return this->reactor_->notify (this->eh_, this->mask_);
}

int 
ACE_Reactor_Notification_Strategy::notify (ACE_Event_Handler *eh,
					   ACE_Reactor_Mask mask)
{
  return this->reactor_->notify (eh, mask);
}

ACE_Reactor *
ACE_Reactor_Notification_Strategy::reactor (void)
{
  return this->reactor_;
}

void 
ACE_Reactor_Notification_Strategy::reactor (ACE_Reactor *r)
{
  this->reactor_ = r;
}
  
ACE_ReactorEx_Notification_Strategy::ACE_ReactorEx_Notification_Strategy (ACE_ReactorEx *reactorEx,
									  ACE_Event_Handler *eh,
									  ACE_Reactor_Mask mask)
  : ACE_Notification_Strategy (eh, mask),
    reactorEx_ (reactorEx)
{
}

int 
ACE_ReactorEx_Notification_Strategy::notify (void)
{
  return this->reactorEx_->notify (this->eh_, this->mask_);
}

int 
ACE_ReactorEx_Notification_Strategy::notify (ACE_Event_Handler *eh,
					     ACE_Reactor_Mask mask)
{
  return this->reactorEx_->notify (eh, mask);
}

ACE_ReactorEx *
ACE_ReactorEx_Notification_Strategy::reactorEx (void)
{
  return this->reactorEx_;
}

void 
ACE_ReactorEx_Notification_Strategy::reactorEx (ACE_ReactorEx *r)
{
  this->reactorEx_ = r;
}
  
#endif /* ACE_STRATEGIES_C */