Example #1
0
    inline void toggle(int nr){
	int idx = nr/bits_();
	int off = nr%bits_();
	data_[idx] ^= (((ul)1)<<off);
    }
Example #2
0
    inline void clear(int nr){
	int idx = nr/bits_();
	int off = nr%bits_();
	data_[idx] &= ~(((ul)1)<<off);
    }
Example #3
0
    inline bool isSet(int nr)const{
	int idx = nr/bits_();
	int off = nr%bits_();
	return (data_[idx]&(((ul)1)<<off)) != 0;
    }
Example #4
0
    inline void set(int nr){
	int idx = nr/bits_();
	int off = nr%bits_();
	data_[idx] |= ((ul)1)<<off;
    }
Example #5
0
Integer::Integer()
{
  //Need to declare an empty vector, otherwise subtraction operator will dereference a null pointer
  std::vector<bool> bits_(0);
}