Bitmap Class Reference

#include <network.h>


Public Member Functions

 Bitmap (unsigned int)
 ~Bitmap ()
int isclear ()
void set (unsigned int)
void reset (unsigned int)
int lsb ()
int msb ()
void print ()

Static Public Member Functions

static int lsb (unsigned int *, unsigned int)
static int msb (unsigned int *, unsigned int)
static int lsb (unsigned int)
static int msb (unsigned int)

Data Fields

unsigned int * bitmap
unsigned int nbits
int words

Static Public Attributes

static const unsigned int NOT_FOUND = -1u


Constructor & Destructor Documentation

Bitmap::Bitmap ( unsigned int  words  ) 

Bitmap constructor /param words the bitmap size (words * 32 bit)

Bitmap::~Bitmap (  ) 

Bitmap destructor


Member Function Documentation

int Bitmap::isclear (  ) 

check whether all bits are zero

Returns:
0: 1:

void Bitmap::set ( unsigned int  n  ) 

set the n th bit

void Bitmap::reset ( unsigned int  n  ) 

reset the n th bit

int Bitmap::lsb (  ) 

find LSB from bit map (unsigned int [])

Returns:
LSB

int Bitmap::msb (  ) 

find MSB from bit map (unsigned int [])

Returns:
MSB

int Bitmap::lsb ( unsigned int *  bitmap,
unsigned int  words 
) [static]

find LSB from bit map

Parameters:
bitmap the target bit map
words the size (word) of the bitmap
Returns:
LSB

int Bitmap::msb ( unsigned int *  bitmap,
unsigned int  words 
) [static]

find MSB from bit map

Parameters:
bitmap the target bit map
words the size (word) of the bitmap
Returns:
MSB

int Bitmap::lsb ( unsigned int  x  )  [static]

find LSB from a word

Parameters:
x the target word
Returns:
LSB

int Bitmap::msb ( unsigned int  x  )  [static]

find MSB from a word

Parameters:
x the target word
Returns:
MSB

void Bitmap::print (  ) 

print bitmap


Field Documentation

const unsigned int Bitmap::NOT_FOUND = -1u [static]

unsigned int* Bitmap::bitmap

unsigned int Bitmap::nbits


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

Generated on Mon Mar 29 19:17:57 2010 for SimMc by  doxygen 1.5.6