, .Reasons for reinventing this type of class:
More...
#include <Bitset.h>
|
void | grow (size_t minimum) |
| Grow so that size is at least minimum. More...
|
|
void | set (size_t bit) |
| Set bit to 1. More...
|
|
void | clear (size_t bit) |
| Clear bit, i.e. More...
|
|
void | set (size_t bit, bool value) |
| Set bit to 0 or 1. More...
|
|
bool | test (size_t bit) const |
| Check individual bit. More...
|
|
bool | empty () const |
| Whole bitset empty?
|
|
bool | any () const |
| Any bit set?
|
|
size_t | count () const |
| Number of bits set.
|
|
size_t | capacity () const |
| Number of bits in Bitset.
|
|
std::string | to_string () const |
| Return 001000.... type of string.
|
|
, .
Reasons for reinventing this type of class:
- The STL version was not part of the Sept 1999 egcs compiler.
- This BitSet grows during runtime, size is not locked at compiletime.
void BitSet::clear |
( |
size_t |
bit | ) |
|
Clear bit, i.e.
set to 0.
- Exceptions
-
void BitSet::grow |
( |
size_t |
minimum | ) |
|
Grow so that size is at least minimum.
All the following set/clear/test operations only work with bits 0...minimum, so you need to grow the BitSet to the required size before accessing any bits in there!
- Exceptions
-
void BitSet::set |
( |
size_t |
bit | ) |
|
void BitSet::set |
( |
size_t |
bit, |
|
|
bool |
value |
|
) |
| |
Set bit to 0 or 1.
- Exceptions
-
bool BitSet::test |
( |
size_t |
bit | ) |
const |
Check individual bit.
- Exceptions
-
The documentation for this class was generated from the following file:
- /home/malitsky/projects/epics-archiver/sourceforge/trunk/ea4-cpp/include/common/tools/Bitset.h