summaryrefslogtreecommitdiff
path: root/ace/Event_Handler_T.i
blob: 4f2dc0374aeb22f2ea87764365ef8e181fcac85b (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/* -*- C++ -*- */
// $Id$

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::op_handler (T *op)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::op_handler");
  this->op_handler_ = op;
}

template<class T> ACE_INLINE T *
ACE_Event_Handler_T<T>::op_handler (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::op_handler");
  return this->op_handler_;
}

template<class T> ACE_INLINE ACE_HANDLE
ACE_Event_Handler_T<T>::get_handle (void) const
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::get_handle");
  return this->get_handle_ == 0 ? -1 : (this->op_handler_->*get_handle_) ();
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::set_handle (ACE_HANDLE h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::set_handle");
  if (this->set_handle_ != 0)
    (this->op_handler_->*set_handle_) (h);
}

template<class T> ACE_INLINE int
ACE_Event_Handler_T<T>::handle_input (ACE_HANDLE fd)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_input");
  return this->input_handler_ == 0 ? 0 : (this->op_handler_->*input_handler_) (fd);
}

template<class T> ACE_INLINE int
ACE_Event_Handler_T<T>::handle_output (ACE_HANDLE fd)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_output");
  return this->output_handler_ == 0 ? 0 : (this->op_handler_->*output_handler_) (fd);
}

template<class T> ACE_INLINE int
ACE_Event_Handler_T<T>::handle_exception (ACE_HANDLE fd)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_exception");
  return this->except_handler_ == 0 ? 0 : (this->op_handler_->*except_handler_) (fd);
}

template<class T> ACE_INLINE int
ACE_Event_Handler_T<T>::handle_timeout (const ACE_Time_Value &tv, const void *arg)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_timeout");
  return this->to_handler_ == 0 ? 0 : (this->op_handler_->*to_handler_) (tv, arg);
}

template<class T> ACE_INLINE int
ACE_Event_Handler_T<T>::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_close");
  return this->cl_handler_ == 0 ? 0 : (this->op_handler_->*cl_handler_) (fd, close_mask);
}

template<class T> ACE_INLINE int
ACE_Event_Handler_T<T>::handle_signal (ACE_HANDLE signum, siginfo_t *s, ucontext_t *u)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_signal");
  return this->sig_handler_ == 0 ? 0 : (this->op_handler_->*sig_handler_) (signum, s, u);
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::GET_HANDLE
ACE_Event_Handler_T<T>::handle_get (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_get");
  return this->get_handle_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::handle_get (ACE_TYPENAME ACE_Event_Handler_T<T>::GET_HANDLE h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_get");
  this->get_handle_ = h;
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::SET_HANDLE
ACE_Event_Handler_T<T>::handle_set (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_set");
  return this->set_handle_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::handle_set (ACE_TYPENAME ACE_Event_Handler_T<T>::SET_HANDLE h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::handle_set");
  this->set_handle_ = h;
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER
ACE_Event_Handler_T<T>::input_handler (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::input_handler");
  return this->input_handler_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::input_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::input_handler");
  this->input_handler_ = h;
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER
ACE_Event_Handler_T<T>::output_handler (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::output_handler");
  return this->output_handler_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::output_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::output_handler");
  this->output_handler_ = h;
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER
ACE_Event_Handler_T<T>::except_handler (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::except_handler");
  return this->except_handler_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::except_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::except_handler");
  this->except_handler_ = h;
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::TO_HANDLER
ACE_Event_Handler_T<T>::to_handler (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::to_handler");
  return this->to_handler_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::to_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::TO_HANDLER h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::to_handler");
  this->to_handler_ = h;
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::CL_HANDLER
ACE_Event_Handler_T<T>::cl_handler (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::cl_handler");
  return this->cl_handler_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::cl_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::CL_HANDLER h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::cl_handler");
  this->cl_handler_ = h;
}

template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::SIG_HANDLER
ACE_Event_Handler_T<T>::sig_handler (void)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::sig_handler");
  return this->sig_handler_;
}

template<class T> ACE_INLINE void
ACE_Event_Handler_T<T>::sig_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::SIG_HANDLER h)
{
  ACE_TRACE ("ACE_Event_Handler_T<T>::sig_handler");
  this->sig_handler_ = h;
}