ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/utils/BitSet.hpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/utils/BitSet.hpp (file contents):
Revision 1962 by tim, Tue Feb 1 22:49:23 2005 UTC vs.
Revision 1974 by tim, Fri Feb 4 22:42:12 2005 UTC

# Line 55 | Line 55 | class BitSet {
55          /** */
56          BitSet() {}
57          /** */
58 <        BitSet(int nbits) {  bitset_.resize(nbits);  }
58 >        BitSet(int nbits) : bitset_(nbits) {clearAll(); }
59  
60          /** Returns the number of bits set to true in this BitSet.  */
61          int countBits();
# Line 105 | Line 105 | class BitSet {
105          void setRangeOff(int fromIndex, int toIndex) {  setBits(fromIndex, toIndex, false);  }        
106  
107          /** Sets all of the bits in this BitSet to false. */
108 <        void clear() {  setRangeOff(0, size());  }        
108 >        void clearAll() {  setRangeOff(0, size());  }        
109 >
110 >        void setAll() {  setRangeOn(0, size());  }        
111          
112          /** Returns the number of bits of space actually in use by this BitSet to represent bit values. */
113          int size() const {  return bitset_.size();  }
114  
115          /** Changes the size of BitSet*/
116 <        void resize(int nbits) {  bitset_.resize(nbits);  }
116 >        void resize(int nbits);
117          
118          BitSet& operator&= (const BitSet &bs) {  andOperator (bs); return *this; }
119          BitSet& operator|= (const BitSet &bs) { orOperator (bs); return *this; }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines