L4Re - L4 Runtime Environment
cxx::Bitmap< BITS > Class Template Reference

A static bit map. More...

+ Inheritance diagram for cxx::Bitmap< BITS >:
+ Collaboration diagram for cxx::Bitmap< BITS >:

Public Member Functions

 Bitmap () throw ()
 Create a bitmap with BITS bits. More...
 
long scan_zero (long start_bit=0) const throw ()
 Scan for the first zero bit. More...
 
- Public Member Functions inherited from cxx::Bitmap_base
void bit (long bit, bool on) throw ()
 Set the value of bit bit to on. More...
 
void clear_bit (long bit) throw ()
 Clear bit bit. More...
 
void set_bit (long bit) throw ()
 Set bit bit. More...
 
word_type bit (long bit) const throw ()
 Get the truth value of a bit. More...
 
word_type operator[] (long bit) const throw ()
 Get the bit at index bit. More...
 
Bit operator[] (long bit) throw ()
 Get the lvalue for the bit at index bit. More...
 
long scan_zero (long max_bit, long start_bit=0) const throw ()
 Scan for the first zero bit. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cxx::Bitmap_base
static long words (long bits) throw ()
 Get the number of Words that are used for the bitmap. More...
 
static long chars (long bits) throw ()
 Get the number of chars that are used for the bitmap. More...
 
- Protected Types inherited from cxx::Bitmap_base
enum  { W_bits = sizeof(word_type) * 8, C_bits = 8 }
 
typedef unsigned long word_type
 Data type for each element of the bit buffer.
 
- Static Protected Member Functions inherited from cxx::Bitmap_base
static unsigned word_index (unsigned bit)
 Get the word index for the given bit. More...
 
static unsigned bit_index (unsigned bit)
 Get the bit index within word_type for the given bit. More...
 
- Protected Attributes inherited from cxx::Bitmap_base
word_type_bits
 Pointer to the buffer storing the bits.
 

Detailed Description

template<int BITS>
class cxx::Bitmap< BITS >

A static bit map.

Parameters
BITSthe number of bits that shall be in the bitmap.

Definition at line 180 of file bitmap.

Constructor & Destructor Documentation

◆ Bitmap()

template<int BITS>
cxx::Bitmap< BITS >::Bitmap ( )
throw (
)
inline

Create a bitmap with BITS bits.

Definition at line 187 of file bitmap.

Member Function Documentation

◆ scan_zero()

template<int BITS>
long cxx::Bitmap< BITS >::scan_zero ( long  start_bit = 0) const
throw (
)
inline

Scan for the first zero bit.

Parameters
start_bitHint at the number of the first bit to look at. Zero bits below start_bit may or may not be taken into account by the implementation.
Return values
>=0 Number of first zero bit found.
-1All bits at start_bit or higher are set.

Compared to Bitmap_base::scan_zero(), the upper bound is set to BITS.

Definition at line 285 of file bitmap.


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