73 void set(
unsigned int nbits,
const char* array);
74 void set(
unsigned int nbits,
const G4int* array);
85 void Get(
char* array)
const;
96 void Output(std::ostream &)
const;
120 unsigned int new_size = (bitnumber/8) + 1;
123 if (new_size < 100 * 1024 * 1024) new_size *= 2;
124 unsigned char *old_location =
fAllBits;
125 fAllBits =
new unsigned char[new_size];
129 delete [] old_location;
133 unsigned int loc = bitnumber/8;
134 unsigned char bit = bitnumber%8;
145 if (bitnumber >=
fNBits)
return false;
146 unsigned int loc = bitnumber/8;
147 unsigned char value =
fAllBits[loc];
148 unsigned char bit = bitnumber%8;
149 G4bool result = (value & (1<<bit)) != 0;
unsigned int GetNbits() const
void Output(std::ostream &) const
G4SurfBits & operator=(const G4SurfBits &)
unsigned int GetNbytes() const
void ResetAllBits(G4bool value=false)
void Get(char *array) const
void ResetBitNumber(unsigned int bitnumber)
void SetBitNumber(unsigned int bitnumber, G4bool value=true)
void set(unsigned int nbits, const char *array)
void ReserveBytes(unsigned int nbytes)
G4bool operator[](unsigned int bitnumber) const
G4SurfBits(unsigned int nbits=0)
G4bool TestBitNumber(unsigned int bitnumber) const