Tools.h++ Class Reference

Table Of Contents
main() {
RWTBitVec<24> a, b; // Allocate two vectors.
a(2) = TRUE; // Set bit 2 (the third bit) of a on.
b(3) = TRUE; // Set bit 3 (the fourth bit) of b on.
RWTBitVec<24> c = a ^ b; // Set c to the XOR of a and b.
}
Public Constructor
RWTBitVec<size>();
Constructs an instance with all bits set to FALSE.
RWTBitVec<size>(RWBoolean val);
Constructs an instance with all bits set to val.
Assignment Operators
RWTBitVec<size>&
operator=(const RWTBitVec<size>& v);
Sets self to a copy of v.
RWTBitVec&
operator=(RWBoolean val);
Sets all bits in self to the value val.
RWTBitVec&
operator&=(const RWTBitVec& v);
RWTBitVec&
operator^=(const RWTBitVec& v);
RWTBitVec&
operator|=(const RWTBitVec& v);
Logical assignments. Sets each bit of self to the logical AND, XOR, or OR, respectively,
of self and the corresponding bit in v.
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.