File: ACE_Handle_Set.3

package info (click to toggle)
ace 5.2.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 26,856 kB
  • ctags: 18,677
  • sloc: cpp: 171,831; makefile: 48,840; sh: 10,192; perl: 8,582; exp: 787; yacc: 387; lex: 140; csh: 20
file content (239 lines) | stat: -rw-r--r-- 6,349 bytes parent folder | download
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
.TH ACE_Handle_Set 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Handle_Set \- C++ wrapper facade for the socket <fd_set> abstraction. 
.SH SYNOPSIS
.br
.PP
\fC#include <Handle_Set.h>\fR
.PP
.SS Public Types

.in +1c
.ti -1c
.RI "enum { \fBMAXSIZE\fR = ACE_DEFAULT_SELECT_REACTOR_SIZE }"
.br
.in -1c
.SS Public Methods

.in +1c
.ti -1c
.RI "\fBACE_Handle_Set\fR (void)"
.br
.RI "\fIConstructor, initializes the bitmask to all 0s.\fR"
.ti -1c
.RI "\fBACE_Handle_Set\fR (const \fBACE_FD_SET_TYPE\fR &mask)"
.br
.ti -1c
.RI "void \fBreset\fR (void)"
.br
.RI "\fIInitialize the bitmask to all 0s and reset the associated fields.\fR"
.ti -1c
.RI "int \fBis_set\fR (ACE_HANDLE handle) const"
.br
.ti -1c
.RI "void \fBset_bit\fR (ACE_HANDLE handle)"
.br
.RI "\fIEnables the <handle>. No range checking is performed so <handle> must be less than .\fR"
.ti -1c
.RI "void \fBclr_bit\fR (ACE_HANDLE handle)"
.br
.RI "\fIDisables the <handle>. No range checking is performed so <handle> must be less than .\fR"
.ti -1c
.RI "int \fBnum_set\fR (void) const"
.br
.RI "\fIReturns a count of the number of enabled bits.\fR"
.ti -1c
.RI "ACE_HANDLE \fBmax_set\fR (void) const"
.br
.RI "\fIReturns the number of the large bit.\fR"
.ti -1c
.RI "void \fBsync\fR (ACE_HANDLE max)"
.br
.ti -1c
.RI "\fBoperator fd_set *\fR ()"
.br
.RI "\fIReturns a pointer to the underlying <fd_set>. Returns 0 if there are no handle bits set (<size_> == 0).\fR"
.ti -1c
.RI "fd_set* \fBfdset\fR (void)"
.br
.RI "\fIReturns a pointer to the underlying <fd_set>. Returns 0 if there are no handle bits set (<size_> == 0).\fR"
.ti -1c
.RI "void \fBdump\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.in -1c
.SS Public Attributes

.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SS Private Types

.in +1c
.ti -1c
.RI "enum { \fBWORDSIZE\fR = NFDBITS, \fBNBITS\fR = 256 }"
.br
.in -1c
.SS Private Methods

.in +1c
.ti -1c
.RI "void \fBset_max\fR (ACE_HANDLE max)"
.br
.RI "\fIResets the <max_handle_> after a clear of the original <max_handle_>.\fR"
.in -1c
.SS Private Attributes

.in +1c
.ti -1c
.RI "int \fBsize_\fR"
.br
.RI "\fISize of the set, i.e., a count of the number of enabled bits.\fR"
.ti -1c
.RI "ACE_HANDLE \fBmax_handle_\fR"
.br
.RI "\fICurrent max handle.\fR"
.ti -1c
.RI "fd_set \fBmask_\fR"
.br
.RI "\fIBitmask.\fR"
.in -1c
.SS Static Private Methods

.in +1c
.ti -1c
.RI "int \fBcount_bits\fR (u_long n)"
.br
.RI "\fICounts the number of bits enabled in N. Uses a table lookup to speed up the count.\fR"
.in -1c
.SS Static Private Attributes

.in +1c
.ti -1c
.RI "const char \fBnbits_\fR [NBITS]"
.br
.RI "\fITable that maps bytes to counts of the enabled bits in each value from 0 to 255.\fR"
.in -1c
.SS Friends

