|
|||
|
|||
|
#include <base.h>
Inheritance diagram for BoolSet:


Public Member Functions | |
| BoolSet () | |
| The default constructor initializes the BoolSet to all values unset. | |
| BoolSet (char bitmask) | |
| This constructor copies the default bitmask from a char. | |
| void | Set (int number) |
| The Set method sets one bool in the set. | |
| bool | Get (int number) |
| The Get method returns the value of one bool in the set. | |
| void | Unset (int number) |
| The Unset method unsets one value in the set. | |
| void | Invert (int number) |
| The Unset method inverts (flips) one value in the set. | |
| bool | operator== (BoolSet other) |
| Compare two BoolSets. | |
| BoolSet | operator| (BoolSet other) |
| OR two BoolSets together. | |
| BoolSet | operator & (BoolSet other) |
| AND two BoolSets together. | |
| bool | operator= (BoolSet other) |
| Assign one BoolSet to another. | |
Private Attributes | |
| char | bits |
| Actual bit values. | |
Use BoolSet::Set and BoolSet::Get to set and get bools in the bitmask, and Unset and Invert for special operations upon them.
Definition at line 168 of file base.h.
|
|
The default constructor initializes the BoolSet to all values unset.
Definition at line 81 of file base.cpp. References bits. 00082 { 00083 this->bits = 0; 00084 }
|
|
|
This constructor copies the default bitmask from a char.
Definition at line 86 of file base.cpp. References bits. 00087 { 00088 this->bits = bitmask; 00089 }
|
|
|
The Get method returns the value of one bool in the set.
Definition at line 59 of file base.cpp. References bitfields. 00060 { 00061 return ((this->bits | bitfields[number]) > 0); 00062 }
|
|
|
The Unset method inverts (flips) one value in the set.
Definition at line 54 of file base.cpp. References bitfields, and bits.
|
|
|
AND two BoolSets together.
Definition at line 75 of file base.cpp. References bits.
|
|
|
Assign one BoolSet to another.
Definition at line 91 of file base.cpp. References bits.
|
|
|
Compare two BoolSets.
Definition at line 64 of file base.cpp. References bits. 00065 { 00066 return (this->bits == other.bits); 00067 }
|
|
|
OR two BoolSets together.
Definition at line 69 of file base.cpp. References bits.
|
|
|
The Set method sets one bool in the set.
Definition at line 44 of file base.cpp. References bitfields, and bits.
|
|
|
The Unset method unsets one value in the set.
Definition at line 49 of file base.cpp. References bits, and inverted_bitfields. 00050 { 00051 this->bits &= inverted_bitfields[number]; 00052 }
|
|
|
Actual bit values.
Definition at line 171 of file base.h. Referenced by BoolSet(), Invert(), operator &(), operator=(), operator==(), operator|(), Set(), and Unset(). |