56 fNBytes(original.fNBytes)
110 needed > 0 &&
fAllBits[needed]==0; ) { needed--; };
114 unsigned char *old_location =
fAllBits;
115 fAllBits =
new unsigned char[needed];
117 std::memcpy(fAllBits,old_location,needed);
118 delete [] old_location;
129 for(
unsigned int i=0; i<
fNBytes; ++i) {
130 unsigned char val =
fAllBits[fNBytes - 1 - i];
131 for (
unsigned int j=0; j<8; ++j) {
143 for(
unsigned int i=0; i<
fNBytes; ++i) {
145 for (
unsigned int j=0; j<8; ++j) {
146 if (val & 1)
G4cout <<
" bit:" << count <<
" = 1" <<
G4endl;
166 unsigned char *newBits=
new unsigned char[nbytes];
177 unsigned int nbytes=(nBits+7)>>3;
182 std::memcpy(
fAllBits, array, nbytes);
200 set(nBits, (
const char*)array);
G4SurfBits(unsigned int nbits=0)
void ReserveBytes(unsigned int nbytes)
G4SurfBits & operator=(const G4SurfBits &)
G4GLOB_DLL std::ostream G4cout
void Output(std::ostream &) const
void Get(char *array) const
void ResetAllBits(G4bool value=false)
void set(unsigned int nbits, const char *array)