BitSet32

Engine/source/core/bitSet.h

A convenience class to manipulate a set of bits.

More...

Private Attributes

Internal representation of bitset.

Public Functions

BitSet32(const BitSet32 & in_rCopy)
BitSet32(const U32 in_mask)

Clear all bits.

Clear the specified bit(s).

set()

Set all bits to true.

set(BitSet32 s, bool b)

Masked-set the bitset; ie, using s as the mask and then setting the masked bits to b.

Set the specified bit(s) to true.

bool

Are any of the specified bit(s) set?

bool

Are ALL the specified bit(s) set?

Toggle the specified bit(s).

Detailed Description

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.

Operator Overloads

operator=(const U32 m)

operator|=(const U32 m)

operator&=(const U32 m)

operator^=(const U32 m)

operator|(const U32 m)

operator&(const U32 m)

operator^(const U32 m)

Private Attributes

U32 mbits 

Internal representation of bitset.

Public Functions

BitSet32()

BitSet32(const BitSet32 & in_rCopy)

BitSet32(const U32 in_mask)

clear()

Clear all bits.

clear(const U32 m)

Clear the specified bit(s).

getMask()

operator U32()

set()

Set all bits to true.

set(BitSet32 s, bool b)

Masked-set the bitset; ie, using s as the mask and then setting the masked bits to b.

set(const U32 m)

Set the specified bit(s) to true.

test(const U32 m)

Are any of the specified bit(s) set?

testStrict(const U32 m)

Are ALL the specified bit(s) set?

toggle(const U32 m)

Toggle the specified bit(s).