Tools.h++ Class Reference

Table Of Contents
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.
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 the
length of the vector less one. 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.
size_t
firstFalse() const;