Tools.h++ Class Reference

Table Of Contents
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.
RWBoolean
operator!=(const RWTBitVec& v) const;
Returns TRUE if any bit of self is not set to the same value as the corresponding bit in v.
Otherwise, returns FALSE.
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 two lines 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;
Returns the index of the first OFF (False) bit in self. Returns RW_NPOS if there is no
OFF bit.
size_t
firstTrue() const;
Returns the index of the first ON (True) bit in self. Returns RW_NPOS if there is no ON
bit.
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