torque Torque Game Engine Documentation
TGE Version 1.5.2

TSIntegerSet Class Reference

#include <tsIntegerSet.h>


Detailed Description

The standard mathmatical set, where there are no duplicates.

However, this set uses bits instead of numbers.


Public Member Functions

void clear (S32 index)
 Sets this bit to false.
void set (S32 index)
 Set this bit to true.
bool test (S32 index) const
 Is this bit true?
void clearAll (S32 upto=MAX_TS_SET_SIZE)
 Sets all bits to false.
void setAll (S32 upto=MAX_TS_SET_SIZE)
 Sets all bits to true.
bool testAll (S32 upto=MAX_TS_SET_SIZE) const
 Tests all bits for true.
void intersect (const TSIntegerSet &)
 intersection (a & b)
void overlap (const TSIntegerSet &)
 union (a | b)
void difference (const TSIntegerSet &)
 xor (a | b) & ( !(a & b) )
void takeAway (const TSIntegerSet &)
 subtraction (a - b)
void copy (const TSIntegerSet &)
 copy one integer set into another
void operator= (const TSIntegerSet &otherSet)
S32 start () const
S32 end () const
void next (S32 &i) const
void read (Stream *)
void write (Stream *)
 TSIntegerSet ()
 TSIntegerSet (const TSIntegerSet &)

Private Attributes

U32 bits [MAX_TS_SET_DWORDS]
 The bits!


Constructor & Destructor Documentation

TSIntegerSet::TSIntegerSet (  ) 

TSIntegerSet::TSIntegerSet ( const TSIntegerSet  ) 


Member Function Documentation

void TSIntegerSet::clear ( S32  index  )  [inline]

Sets this bit to false.

void TSIntegerSet::set ( S32  index  )  [inline]

Set this bit to true.

bool TSIntegerSet::test ( S32  index  )  const [inline]

Is this bit true?

void TSIntegerSet::clearAll ( S32  upto = MAX_TS_SET_SIZE  ) 

Sets all bits to false.

void TSIntegerSet::setAll ( S32  upto = MAX_TS_SET_SIZE  ) 

Sets all bits to true.

bool TSIntegerSet::testAll ( S32  upto = MAX_TS_SET_SIZE  )  const

Tests all bits for true.

void TSIntegerSet::intersect ( const TSIntegerSet  ) 

intersection (a & b)

void TSIntegerSet::overlap ( const TSIntegerSet  ) 

union (a | b)

void TSIntegerSet::difference ( const TSIntegerSet  ) 

xor (a | b) & ( !(a & b) )

void TSIntegerSet::takeAway ( const TSIntegerSet  ) 

subtraction (a - b)

void TSIntegerSet::copy ( const TSIntegerSet  ) 

copy one integer set into another

void TSIntegerSet::operator= ( const TSIntegerSet otherSet  )  [inline]

S32 TSIntegerSet::start (  )  const

S32 TSIntegerSet::end (  )  const

void TSIntegerSet::next ( S32 i  )  const

void TSIntegerSet::read ( Stream  ) 

void TSIntegerSet::write ( Stream  ) 


Field Documentation

U32 TSIntegerSet::bits[MAX_TS_SET_DWORDS] [private]

The bits!




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