61 UBits(
unsigned int nbits = 0);
70 void SetBitNumber(
unsigned int bitnumber,
bool value =
true);
92 void Set(
unsigned int nbits,
const char* array);
96 void Set(
unsigned int nbits,
const int* array);
108 void Get(
char* array)
const;
112 void Get(
int* array)
const;
139 void Output(std::ostream&)
const;
177 unsigned int new_size = (bitnumber / 8) + 1;
180 if (new_size < 100 * 1024 * 1024)
182 unsigned char* old_location =
fAllBits;
183 fAllBits =
new unsigned char[new_size];
187 delete [] old_location;
191 unsigned int loc = bitnumber / 8;
192 unsigned char bit = bitnumber % 8;
196 fAllBits[loc] &= (0xFF ^ (1 << bit));
203 if (bitnumber >=
fNBits)
return false;
204 unsigned int loc = bitnumber / 8;
205 unsigned char value =
fAllBits[loc];
206 unsigned char bit = bitnumber % 8;
207 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