.in +1c
.ti -1c
.RI "class \fBACE_Handle_Set_Iterator\fR"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP 
C++ wrapper facade for the socket <fd_set> abstraction.
.PP
.PP
 This abstraction is a very efficient wrapper facade over <fd_set>. In particular, no range checking is performed, so it's important not to set or clear bits that are outside the . 
.PP
.SH MEMBER ENUMERATION DOCUMENTATION
.PP 
.SS anonymous enum
.PP
\fBEnumeration values:\fR
.in +1c
.TP
\fB\fIMAXSIZE\fR \fR
.SS anonymous enum\fC [private]\fR
.PP
\fBEnumeration values:\fR
.in +1c
.TP
\fB\fIWORDSIZE\fR \fR
.TP
\fB\fINBITS\fR \fR
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS ACE_Handle_Set::ACE_Handle_Set (void)
.PP
Constructor, initializes the bitmask to all 0s.
.PP
.SS ACE_Handle_Set::ACE_Handle_Set (const \fBACE_FD_SET_TYPE\fR & mask)
.PP
Constructor, initializes the handle set from a given mask.  is a <typedef> based on the platform's native type used for masks passed to <select>. 
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS void ACE_Handle_Set::clr_bit (ACE_HANDLE handle)
.PP
Disables the <handle>. No range checking is performed so <handle> must be less than .
.PP
.SS int ACE_Handle_Set::count_bits (u_long n)\fC [static, private]\fR
.PP
Counts the number of bits enabled in N. Uses a table lookup to speed up the count.
.PP
.SS void ACE_Handle_Set::dump (void) const
.PP
Dump the state of an object.
.PP
.SS fd_set * ACE_Handle_Set::fdset (void)
.PP
Returns a pointer to the underlying <fd_set>. Returns 0 if there are no handle bits set (<size_> == 0).
.PP
.SS int ACE_Handle_Set::is_set (ACE_HANDLE handle) const
.PP
Checks whether <handle> is enabled. No range checking is performed so <handle> must be less than . 
.SS ACE_HANDLE ACE_Handle_Set::max_set (void) const
.PP
Returns the number of the large bit.
.PP
.SS int ACE_Handle_Set::num_set (void) const
.PP
Returns a count of the number of enabled bits.
.PP
.SS ACE_Handle_Set::operator fd_set * ()
.PP
Returns a pointer to the underlying <fd_set>. Returns 0 if there are no handle bits set (<size_> == 0).
.PP
.SS void ACE_Handle_Set::reset (void)
.PP
Initialize the bitmask to all 0s and reset the associated fields.
.PP
.SS void ACE_Handle_Set::set_bit (ACE_HANDLE handle)
.PP
Enables the <handle>. No range checking is performed so <handle> must be less than .
.PP
.SS void ACE_Handle_Set::set_max (ACE_HANDLE max)\fC [private]\fR
.PP
Resets the <max_handle_> after a clear of the original <max_handle_>.
.PP
.SS void ACE_Handle_Set::sync (ACE_HANDLE max)
.PP
Rescan the underlying <fd_set> up to handle <max> to find the new <max_handle> (highest bit set) and <size> (how many bits set) values. This is useful for evaluating the changes after the handle set has been manipulated in some way other than member functions; for example, after <select> modifies the <fd_set>. 
.SH FRIENDS AND RELATED FUNCTION DOCUMENTATION
.PP 
.SS class ACE_Handle_Set_Iterator\fC [friend]\fR
.PP
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS ACE_Handle_Set::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
.SS fd_set ACE_Handle_Set::mask_\fC [private]\fR
.PP
Bitmask.
.PP
.SS ACE_HANDLE ACE_Handle_Set::max_handle_\fC [private]\fR
.PP
Current max handle.
.PP
.SS const char ACE_Handle_Set::nbits_[NBITS]\fC [static, private]\fR
.PP
Table that maps bytes to counts of the enabled bits in each value from 0 to 255.
.PP
.SS int ACE_Handle_Set::size_\fC [private]\fR
.PP
Size of the set, i.e., a count of the number of enabled bits.
.PP


.SH AUTHOR
.PP 
Generated automatically by Doxygen for ACE from the source code.