|
Torque2D Reference
|
#include <bitSet.h>
Public Member Functions | |
| BitSet32 () | |
| BitSet32 (const BitSet32 &in_rCopy) | |
| BitSet32 (const U32 in_mask) | |
| operator U32 () const | |
| U32 | getMask () const |
| void | set () |
| Set all bits to true. | |
| void | set (const U32 m) |
| Set the specified bit(s) to true. | |
| void | set (BitSet32 s, bool b) |
| void | clear () |
| Clear all bits. | |
| void | clear (const U32 m) |
| Clear the specified bit(s). | |
| void | toggle (const U32 m) |
| Toggle the specified bit(s). | |
| bool | test (const U32 m) const |
| Are any of the specified bit(s) set? | |
| bool | testStrict (const U32 m) const |
| Are ALL the specified bit(s) set? | |
Operator Overloads | |
| BitSet32 & | operator= (const U32 m) |
| BitSet32 & | operator|= (const U32 m) |
| BitSet32 & | operator&= (const U32 m) |
| BitSet32 & | operator^= (const U32 m) |
| BitSet32 | operator| (const U32 m) const |
| BitSet32 | operator& (const U32 m) const |
| BitSet32 | operator^ (const U32 m) const |
A convenience class to manipulate a set of bits.
Notice that bits are accessed directly, ie, by passing a variable with the relevant bit set or not, instead of passing the index of the relevant bit.
|
inline |
|
inline |
|
inline |
Clear all bits.
|
inline |
Clear the specified bit(s).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set all bits to true.
|
inline |
Masked-set the bitset; ie, using s as the mask and then setting the masked bits to b.
|
inline |
Set the specified bit(s) to true.
|
inline |
Are any of the specified bit(s) set?
|
inline |
Are ALL the specified bit(s) set?
|
inline |
Toggle the specified bit(s).