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;
void ResetBitNumber(unsigned int bitnumber)
unsigned int GetNbits() const
G4SurfBits(unsigned int nbits=0)
void ReserveBytes(unsigned int nbytes)
G4bool operator[](unsigned int bitnumber) const
void SetBitNumber(unsigned int bitnumber, G4bool value=true)
G4SurfBits & operator=(const G4SurfBits &)
G4bool TestBitNumber(unsigned int bitnumber) const
void Output(std::ostream &) const
void Get(char *array) const
void ResetAllBits(G4bool value=false)
void set(unsigned int nbits, const char *array)
unsigned int GetNbytes() const