Tools.h++ Manual

22-2 104011 Tandem Computers Incorporated
22
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
i
'th 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
i
'th 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.
Logical operators
RWBoolean operator==(RWBoolean b) const;
Returns
TRUE
if every bit of self is set to the value b. Otherwise, returns
FALSE
.
RWBoolean operator!=(RWBoolean b) const;
Returns
TRUE
if any bit of self is not set to the value
b
. Otherwise, returns
FALSE
.
RWBoolean operator==(const RWTBitVec& v)
const;
Returns
TRUE
if each bit of self is set to the same value as the corresponding bit
in
v
. Otherwise, returns
FALSE
.