Torque2D Reference
Loading...
Searching...
No Matches
BitVector Class Reference

Manage a vector of bits of arbitrary size. More...

#include <bitVector.h>

Public Member Functions

 BitVector ()
 BitVector (const U32 _size)
 ~BitVector ()
bool copy (const BitVector &from)
Size Management
void setSize (const U32 _size)
U32 getSize () const
U32 getByteSize () const
U32 getAllocatedByteSize () const
const U8 * getBits () const
U8 * getNCBits ()
Mutators

Note that bits are specified by index, unlike BitSet32.

void clear ()
 Clear all the bits.
void set ()
 Set all the bits.
void set (U32 bit)
 Set the specified bit.
void clear (U32 bit)
 Clear the specified bit.
bool test (U32 bit) const
 Test that the specified bit is set.

Detailed Description

Manage a vector of bits of arbitrary size.

Constructor & Destructor Documentation

◆ BitVector() [1/2]

BitVector ( )
inline

◆ BitVector() [2/2]

BitVector ( const U32 _size)
inline

◆ ~BitVector()

~BitVector ( )
inline

Member Function Documentation

◆ clear() [1/2]

void clear ( )
inline

Clear all the bits.

◆ clear() [2/2]

void clear ( U32 bit)
inline

Clear the specified bit.

◆ copy()

bool copy ( const BitVector & from)
inline

◆ getAllocatedByteSize()

U32 getAllocatedByteSize ( ) const
inline

◆ getBits()

const U8 * getBits ( ) const
inline

◆ getByteSize()

U32 getByteSize ( ) const
inline

◆ getNCBits()

U8 * getNCBits ( )
inline

◆ getSize()

U32 getSize ( ) const
inline

◆ set() [1/2]

void set ( )
inline

Set all the bits.

◆ set() [2/2]

void set ( U32 bit)
inline

Set the specified bit.

◆ setSize()

void setSize ( const U32 _size)
inline

◆ test()

bool test ( U32 bit) const
inline

Test that the specified bit is set.


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