49 : fNBits(original.fNBits), fNBytes(original.fNBytes)
106 for(needed=
fNBytes-1; needed > 0 &&
fAllBits[needed]==0; ) { --needed; }
111 unsigned char* old_location =
fAllBits;
112 fAllBits =
new unsigned char[needed];
114 std::memcpy(
fAllBits,old_location,needed);
115 delete [] old_location;
126 for(
unsigned int i=0; i<
fNBytes; ++i)
129 for (
unsigned int j=0; j<8; ++j)
142 for(
unsigned int i=0; i<
fNBytes; ++i)
145 for (
unsigned int j=0; j<8; ++j)
147 if (val & 1)
G4cout <<
" bit:" << count <<
" = 1" <<
G4endl;
168 unsigned char *newBits =
new unsigned char[nbytes];
179 unsigned int nbytes=(nBits+7)>>3;
184 std::memcpy(
fAllBits, array, nbytes);
202 set(nBits, (
const char*)array);
G4GLOB_DLL std::ostream G4cout
void Output(std::ostream &) const
G4SurfBits & operator=(const G4SurfBits &)
void ResetAllBits(G4bool value=false)
void Get(char *array) const
void set(unsigned int nbits, const char *array)
void ReserveBytes(unsigned int nbytes)
G4SurfBits(unsigned int nbits=0)