Torque2D Reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BitSet32 Class 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
BitSet32operator= (const U32 m)
 
BitSet32operator|= (const U32 m)
 
BitSet32operator&= (const U32 m)
 
BitSet32operator^= (const U32 m)
 
BitSet32 operator| (const U32 m) const
 
BitSet32 operator& (const U32 m) const
 
BitSet32 operator^ (const U32 m) const
 

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.

Constructor & Destructor Documentation

◆ BitSet32() [1/3]

BitSet32 ( )
inline

◆ BitSet32() [2/3]

BitSet32 ( const BitSet32 in_rCopy)
inline

◆ BitSet32() [3/3]

BitSet32 ( const U32  in_mask)
inline

Member Function Documentation

◆ clear() [1/2]

void clear ( )
inline

Clear all bits.

◆ clear() [2/2]

void clear ( const U32  m)
inline

Clear the specified bit(s).

◆ getMask()

U32 getMask ( ) const
inline

◆ operator U32()

operator U32 ( ) const
inline

◆ operator&()

BitSet32 operator& ( const U32  m) const
inline

◆ operator&=()

BitSet32 & operator&= ( const U32  m)
inline

◆ operator=()

BitSet32 & operator= ( const U32  m)
inline

◆ operator^()

BitSet32 operator^ ( const U32  m) const
inline

◆ operator^=()

BitSet32 & operator^= ( const U32  m)
inline

◆ operator|()

BitSet32 operator| ( const U32  m) const
inline

◆ operator|=()

BitSet32 & operator|= ( const U32  m)
inline

◆ set() [1/3]

void set ( )
inline

Set all bits to true.

◆ set() [2/3]

void set ( BitSet32  s,
bool  b 
)
inline

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

◆ set() [3/3]

void set ( const U32  m)
inline

Set the specified bit(s) to true.

◆ test()

bool test ( const U32  m) const
inline

Are any of the specified bit(s) set?

◆ testStrict()

bool testStrict ( const U32  m) const
inline

Are ALL the specified bit(s) set?

◆ toggle()

void toggle ( const U32  m)
inline

Toggle the specified bit(s).


The documentation for this class was generated from the following file: