Public Member Functions

nanojit::BitSet Class Reference

simple linear bit array, memory taken from Allocator warning: when bit array grows, old memory is wasted since it was allocated from Allocator. More...

#include <Containers.h>

Collaboration diagram for nanojit::BitSet:

List of all members.

Public Member Functions

 BitSet (Allocator &allocator, int nbits=128)
void reset ()
 clear all bits
bool setFrom (BitSet &other)
 perform a bitwise or with BitSet other, return true if this bitset was modified
bool get (int i)
 return bit i as a bool
void set (int i)
 set bit i
void clear (int i)
 clear bit i

Detailed Description

simple linear bit array, memory taken from Allocator warning: when bit array grows, old memory is wasted since it was allocated from Allocator.

pre-size the bitmap when possible by passing nbits to the constructor.


Constructor & Destructor Documentation

nanojit::BitSet::BitSet ( Allocator allocator,
int  nbits = 128 
)

Member Function Documentation

void nanojit::BitSet::clear ( int  i  )  [inline]

clear bit i

bool nanojit::BitSet::get ( int  i  )  [inline]

return bit i as a bool

void nanojit::BitSet::reset (  ) 

clear all bits

void nanojit::BitSet::set ( int  i  )  [inline]

set bit i

bool nanojit::BitSet::setFrom ( BitSet other  ) 

perform a bitwise or with BitSet other, return true if this bitset was modified


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