|
L4Re - L4 Runtime Environment
|
Basic bitmap abstraction. More...
Inheritance diagram for cxx::Bitmap_base:
Collaboration diagram for cxx::Bitmap_base:Data Structures | |
| class | Bit |
| A writeable bit in a bitmap. More... | |
| class | Char |
| Helper abstraction for a byte contained in the bitmap. More... | |
| class | Word |
| Helper abstraction for a word contained in the bitmap. More... | |
Public Member Functions | |
| 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... | |
Static Public Member Functions | |
| 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 | |
| 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 | |
| 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 | |
| word_type * | _bits |
| Pointer to the buffer storing the bits. | |
Basic bitmap abstraction.
This abstraction keeps a pointer to a memory area that is used as bitmap.
|
protected |
|
inline | ||||||||||||||||||||
Set the value of bit bit to on.
| bit | the number of the bit |
| on | the boolean value that shall be assigned to the bit. |
Definition at line 211 of file bitmap.
References bit_index(), and word_index().
Referenced by operator[]().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline | ||||||||||||||
Get the truth value of a bit.
| bit | the number of the bit to read. |
Definition at line 238 of file bitmap.
References bit_index(), and word_index().
Here is the call graph for this function:
|
inlinestaticprotected |
Get the bit index within word_type for the given bit.
| bit | the bit index in the bitmap. |
Definition at line 61 of file bitmap.
References W_bits.
Referenced by bit(), clear_bit(), and set_bit().
Here is the caller graph for this function:
|
inlinestatic | ||||||||||||||
|
inline | ||||||||||||||
Clear bit bit.
| bit | the number of the bit to clear. |
Definition at line 220 of file bitmap.
References bit_index(), and word_index().
Here is the call graph for this function:
|
inline | ||||||||||||||
|
inline | ||||||||||||||
Get the lvalue for the bit at index bit.
| bit | the number. |
Definition at line 151 of file bitmap.
References _bits, and scan_zero().
Here is the call graph for this function:
|
inline | ||||||||||||||||||||
Scan for the first zero bit.
| max_bit | Upper bound (exclusive) for the scanning operation. |
| start_bit | Hint 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. |
| >= | 0 Number of first zero bit found. |
| -1 | All bits between start_bit and max_bit are set. |
Definition at line 259 of file bitmap.
References W_bits, and word_index().
Referenced by cxx::Bitmap< BITS >::Bitmap(), operator[](), and cxx::Bitmap< BITS >::scan_zero().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline | ||||||||||||||
Set bit bit.
| bit | the number of the bit to set, |
Definition at line 229 of file bitmap.
References bit_index(), and word_index().
Here is the call graph for this function:
|
inlinestaticprotected |
Get the word index for the given bit.
| bit | the index of the bit in question. |
Definition at line 54 of file bitmap.
References W_bits.
Referenced by bit(), clear_bit(), scan_zero(), and set_bit().
Here is the caller graph for this function:
|
inlinestatic | ||||||||||||||