torque Torque Game Engine Documentation
TGE Version 1.5.2

BitSet32 Class Reference

#include <bitSet.h>


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.


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)
 Masked-set the bitset; ie, using s as the mask and then setting the masked bits to 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

Private Attributes

U32 mbits
 Internal representation of bitset.


Constructor & Destructor Documentation

BitSet32::BitSet32 (  )  [inline]

BitSet32::BitSet32 ( const BitSet32 in_rCopy  )  [inline]

BitSet32::BitSet32 ( const U32  in_mask  )  [inline]


Member Function Documentation

BitSet32::operator U32 (  )  const [inline]

U32 BitSet32::getMask (  )  const [inline]

void BitSet32::set (  )  [inline]

Set all bits to true.

void BitSet32::set ( const U32  m  )  [inline]

Set the specified bit(s) to true.

void BitSet32::set ( BitSet32  s,
bool  b 
) [inline]

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

void BitSet32::clear (  )  [inline]

Clear all bits.

void BitSet32::clear ( const U32  m  )  [inline]

Clear the specified bit(s).

void BitSet32::toggle ( const U32  m  )  [inline]

Toggle the specified bit(s).

bool BitSet32::test ( const U32  m  )  const [inline]

Are any of the specified bit(s) set?

bool BitSet32::testStrict ( const U32  m  )  const [inline]

Are ALL the specified bit(s) set?

BitSet32& BitSet32::operator= ( const U32  m  )  [inline]

BitSet32& BitSet32::operator|= ( const U32  m  )  [inline]

BitSet32& BitSet32::operator &= ( const U32  m  )  [inline]

BitSet32& BitSet32::operator^= ( const U32  m  )  [inline]

BitSet32 BitSet32::operator| ( const U32  m  )  const [inline]

BitSet32 BitSet32::operator & ( const U32  m  )  const [inline]

BitSet32 BitSet32::operator^ ( const U32  m  )  const [inline]


Field Documentation

U32 BitSet32::mbits [private]

Internal representation of bitset.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen