82 void set(
unsigned int nbits,
const char *array);
83 void set(
unsigned int nbits,
const G4int *array);
94 void Get(
char *array)
const;
105 void Output(std::ostream &)
const;
126 if (bitnumber >=
fNBits) {
127 unsigned int new_size = (bitnumber/8) + 1;
129 if (new_size < 100 * 1024 * 1024)
131 unsigned char *old_location =
fAllBits;
132 fAllBits =
new unsigned char[new_size];
136 delete [] old_location;
140 unsigned int loc = bitnumber/8;
141 unsigned char bit = bitnumber%8;
152 if (bitnumber >=
fNBits)
return false;
153 unsigned int loc = bitnumber/8;
154 unsigned char value =
fAllBits[loc];
155 unsigned char bit = bitnumber%8;
156 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
G4bool TestBitNumber(unsigned int bitnumber) const