Tools.h++ Class Reference

Table Of Contents
Set all elements of self to the boolean value f.
RWGBitVec(sz)&
operator&=(const RWGBitVec(sz)& v);
RWGBitVec(sz)&
operator^=(const RWGBitVec(sz)& v);
RWGBitVec(sz)&
operator|=(const RWGBitVec(sz)& v);
Logical assignments. Set each element of self to the logical AND, XOR, or OR, respectively,
of self and the corresponding bit in v.
Indexing Operators
RWBitRef
operator[](size_t i);
Returns a reference to the ith bit of self. This reference can be used as an lvalue. The index i
must be between 0 and size-1, inclusive. Bounds checking will occur.
RWBitRef
operator()(size_t i);
Returns a reference to the ith bit of self. This reference can be used as an lvalue. The index i
must be between 0 and size-1, inclusive. No bounds checking is done.
Public Member Functions
void
clearBit(size_t i);
Clears (i.e., sets to FALSE) the bit with index i. The index i must be between 0 and size-1. No
bounds checking is performed. The following are equivalent, although clearBit(size_t) is
slightly smaller and faster than using operator()(size_t):
a(i) = FALSE;
a.clearBit(i);
const RWByte*
data() const;
Returns a const pointer to the raw data of self. Should be used with care.
void
setBit(size_t i);
Sets (i.e., sets to TRUE) the bit with index i. The index i must be between 0 and size-1. No
bounds checking is performed. The following are equivalent, although setBit(size_t) is
slightly smaller and faster than using operator()(size_t):
a(i) = TRUE;
a.setBit(i);