|
Click
|
A wrapper class that acts like a single bit. More...
#include <bitvector.hh>
Public Member Functions | |
| Bit (const Bit &)=default | |
| Bit (Bitvector::word_type &w, int bit_offset) | |
| Construct a bit at offset bit_offset in data word w. | |
| operator bool () const | |
| Test if this bit is true. | |
| Bit & | operator= (bool x) |
| Set this bit to x. | |
| Bit & | operator= (const Bit &x) |
| void | flip () |
| Flip this bit. | |
| Bit & | operator&= (bool x) |
| Modify this bit by bitwise and with x. | |
| Bit & | operator|= (bool x) |
| Modify this bit by bitwise or with x. | |
| Bit & | operator^= (bool x) |
| Modify this bit by bitwise exclusive or with x. | |
| Bit & | operator-= (bool x) |
| Modify this bit by bitwise subtraction with x. | |
A wrapper class that acts like a single bit.
Bits are returned by modifiable Bitvectors' operator[]. They act like bools, but Bit operations actually index into individual bits in some shared word.
|
inline |
Construct a bit at offset bit_offset in data word w.
|
inline |
Test if this bit is true.
|
inline |
Set this bit to x.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Flip this bit.
|
inline |
Modify this bit by bitwise and with x.
|
inline |
Modify this bit by bitwise or with x.
|
inline |
Modify this bit by bitwise exclusive or with x.
|
inline |
Modify this bit by bitwise subtraction with x.