Import Geant4 4.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIArrayString.cc,v 1.3.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4UIArrayString.cc,v 1.5 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/iomanip"
|
||||
@@ -45,8 +45,8 @@ G4UIArrayString::G4UIArrayString(const G4String& stream)
|
||||
while(1) {
|
||||
G4int jc= astream.index(" ", indx);
|
||||
nElement++;
|
||||
if(jc == G4String::npos) break;
|
||||
for(G4int i=1; jc+i< astream.length(); i++ ) { // skip continuing spaces
|
||||
if(jc == G4int(G4String::npos)) break;
|
||||
for(G4int i=1; jc+i< G4int(astream.length()); i++ ) { // skip continuing spaces
|
||||
if(astream[(size_t)(jc+i)]==' ') jc++;
|
||||
else break;
|
||||
}
|
||||
@@ -60,13 +60,13 @@ G4UIArrayString::G4UIArrayString(const G4String& stream)
|
||||
indx=0;
|
||||
for(G4int i=0; i<nElement; i++){
|
||||
G4int jc= astream.index(" ", indx);
|
||||
if(jc != G4String::npos)
|
||||
if(jc != G4int(G4String::npos))
|
||||
stringArray[i]= astream(indx, jc-indx);
|
||||
else { // last token
|
||||
jc= astream.length()+1;
|
||||
stringArray[i]= astream(indx, jc-indx);
|
||||
}
|
||||
for(G4int j=1; jc+j< astream.length(); j++ ) { // skip continuing spaces
|
||||
for(G4int j=1; jc+j< G4int(astream.length()); j++ ) { // skip continuing spaces
|
||||
if(astream(jc+j)==' ') jc++;
|
||||
else break;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIWin32.cc,v 1.6.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4UIWin32.cc,v 1.7 2001/07/11 10:01:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXaw.cc,v 1.3.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4UIXaw.cc,v 1.4 2001/07/11 10:01:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXm.cc,v 1.6.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4UIXm.cc,v 1.7 2001/07/11 10:01:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcsh.cc,v 1.4.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4UIcsh.cc,v 1.5 2001/07/11 10:01:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4UIcsh.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UItcsh.cc,v 1.5.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4UItcsh.cc,v 1.7 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -217,8 +217,8 @@ void G4UItcsh::ClearLine()
|
||||
// display...
|
||||
G4int i;
|
||||
for(i= cursorPosition; i>=2; i--) G4cout << AsciiBS;
|
||||
for(i=1; i<=commandLine.length(); i++) G4cout << ' ';
|
||||
for(i=1; i<=commandLine.length(); i++) G4cout << AsciiBS;
|
||||
for(i=1; i<=G4int(commandLine.length()); i++) G4cout << ' ';
|
||||
for(i=1; i<=G4int(commandLine.length()); i++) G4cout << AsciiBS;
|
||||
G4cout << G4std::flush;
|
||||
|
||||
// command line string...
|
||||
@@ -234,7 +234,7 @@ void G4UItcsh::ClearAfterCursor()
|
||||
|
||||
// display...
|
||||
G4int i;
|
||||
for(i=cursorPosition; i<=commandLine.length(); i++) G4cout << ' ';
|
||||
for(i=cursorPosition; i<=G4int(commandLine.length()); i++) G4cout << ' ';
|
||||
for(i=commandLine.length(); i>=cursorPosition; i--) G4cout << AsciiBS;
|
||||
G4cout << G4std::flush;
|
||||
|
||||
@@ -349,7 +349,7 @@ void G4UItcsh::ListMatchedCommand()
|
||||
G4String input= G4String(commandLine).strip(G4String::leading);
|
||||
// target token is last token
|
||||
G4int jhead= input.last(' ');
|
||||
if(jhead != G4String::npos) {
|
||||
if(jhead != G4int(G4String::npos)) {
|
||||
input.remove(0, jhead);
|
||||
input= input.strip(G4String::leading);
|
||||
}
|
||||
@@ -386,7 +386,7 @@ void G4UItcsh::CompleteCommand()
|
||||
G4String input= G4String(commandLine).strip(G4String::leading);
|
||||
// target token is last token
|
||||
G4int jhead= input.last(' ');
|
||||
if(jhead != G4String::npos) {
|
||||
if(jhead != G4int(G4String::npos)) {
|
||||
input.remove(0, jhead);
|
||||
input= input.strip(G4String::leading);
|
||||
}
|
||||
@@ -457,20 +457,20 @@ void G4UItcsh::CompleteCommand()
|
||||
input= commandLine;
|
||||
// target token is last token
|
||||
jhead= input.last(' ');
|
||||
if(jhead == G4String::npos) jhead=0;
|
||||
if(jhead == G4int(G4String::npos)) jhead=0;
|
||||
else jhead++;
|
||||
|
||||
G4int jt= input.find_last_of('/');
|
||||
if(jt<jhead) jt=G4String::npos;
|
||||
|
||||
if(jt==G4String::npos) jt= jhead;
|
||||
if(jt==G4int(G4String::npos)) jt= jhead;
|
||||
else jt++;
|
||||
|
||||
G4String dspstr;
|
||||
G4int i;
|
||||
for(i=jt; i<=input.length()-1; i++) dspstr+= G4String(AsciiBS); // cleanup
|
||||
for(i=jt; i<=input.length()-1; i++) dspstr+= G4String(' ');
|
||||
for(i=jt; i<=input.length()-1; i++) dspstr+= G4String(AsciiBS);
|
||||
for(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(AsciiBS); // cleanup
|
||||
for(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(' ');
|
||||
for(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(AsciiBS);
|
||||
|
||||
dspstr+= stream;
|
||||
G4cout << dspstr << G4std::flush;
|
||||
@@ -639,7 +639,7 @@ G4String G4UItcsh::GetFirstMatchedString(const G4String& str1,
|
||||
int nmin = nlen1<nlen2 ? nlen1 : nlen2;
|
||||
|
||||
G4String strMatched;
|
||||
for(size_t i=0; i<nmin; i++){
|
||||
for(size_t i=0; G4int(i)<nmin; i++){
|
||||
if(str1[i]==str2[i]) {
|
||||
strMatched+= str1[i];
|
||||
} else {
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIterminal.cc,v 1.14.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4UIterminal.cc,v 1.17 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/strstream"
|
||||
@@ -40,7 +40,6 @@ G4UIterminal::G4UIterminal(G4VUIshell* aShell)
|
||||
UI= G4UImanager::GetUIpointer();
|
||||
UI-> SetSession(this);
|
||||
UI-> SetCoutDestination(this);
|
||||
G4StateManager* statM= G4StateManager::GetStateManager();
|
||||
|
||||
iExit= FALSE;
|
||||
iCont= FALSE;
|
||||
@@ -74,7 +73,6 @@ G4UIsession* G4UIterminal::SessionStart()
|
||||
/////////////////////////////////////////
|
||||
{
|
||||
iExit= TRUE;
|
||||
G4StateManager* statM= G4StateManager::GetStateManager();
|
||||
|
||||
G4String newCommand= GetCommand();
|
||||
while(iExit){
|
||||
@@ -118,7 +116,7 @@ void G4UIterminal::ExecuteCommand(G4String aCommand)
|
||||
case fCommandSucceeded:
|
||||
break;
|
||||
case fCommandNotFound:
|
||||
G4cerr << "command <" << aCommand << "> not found" << G4endl;
|
||||
G4cerr << "command <" << UI->SolveAlias(aCommand) << "> not found" << G4endl;
|
||||
if( aCommand.index("@@") != G4String::npos) {
|
||||
G4cout << "@@G4UIterminal" << G4endl;
|
||||
}
|
||||
@@ -142,6 +140,7 @@ void G4UIterminal::ExecuteCommand(G4String aCommand)
|
||||
case fParameterUnreadable:
|
||||
G4cerr << "Parameter is wrong type and/or is not omittable (index " << paramIndex << ")" << G4endl;
|
||||
break;
|
||||
case fAliasNotFound:
|
||||
default:
|
||||
G4cerr << "command refused (" << commandStatus << ")" << G4endl;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUIshell.cc,v 1.4.4.1 2001/06/28 19:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VUIshell.cc,v 1.6 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
@@ -66,7 +66,7 @@ void G4VUIshell::MakePrompt(const char* msg)
|
||||
|
||||
promptString="";
|
||||
G4int i;
|
||||
for(i=0; i<promptSetting.length()-1; i++){
|
||||
for(i=0; i<G4int(promptSetting.length())-1; i++){
|
||||
if(promptSetting[(size_t)i]=='%'){
|
||||
switch (promptSetting[(size_t)(i+1)]) {
|
||||
case 's': // current application status
|
||||
@@ -97,7 +97,7 @@ void G4VUIshell::MakePrompt(const char* msg)
|
||||
}
|
||||
|
||||
// append last chaacter
|
||||
if(i == promptSetting.length()-1)
|
||||
if(i == G4int(promptSetting.length())-1)
|
||||
promptString.append(G4String(promptSetting[(size_t)i]));
|
||||
}
|
||||
|
||||
@@ -121,9 +121,9 @@ G4UIcommandTree* G4VUIshell::GetCommandTree(const G4String& input) const
|
||||
if(absPath[absPath.length()-1] != '/') return NULL; // error??
|
||||
if(absPath=="/") return cmdTree;
|
||||
|
||||
for(G4int indx=1; indx<absPath.length()-1; ) {
|
||||
for(G4int indx=1; indx<G4int(absPath.length())-1; ) {
|
||||
G4int jslash= absPath.index("/", indx); // search index begin with "/"
|
||||
if(jslash != G4String::npos) {
|
||||
if(jslash != G4int(G4String::npos)) {
|
||||
if(cmdTree != NULL)
|
||||
cmdTree= cmdTree-> GetTree(absPath(0,jslash+1));
|
||||
}
|
||||
@@ -147,14 +147,14 @@ G4String G4VUIshell::GetAbsCommandDirPath(const G4String& apath) const
|
||||
|
||||
// parsing...
|
||||
G4String absPath= "/";
|
||||
for(G4int indx=1; indx<=bpath.length()-1; ) {
|
||||
for(G4int indx=1; indx<=G4int(bpath.length())-1; ) {
|
||||
G4int jslash= bpath.index("/", indx); // search index begin with "/"
|
||||
if(jslash != G4String::npos) {
|
||||
if(jslash != G4int(G4String::npos)) {
|
||||
if(bpath(indx,jslash-indx) == ".."){ // directory up
|
||||
if(absPath.length() >=1) {
|
||||
absPath.remove(absPath.length()-1); // remove last "/"
|
||||
G4int jpre= absPath.last('/');
|
||||
if(jpre != G4String::npos) absPath.remove(jpre+1);
|
||||
if(jpre != G4int(G4String::npos)) absPath.remove(jpre+1);
|
||||
}
|
||||
} else if(bpath(indx,jslash-indx) == "."){ // nothing to do
|
||||
} else { // add
|
||||
|
||||
Reference in New Issue
Block a user