Tools.h++ Manual

21-26 104011 Tandem Computers Incorporated
21
RWBitRef operator()(size_t i);
Returns a reference to bit
i
of self. A helper class,
RWBitRef
, is used. The
result can be used as an lvalue. The index
i
must be between 0 and the length
of the vector less one. Bounds checking is performed only if the preprocessor
macro
RWBOUNDS_CHECK
has been defined before including the header file
bitvec.h
. If so, and if the index is out of range, then an exception of type
RWBoundsErr
will occur.
RWBoolean operator[](size_t i) const;
Returns the boolean value of bit
i
. The result cannot be used as an lvalue. The
index
i
must be between 0 and the length of the vector less one. Bounds
checking is performed. If the index is out of range, then an exception of type
RWBoundsErr
will occur.
RWBoolean operator()(size_t i) const;
Returns the boolean value of bit
i
. The result cannot be used as an lvalue. The
index
i
must be between 0 and the length of the vector less one. Bounds
checking is performed only if the preprocessor macro
RWBOUNDS_CHECK
has
been defined before including the header file
<rw/bitvec.h>
. If so, and if the
index is out of range, then an exception of type
RWBoundsErr
will occur.
Logical operators
RWBoolean operator==(const RWBitVec& u)
const;
Returns
TRUE
if self and
v
have the same length and if each bit of self is set to
the same value as the corresponding bit in
v
. Otherwise, returns
FALSE
.
RWBoolean operator!=(const RWBitVec& u)
const;
Returns
FALSE
if self and
v
have the same length and if each bit of self is set to
the same value as the corresponding bit in
v
. Otherwise, returns
TRUE
.
RWBoolean operator==(RWBoolean b) const;
Returns
TRUE
if every bit of self is set to the boolean value
b
. Otherwise
FALSE
.
RWBoolean operator!=(RWBoolean b) const;
Returns
FALSE
if every bit of self is set to the boolean value
b
. Otherwise
TRUE
.