#include <G4SurfBits.hh>
Definition at line 59 of file G4SurfBits.hh.
G4SurfBits::G4SurfBits |
( |
unsigned int |
nbits = 0 | ) |
|
G4SurfBits::G4SurfBits |
( |
const G4SurfBits & |
original | ) |
|
G4SurfBits::~G4SurfBits |
( |
| ) |
|
void G4SurfBits::Clear |
( |
| ) |
|
void G4SurfBits::Compact |
( |
| ) |
|
Definition at line 103 of file G4SurfBits.cc.
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;
void G4SurfBits::Get |
( |
char * |
array | ) |
const |
unsigned int G4SurfBits::GetNbits |
( |
| ) |
const |
|
inline |
unsigned int G4SurfBits::GetNbytes |
( |
| ) |
const |
|
inline |
G4bool G4SurfBits::operator[] |
( |
unsigned int |
bitnumber | ) |
const |
|
inline |
Definition at line 166 of file G4SurfBits.hh.
G4bool TestBitNumber(unsigned int bitnumber) const
void G4SurfBits::Output |
( |
std::ostream & |
os | ) |
const |
Definition at line 126 of file G4SurfBits.cc.
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) {
Definition at line 139 of file G4SurfBits.cc.
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;
G4GLOB_DLL std::ostream G4cout
void G4SurfBits::ReserveBytes |
( |
unsigned int |
nbytes | ) |
|
|
protected |
Definition at line 160 of file G4SurfBits.cc.
166 unsigned char *newBits=
new unsigned char[nbytes];
void G4SurfBits::ResetAllBits |
( |
G4bool |
value = false | ) |
|
Definition at line 154 of file G4SurfBits.cc.
const XML_Char int const XML_Char * value
void G4SurfBits::ResetBitNumber |
( |
unsigned int |
bitnumber | ) |
|
|
inline |
Definition at line 161 of file G4SurfBits.hh.
void SetBitNumber(unsigned int bitnumber, G4bool value=true)
void G4SurfBits::set |
( |
unsigned int |
nbits, |
|
|
const char * |
array |
|
) |
| |
Definition at line 174 of file G4SurfBits.cc.
177 unsigned int nbytes=(nBits+7)>>3;
182 std::memcpy(
fAllBits, array, nbytes);
void ReserveBytes(unsigned int nbytes)
void G4SurfBits::set |
( |
unsigned int |
nbits, |
|
|
const G4int * |
array |
|
) |
| |
Definition at line 196 of file G4SurfBits.cc.
200 set(nBits, (
const char*)array);
void set(unsigned int nbits, const char *array)
void G4SurfBits::SetBitNumber |
( |
unsigned int |
bitnumber, |
|
|
G4bool |
value = true |
|
) |
| |
|
inline |
Definition at line 123 of file G4SurfBits.hh.
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;
const XML_Char int const XML_Char * value
G4bool G4SurfBits::TestBitNumber |
( |
unsigned int |
bitnumber | ) |
const |
|
inline |
Definition at line 148 of file G4SurfBits.hh.
152 if (bitnumber >=
fNBits)
return false;
153 unsigned int loc = bitnumber/8;
155 unsigned char bit = bitnumber%8;
G4double G4ParticleHPJENDLHEData::G4double result
const XML_Char int const XML_Char * value
unsigned char* G4SurfBits::fAllBits |
unsigned int G4SurfBits::fNBits |
|
protected |
unsigned int G4SurfBits::fNBytes |
|
protected |
The documentation for this class was generated from the following files:
- source/geant4.10.03.p02/source/geometry/solids/specific/include/G4SurfBits.hh
- source/geant4.10.03.p02/source/geometry/solids/specific/src/G4SurfBits.cc