Tools.h++ Class Reference

Table Of Contents
Assignment Operators
RWBitVec&
operator=(const RWBitVec& v);
Assignment operator. Value semantics are used -- self will be a copy of v.
RWBitVec&
operator=(RWBoolean b);
Assignment operator. Sets every bit in self to the boolean value b.
RWBitVec&
operator&=(const RWBitVec& v);
RWBitVec&
operator^=(const RWBitVec& v);
RWBitVec&
operator|=(const RWBitVec& v);
Logical assignments. Set each element of self to the logical AND, XOR, or OR,
respectively, of self and the corresponding bit in v. Self and v must have the same
number of elements (i.e., be conformal) or an exception of type RWInternalErr will
occur.
Indexing Operators
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. If the index is out of range, then an exception of type
RWBoundsErr will occur.
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 <rw/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