Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -21,17 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UImessenger.cc,v 1.5 2003/06/16 16:55:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4UImessenger.cc,v 1.6 2005/10/26 06:10:22 kmura Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include <string.h>
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include <strstream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
G4UImessenger::G4UImessenger() { }
|
||||
@@ -53,18 +51,16 @@ G4bool G4UImessenger::operator == (const G4UImessenger& messenger) const {
|
||||
|
||||
G4String G4UImessenger::ItoS(G4int i)
|
||||
{
|
||||
char defVal[20];
|
||||
std::ostrstream os(defVal,20);
|
||||
os << i << '\0';
|
||||
return G4String(defVal);
|
||||
std::ostringstream os;
|
||||
os << i;
|
||||
return G4String(os.str());
|
||||
}
|
||||
|
||||
G4String G4UImessenger::DtoS(G4double a)
|
||||
{
|
||||
char defVal[40];
|
||||
std::ostrstream os(defVal,40);
|
||||
os << a << '\0';
|
||||
return G4String(defVal);
|
||||
std::ostringstream os;
|
||||
os << a;
|
||||
return G4String(os.str());
|
||||
}
|
||||
|
||||
G4String G4UImessenger::BtoS(G4bool b)
|
||||
@@ -78,7 +74,7 @@ G4int G4UImessenger::StoI(G4String s)
|
||||
{
|
||||
G4int vl;
|
||||
const char* t = s;
|
||||
std::istrstream is((char*)t);
|
||||
std::istringstream is(t);
|
||||
is >> vl;
|
||||
return vl;
|
||||
}
|
||||
@@ -87,7 +83,7 @@ G4double G4UImessenger::StoD(G4String s)
|
||||
{
|
||||
G4double vl;
|
||||
const char* t = s;
|
||||
std::istrstream is((char*)t);
|
||||
std::istringstream is(t);
|
||||
is >> vl;
|
||||
return vl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user