summaryrefslogtreecommitdiff
path: root/docs/man/man3/BoolSet.3
blob: 127f01c99e99257c2b386ee6f57a9a0116876863 (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
.TH "BoolSet" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
BoolSet \- BoolSet is a utility class designed to hold eight bools in a bitmask.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <base.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBBoolSet\fP ()"
.br
.RI "\fIThe default constructor initializes the BoolSet to all values unset. \fP"
.ti -1c
.RI "\fBBoolSet\fP (char bitmask)"
.br
.RI "\fIThis constructor copies the default bitmask from a char. \fP"
.ti -1c
.RI "void \fBSet\fP (int number)"
.br
.RI "\fIThe Set method sets one bool in the set. \fP"
.ti -1c
.RI "bool \fBGet\fP (int number)"
.br
.RI "\fIThe Get method returns the value of one bool in the set. \fP"
.ti -1c
.RI "void \fBUnset\fP (int number)"
.br
.RI "\fIThe Unset method unsets one value in the set. \fP"
.ti -1c
.RI "void \fBInvert\fP (int number)"
.br
.RI "\fIThe Unset method inverts (flips) one value in the set. \fP"
.ti -1c
.RI "bool \fBoperator==\fP (\fBBoolSet\fP other)"
.br
.RI "\fICompare two BoolSets. \fP"
.ti -1c
.RI "\fBBoolSet\fP \fBoperator|\fP (\fBBoolSet\fP other)"
.br
.RI "\fIOR two BoolSets together. \fP"
.ti -1c
.RI "\fBBoolSet\fP \fBoperator &\fP (\fBBoolSet\fP other)"
.br
.RI "\fIAND two BoolSets together. \fP"
.ti -1c
.RI "bool \fBoperator=\fP (\fBBoolSet\fP other)"
.br
.RI "\fIAssign one BoolSet to another. \fP"
.in -1c
.SS "Private Attributes"

.in +1c
.ti -1c
.RI "char \fBbits\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
BoolSet is a utility class designed to hold eight bools in a bitmask. 

Use \fBBoolSet::Set\fP and \fBBoolSet::Get\fP to set and get bools in the bitmask, and Unset and Invert for special operations upon them.
.PP
Definition at line 104 of file base.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "BoolSet::BoolSet ()"
.PP
The default constructor initializes the BoolSet to all values unset. 
.PP
.SS "BoolSet::BoolSet (char bitmask)"
.PP
This constructor copies the default bitmask from a char. 
.PP
.SH "Member Function Documentation"
.PP 
.SS "bool BoolSet::Get (int number)"
.PP
The Get method returns the value of one bool in the set. 
.PP
\fBParameters:\fP
.RS 4
\fInumber\fP The number of the item to retrieve. This must be between 0 and 7.
.RE
.PP
\fBReturns:\fP
.RS 4
True if the item is set, false if it is unset.
.RE
.PP

.SS "void BoolSet::Invert (int number)"
.PP
The Unset method inverts (flips) one value in the set. 
.PP
\fBParameters:\fP
.RS 4
\fInumber\fP The number of the item to invert. This must be between 0 and 7.
.RE
.PP

.SS "\fBBoolSet\fP BoolSet::operator & (\fBBoolSet\fP other)"
.PP
AND two BoolSets together. 
.PP
.SS "bool BoolSet::operator= (\fBBoolSet\fP other)"
.PP
Assign one BoolSet to another. 
.PP
.SS "bool BoolSet::operator== (\fBBoolSet\fP other)"
.PP
Compare two BoolSets. 
.PP
.SS "\fBBoolSet\fP BoolSet::operator| (\fBBoolSet\fP other)"
.PP
OR two BoolSets together. 
.PP
.SS "void BoolSet::Set (int number)"
.PP
The Set method sets one bool in the set. 
.PP
\fBParameters:\fP
.RS 4
\fInumber\fP The number of the item to set. This must be between 0 and 7.
.RE
.PP

.SS "void BoolSet::Unset (int number)"
.PP
The Unset method unsets one value in the set. 
.PP
\fBParameters:\fP
.RS 4
\fInumber\fP The number of the item to set. This must be between 0 and 7.
.RE
.PP

.SH "Member Data Documentation"
.PP 
.SS "char \fBBoolSet::bits\fP\fC [private]\fP"
.PP
Definition at line 106 of file base.h.

.SH "Author"
.PP 
Generated automatically by Doxygen for InspIRCd from the source code.