Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UReadBinaryString Class Reference

Static Public Member Functions

static G4String read (std::istream &is, size_t size)
 

Detailed Description

Definition at line 46 of file G4Serialize.cc.

Member Function Documentation

◆ read()

static G4String UReadBinaryString::read ( std::istream & is,
size_t size )
inlinestatic

Definition at line 49 of file G4Serialize.cc.

50 {
51 G4String returnStr;
52 if(size > 0)
53 {
54 auto buff = new char[size];
55 is.read(buff, size);
56 returnStr.assign(buff, size);
57 delete [] buff;
58 }
59
60 return returnStr;
61 }

Referenced by READ< G4String >().


The documentation for this class was generated from the following file: