42 UBits(
unsigned int nbits = 0);
51 void SetBitNumber(
unsigned int bitnumber,
bool value =
true);
73 void Set(
unsigned int nbits,
const char* array);
77 void Set(
unsigned int nbits,
const int* array);
89 void Get(
char* array)
const;
93 void Get(
int* array)
const;
120 void Output(std::ostream&)
const;
178 unsigned int new_size = (bitnumber / 8) + 1;
181 if (new_size < 100 * 1024 * 1024)
183 unsigned char* old_location =
fAllBits;
184 fAllBits =
new unsigned char[new_size];
188 delete [] old_location;
192 unsigned int loc = bitnumber / 8;
193 unsigned char bit = bitnumber % 8;
197 fAllBits[loc] &= (0xFF ^ (1 << bit));
204 if (bitnumber >=
fNBits)
return false;
205 unsigned int loc = bitnumber / 8;
206 unsigned char value =
fAllBits[loc];
207 unsigned char bit = bitnumber % 8;
208 bool result = (value & (1 << bit)) != 0;
unsigned int GetNbytes() const
void Output(std::ostream &) const
UBits & operator=(const UBits &rhs)
unsigned int GetNbits() const
void ResetAllBits(bool value=false)
bool operator[](unsigned int bitnumber) const
void Set(unsigned int nbits, const char *array)
void SetBitNumber(unsigned int bitnumber, bool value=true)
UBits(unsigned int nbits=0)
bool TestBitNumber(unsigned int bitnumber) const
void ReserveBytes(unsigned int nbytes)
void ResetBitNumber(unsigned int bitnumber)
void Get(char *array) const