Import Geant4 5.2.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIGAG.hh,v 1.5 2001/07/11 10:01:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIGAG.hh,v 1.6 2003/06/16 16:55:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G4UIGAG.hh
|
||||
// GAG(Geant4 adaptive GUI) interface class
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
#include "G4UIsession.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/vector"
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
enum UImode { terminal_mode , java_mode, tcl_mode };
|
||||
enum ChangeOfTree { notChanged=0, added, deleted, addedAndDeleted };
|
||||
@@ -117,12 +117,12 @@ class G4UIGAG : public G4UIsession
|
||||
void GetNewTreeStructure( G4UIcommandTree*,int recursiveLevel);
|
||||
void GetNewTreeValues( G4UIcommandTree*,int recursiveLevel);
|
||||
|
||||
G4std::vector<G4String> previousTreeCommands;
|
||||
G4std::vector<G4String> newTreeCommands;
|
||||
G4std::vector<G4String> previousTreeParams;
|
||||
G4std::vector<G4String> newTreeParams;
|
||||
G4std::vector<G4UIcommand*> previousTreePCP;
|
||||
G4std::vector<G4UIcommand*> newTreePCP;
|
||||
std::vector<G4String> previousTreeCommands;
|
||||
std::vector<G4String> newTreeCommands;
|
||||
std::vector<G4String> previousTreeParams;
|
||||
std::vector<G4String> newTreeParams;
|
||||
std::vector<G4UIcommand*> previousTreePCP;
|
||||
std::vector<G4UIcommand*> newTreePCP;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIGainServer.hh,v 1.3 2002/06/14 02:17:58 yhajime Exp $
|
||||
// $Name: geant4-05-01 $
|
||||
// $Id: G4UIGainServer.hh,v 1.4 2003/06/16 16:55:50 gunter Exp $
|
||||
// $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#include <netinet/in.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include "g4std/fstream"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "globals.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VBasicShell.hh"
|
||||
@@ -88,12 +88,12 @@ private:
|
||||
void GetNewTreeStructure( G4UIcommandTree*,int recursiveLevel);
|
||||
void GetNewTreeValues( G4UIcommandTree*,int recursiveLevel);
|
||||
|
||||
G4std::vector<G4String> previousTreeCommands;
|
||||
G4std::vector<G4String> newTreeCommands;
|
||||
G4std::vector<G4String> previousTreeParams;
|
||||
G4std::vector<G4String> newTreeParams;
|
||||
G4std::vector<G4UIcommand*> previousTreePCP;
|
||||
G4std::vector<G4UIcommand*> newTreePCP;
|
||||
std::vector<G4String> previousTreeCommands;
|
||||
std::vector<G4String> newTreeCommands;
|
||||
std::vector<G4String> previousTreeParams;
|
||||
std::vector<G4String> newTreeParams;
|
||||
std::vector<G4UIcommand*> previousTreePCP;
|
||||
std::vector<G4UIcommand*> newTreePCP;
|
||||
|
||||
public:
|
||||
// These methods are implementation of corresponding virtual methods
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIGAG.cc,v 1.15 2002/12/05 16:33:41 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIGAG.cc,v 1.16 2003/06/16 16:55:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G4UIGAG.cc
|
||||
// 18.Feb.98 M.Nagamatu and T.Kodama created G4UIGAG from G4UIterminal
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "G4UIcommandTree.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcommandStatus.hh"
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
G4UIGAG::G4UIGAG()//: TVersion("T1.0a"), JVersion("J1.0a")
|
||||
{
|
||||
@@ -169,13 +169,13 @@ void G4UIGAG::ExecuteCommand(G4String aCommand)
|
||||
|
||||
G4int G4UIGAG::ReceiveG4cout(G4String coutString)
|
||||
{
|
||||
G4std::cout << coutString << G4std::flush;
|
||||
std::cout << coutString << std::flush;
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4int G4UIGAG::ReceiveG4cerr(G4String cerrString)
|
||||
{
|
||||
G4std::cerr << cerrString << G4std::flush;
|
||||
std::cerr << cerrString << std::flush;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ G4String G4UIGAG::GetCommand()
|
||||
G4cout << "@@PROMPT \"" << promptCharacter << "\"" << G4endl;
|
||||
}
|
||||
if ( uiMode != java_mode ){
|
||||
G4cout << promptCharacter << "> " << G4std::flush;
|
||||
G4cout << promptCharacter << "> " << std::flush;
|
||||
}else{
|
||||
G4cout << "@@Ready" << G4endl;
|
||||
}
|
||||
@@ -254,7 +254,7 @@ G4String G4UIGAG::GetCommand()
|
||||
G4String ss = nC(1,nC.length()-1);
|
||||
G4int vl;
|
||||
const char* tt = ss;
|
||||
G4std::istrstream is((char*)tt);
|
||||
std::istrstream is((char*)tt);
|
||||
is >> vl;
|
||||
G4int nh = UI->GetNumberOfHistory();
|
||||
if(vl>=0 && vl<nh)
|
||||
@@ -411,7 +411,7 @@ void G4UIGAG::TerminalHelp(G4String newCommand)
|
||||
{
|
||||
G4UIcommandTree * treeTop = UI->GetTree();
|
||||
/*int*/unsigned i = newCommand.index(" ");
|
||||
if( i != G4std::string::npos )
|
||||
if( i != std::string::npos )
|
||||
{
|
||||
G4String newValue = newCommand(i+1,newCommand.length()-(i+1));
|
||||
newValue.strip(G4String::both);
|
||||
@@ -446,7 +446,7 @@ void G4UIGAG::TerminalHelp(G4String newCommand)
|
||||
// 1998 Oct 2 non-number input
|
||||
while(1){
|
||||
int i;
|
||||
G4cout << G4endl << "Type the number ( 0:end, -n:n level back ) : "<<G4std::flush;
|
||||
G4cout << G4endl << "Type the number ( 0:end, -n:n level back ) : "<<std::flush;
|
||||
G4cin >> i;
|
||||
if(!G4cin.good()){
|
||||
G4cin.clear();
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
//
|
||||
//
|
||||
// 12/06/2002 G4UIGainServer H. MInamimoto and H. Yoshida created
|
||||
// $Id: G4UIGainServer.cc,v 1.5 2002/12/05 16:33:42 asaim Exp $
|
||||
// $Name: geant4-05-01 $
|
||||
// $Id: G4UIGainServer.cc,v 1.7 2003/06/16 16:55:52 gunter Exp $
|
||||
// $Name: geant4-05-02 $
|
||||
//
|
||||
#ifndef WIN32
|
||||
|
||||
#include "G4UIGainServer.hh"
|
||||
#include <netdb.h>
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4UIcommandTree.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
@@ -262,7 +262,7 @@ G4String G4UIGainServer::GetCommand()
|
||||
G4String ss = nC(1,nC.length()-1);
|
||||
G4int vl;
|
||||
const char* tt = ss;
|
||||
G4std::istrstream is((char*)tt);
|
||||
std::istrstream is((char*)tt);
|
||||
is >> vl;
|
||||
G4int nh = UI->GetNumberOfHistory();
|
||||
if(vl>=0 && vl<nh)
|
||||
@@ -323,7 +323,7 @@ G4int G4UIGainServer::ReceiveG4cout(G4String coutString)
|
||||
|
||||
|
||||
|
||||
//G4std::cout << coutString << G4std::flush;
|
||||
//std::cout << coutString << std::flush;
|
||||
//return 0;
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ G4int G4UIGainServer::ReceiveG4cerr(G4String cerrString)
|
||||
|
||||
|
||||
|
||||
//G4std::cerr << cerrString << G4std::flush;
|
||||
//std::cerr << cerrString << std::flush;
|
||||
//return 0;
|
||||
}
|
||||
|
||||
@@ -404,8 +404,11 @@ void G4UIGainServer::WaitingConnection(){
|
||||
len = sizeof(caddr);
|
||||
|
||||
for(int i=1;i<=2;i++){
|
||||
// if((socketD[i] = accept(socketD[0], (struct sockaddr *)&caddr,(int *)&len))<0){
|
||||
#ifndef __APPLE__
|
||||
if((socketD[i] = accept(socketD[0], (struct sockaddr *)&caddr,(socklen_t *)&len))<0){
|
||||
#else
|
||||
if((socketD[i] = accept(socketD[0], (struct sockaddr *)&caddr,(int *)&len))<0){
|
||||
#endif
|
||||
G4cerr<<"accept:"<<i<<G4endl;
|
||||
exit(1);
|
||||
}
|
||||
@@ -533,7 +536,7 @@ void G4UIGainServer::TerminalHelp(G4String newCommand){
|
||||
G4UIcommandTree* treeTop = UI->GetTree();
|
||||
unsigned i = newCommand.index(" ");
|
||||
|
||||
if(i!=G4std::string::npos){
|
||||
if(i!=std::string::npos){
|
||||
G4String newValue = newCommand(i+1,newCommand.length()-(i+1));
|
||||
newValue.strip(G4String::both);
|
||||
if(newValue(0)!='/'){
|
||||
@@ -564,7 +567,7 @@ void G4UIGainServer::TerminalHelp(G4String newCommand){
|
||||
floor[iFloor]->ListCurrentWithNum();
|
||||
while(1){
|
||||
int i;
|
||||
G4cout<<G4endl <<"Type the number (0:end, -n:n level back) :"<<G4std::flush;
|
||||
G4cout<<G4endl <<"Type the number (0:end, -n:n level back) :"<<std::flush;
|
||||
G4cin >> i;
|
||||
if(!G4cin.good()){
|
||||
G4cin.clear();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.60 2002/12/05 16:33:41 asaim Exp $
|
||||
$Id: History,v 1.63 2003/06/11 07:05:59 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,18 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
11 June 2003, Gabriele Cosmo (interfaces-V05-01-02)
|
||||
- G4UIWin32.cc: cleared warning on redefinition of 'pascal' reported on
|
||||
WIN32-VC system.
|
||||
|
||||
04 June 2003, Gabriele Cosmo (interfaces-V05-01-01)
|
||||
- Fixes for inclusion of <strstream> in G4UIXm.cc, G4UItcsh.cc and
|
||||
G4UIterminal.cc in view of the g4std wrappers migration.
|
||||
|
||||
30 May 2003, Gabriele Cosmo (interfaces-V05-01-00)
|
||||
- Fixed few pedantic warnings...
|
||||
- G4UIGainServer.cc: fixed compilation problem on Darwin-g++ with gcc-3.X.
|
||||
|
||||
04 December 2002, Makoto Asai (interfaces-V04-01-01, interfaces-V04-01-02)
|
||||
- Migration to new G4ApplicationState.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIWo.hh,v 1.4 2001/07/11 10:01:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifndef G4UIWo_h
|
||||
#define G4UIWo_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4WoMessenger.hh,v 1.4 2001/07/11 10:01:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifndef G4WoMessenger_h
|
||||
#define G4WoMessenger_h 1
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4oCommon.hh,v 1.4 2001/07/11 10:01:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
/*
|
||||
Included by G4o.h.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4oCommon.icc,v 1.4 2001/07/11 10:01:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
/*
|
||||
Included by G4o.cc.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIWo.cc,v 1.5 2001/07/11 10:01:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//G4UIWo.cc -- copied from G4UIterminal.cc
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4WoMessenger.cc,v 1.4 2001/07/11 10:01:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifdef G4UI_BUILD_WO_SESSION
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIxvt.hh,v 1.4 2001/07/11 10:01:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIxvt.hh,v 1.5 2003/06/16 16:55:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// XVT driver class header //
|
||||
@@ -86,7 +86,7 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "G4VStateDependent.hh"
|
||||
#include "g4std/fstream"
|
||||
#include <fstream>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIxvtMessenger.hh,v 1.4 2001/07/11 10:01:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIxvt.cc,v 1.5 2002/12/04 22:03:09 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifdef G4UI_BUILD_XVT_SESSION
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIxvtMessenger.cc,v 1.4 2001/07/11 10:01:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifdef G4UI_BUILD_XVT_SESSION
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIArrayString.hh,v 1.2 2001/07/11 10:01:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4UIArrayString_h
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIWin32.hh,v 1.10 2001/07/11 10:01:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIWin32.hh,v 1.11 2003/06/16 16:55:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifndef G4UIWin32_h
|
||||
#define G4UIWin32_h
|
||||
|
||||
#if defined(G4UI_BUILD_WIN32_SESSION) || defined(G4UI_USE_WIN32)
|
||||
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "G4VBasicShell.hh"
|
||||
#include "G4VInteractiveSession.hh"
|
||||
@@ -94,7 +94,7 @@ private:
|
||||
HWND mainWindow;
|
||||
HWND textWindow,editWindow;
|
||||
HMENU menuBar,defaultMenu;
|
||||
G4std::map<int,G4String, G4std::less<int> > commands;
|
||||
std::map<int,G4String, std::less<int> > commands;
|
||||
void* textBuffer;
|
||||
int textRows,textCols;
|
||||
static LRESULT CALLBACK MainWindowProc(HWND,UINT,WPARAM,LPARAM);
|
||||
@@ -102,7 +102,7 @@ private:
|
||||
static LRESULT CALLBACK EditWindowProc(HWND,UINT,WPARAM,LPARAM);
|
||||
G4bool fHelp;
|
||||
G4int fHelpChoice;
|
||||
G4std::vector<G4String> fHistory;
|
||||
std::vector<G4String> fHistory;
|
||||
int fHistoryPos;
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXaw.hh,v 1.5 2001/07/11 10:01:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifndef G4UIXaw_h
|
||||
#define G4UIXaw_h
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXm.hh,v 1.11 2001/07/11 10:01:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIXm.hh,v 1.12 2003/06/16 16:55:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#ifndef G4UIXm_h
|
||||
#define G4UIXm_h
|
||||
|
||||
#if defined(G4UI_BUILD_XM_SESSION) || defined(G4UI_USE_XM)
|
||||
|
||||
#include "g4std/map"
|
||||
#include <map>
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
@@ -89,7 +89,7 @@ private:
|
||||
void ExitHelp();
|
||||
private:
|
||||
Widget form,shell,command,menuBar,text;
|
||||
G4std::map<Widget,G4String, G4std::less<Widget> > commands;
|
||||
std::map<Widget,G4String, std::less<Widget> > commands;
|
||||
static void commandEnteredCallback(Widget,XtPointer,XtPointer);
|
||||
static void keyHandler(Widget,XtPointer,XEvent*,Boolean*);
|
||||
G4bool fHelp;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcsh.hh,v 1.3 2001/07/11 10:01:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4UIcsh_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UItcsh.hh,v 1.5 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UItcsh.hh,v 1.6 2003/06/16 16:55:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4UItcsh_h
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef WIN32
|
||||
|
||||
#include <termios.h>
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
#include "G4VUIshell.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcommandTree.hh"
|
||||
@@ -100,7 +100,7 @@ protected:
|
||||
const G4String& str2) const;
|
||||
|
||||
// history functionality (history# is managed in itself)
|
||||
G4std::vector<G4String> commandHistory;
|
||||
std::vector<G4String> commandHistory;
|
||||
G4int maxHistory; // max# of histories stored
|
||||
G4int currentHistoryNo; // global
|
||||
G4int relativeHistoryIndex; // local index relative to current history#
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIterminal.hh,v 1.7 2001/07/11 10:01:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIterminal.hh,v 1.8 2003/06/16 16:55:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4UIterminal_h
|
||||
#define G4UIterminal_h 1
|
||||
|
||||
#include "g4std/fstream"
|
||||
#include <fstream>
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VBasicShell.hh"
|
||||
#include "G4VUIshell.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUIshell.hh,v 1.5 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4VUIshell_h
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIArrayString.cc,v 1.6 2002/10/17 02:40:24 murakami Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIArrayString.cc,v 1.7 2003/06/16 16:55:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "g4std/iomanip"
|
||||
#include <iomanip>
|
||||
#include "G4UIArrayString.hh"
|
||||
|
||||
static const char strESC= '\033';
|
||||
@@ -179,12 +179,12 @@ void G4UIArrayString::Show(G4int ncol)
|
||||
colorWord= word(0,5);
|
||||
word.erase(0,5);
|
||||
}
|
||||
if(!colorWord.empty()) G4cout << colorWord << G4std::flush;
|
||||
if(!colorWord.empty()) G4cout << colorWord << std::flush;
|
||||
|
||||
G4cout << G4std::setiosflags(G4std::ios::left) << G4std::setw(GetNField(ix))
|
||||
<< word.c_str() << G4std::flush;
|
||||
G4cout << std::setiosflags(std::ios::left) << std::setw(GetNField(ix))
|
||||
<< word.c_str() << std::flush;
|
||||
// against problem w/ g++ iostream
|
||||
if(ix != nc) G4cout << " " << G4std::flush;
|
||||
if(ix != nc) G4cout << " " << std::flush;
|
||||
else G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIWin32.cc,v 1.7 2001/07/11 10:01:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIWin32.cc,v 1.9 2003/06/16 16:55:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
@@ -32,11 +32,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <wingdi.h>
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4StateManager.hh"
|
||||
@@ -46,6 +42,8 @@
|
||||
|
||||
#include "G4UIWin32.hh"
|
||||
|
||||
#include <wingdi.h>
|
||||
|
||||
#define TEXT_MAX_LINES 300
|
||||
|
||||
class TextBuffer {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXaw.cc,v 1.5 2002/11/06 08:12:37 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXm.cc,v 1.8 2002/11/06 08:12:37 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIXm.cc,v 1.11 2003/06/16 16:56:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
#ifdef G4UI_BUILD_XM_SESSION
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -365,7 +366,7 @@ void G4UIXm::keyHandler (
|
||||
Widget a_widget
|
||||
,XtPointer a_tag
|
||||
,XEvent* a_event
|
||||
,Boolean* a_dispatch
|
||||
,Boolean*
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
@@ -382,7 +383,7 @@ void G4UIXm::keyHandler (
|
||||
}
|
||||
/***************************************************************************/
|
||||
void clearButtonCallback (
|
||||
Widget a_widget
|
||||
Widget
|
||||
,XtPointer a_tag
|
||||
,XtPointer
|
||||
)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcsh.cc,v 1.6 2002/02/26 02:09:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIcsh.cc,v 1.7 2003/06/16 16:56:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4UIcsh.hh"
|
||||
@@ -46,7 +46,7 @@ G4String G4UIcsh::GetCommandLine(const char* msg)
|
||||
//////////////////////////////////
|
||||
{
|
||||
MakePrompt(msg);
|
||||
G4cout << promptString << G4std::flush;
|
||||
G4cout << promptString << std::flush;
|
||||
|
||||
G4String newCommand;
|
||||
newCommand.readLine(G4cin, FALSE);
|
||||
|
||||
@@ -21,14 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UItcsh.cc,v 1.8 2002/10/17 02:41:22 murakami Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UItcsh.cc,v 1.10 2003/06/16 16:56:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
#include <ctype.h>
|
||||
#include "g4std/strstream"
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4UIcommandStatus.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
@@ -107,7 +108,7 @@ void G4UItcsh::MakePrompt(const char* msg)
|
||||
case 'h': // history#
|
||||
{
|
||||
char st[20];
|
||||
G4std::ostrstream os(st,20);
|
||||
std::ostrstream os(st,20);
|
||||
os << currentHistoryNo << '\0';
|
||||
promptString.append(st);
|
||||
i++;
|
||||
@@ -150,7 +151,7 @@ void G4UItcsh::InsertCharacter(char cc)
|
||||
G4cout << commandLine[i];
|
||||
for(i=cursorPosition-1; i<commandLine.length() ;i++)
|
||||
G4cout << AsciiBS;
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command line string...
|
||||
if(IsCursorLast()) { // add
|
||||
@@ -169,7 +170,7 @@ void G4UItcsh::BackspaceCharacter()
|
||||
|
||||
// display...
|
||||
if(IsCursorLast()) {
|
||||
G4cout << AsciiBS << ' ' << AsciiBS << G4std::flush;
|
||||
G4cout << AsciiBS << ' ' << AsciiBS << std::flush;
|
||||
} else {
|
||||
G4cout << AsciiBS;
|
||||
size_t i;
|
||||
@@ -180,7 +181,7 @@ void G4UItcsh::BackspaceCharacter()
|
||||
for(i=cursorPosition-2; i< commandLine.length() ;i++){
|
||||
G4cout << AsciiBS;
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
}
|
||||
|
||||
// command line string...
|
||||
@@ -204,7 +205,7 @@ void G4UItcsh::DeleteCharacter()
|
||||
for(i=cursorPosition-1; i< commandLine.length() ;i++){
|
||||
G4cout << AsciiBS;
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command lin string...
|
||||
commandLine.erase(cursorPosition-1, 1);
|
||||
@@ -219,7 +220,7 @@ void G4UItcsh::ClearLine()
|
||||
for(i= cursorPosition; i>=2; 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;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command line string...
|
||||
commandLine.erase();
|
||||
@@ -236,7 +237,7 @@ void G4UItcsh::ClearAfterCursor()
|
||||
G4int i;
|
||||
for(i=cursorPosition; i<=G4int(commandLine.length()); i++) G4cout << ' ';
|
||||
for(i=commandLine.length(); i>=cursorPosition; i--) G4cout << AsciiBS;
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command line string...
|
||||
commandLine.erase(cursorPosition-1,
|
||||
@@ -250,10 +251,10 @@ void G4UItcsh::ClearScreen()
|
||||
if(! clearString.empty() ) {
|
||||
G4cout << clearString;
|
||||
|
||||
G4cout << promptString << commandLine << G4std::flush;
|
||||
G4cout << promptString << commandLine << std::flush;
|
||||
// reset cursur position
|
||||
for(G4int i=commandLine.length()+1; i>=cursorPosition+1; i--)
|
||||
G4cout << AsciiBS << G4std::flush;
|
||||
G4cout << AsciiBS << std::flush;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +264,7 @@ void G4UItcsh::ForwardCursor()
|
||||
{
|
||||
if(IsCursorLast()) return;
|
||||
|
||||
G4cout << commandLine[(size_t)(cursorPosition-1)] << G4std::flush;
|
||||
G4cout << commandLine[(size_t)(cursorPosition-1)] << std::flush;
|
||||
cursorPosition++;
|
||||
}
|
||||
|
||||
@@ -274,7 +275,7 @@ void G4UItcsh::BackwardCursor()
|
||||
if(cursorPosition==1) return;
|
||||
|
||||
cursorPosition--;
|
||||
G4cout << AsciiBS << G4std::flush;
|
||||
G4cout << AsciiBS << std::flush;
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
@@ -284,7 +285,7 @@ void G4UItcsh::MoveCursorTop()
|
||||
for(G4int i=cursorPosition; i>1; i--){
|
||||
G4cout << AsciiBS;
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
cursorPosition=1;
|
||||
}
|
||||
|
||||
@@ -295,7 +296,7 @@ void G4UItcsh::MoveCursorEnd()
|
||||
for(size_t i=cursorPosition-1; i<commandLine.length(); i++){
|
||||
G4cout << commandLine[i];
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
cursorPosition=commandLine.length()+1;
|
||||
}
|
||||
|
||||
@@ -314,7 +315,7 @@ void G4UItcsh::PreviousCommand()
|
||||
relativeHistoryIndex--;
|
||||
commandLine= RestoreHistory(currentHistoryNo+relativeHistoryIndex);
|
||||
|
||||
G4cout << commandLine << G4std::flush;
|
||||
G4cout << commandLine << std::flush;
|
||||
cursorPosition= commandLine.length()+1;
|
||||
}
|
||||
}
|
||||
@@ -333,7 +334,7 @@ void G4UItcsh::NextCommand()
|
||||
if(relativeHistoryIndex==0) commandLine= commandLineBuf;
|
||||
else commandLine= RestoreHistory(currentHistoryNo+relativeHistoryIndex);
|
||||
|
||||
G4cout << commandLine << G4std::flush;
|
||||
G4cout << commandLine << std::flush;
|
||||
cursorPosition= commandLine.length()+1;
|
||||
}
|
||||
}
|
||||
@@ -375,7 +376,7 @@ void G4UItcsh::ListMatchedCommand()
|
||||
// list matched dirs/commands
|
||||
ListCommand(vpath, vpath+vcmd);
|
||||
|
||||
G4cout << promptString << commandLine << G4std::flush;
|
||||
G4cout << promptString << commandLine << std::flush;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
@@ -473,7 +474,7 @@ void G4UItcsh::CompleteCommand()
|
||||
for(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(AsciiBS);
|
||||
|
||||
dspstr+= stream;
|
||||
G4cout << dspstr << G4std::flush;
|
||||
G4cout << dspstr << std::flush;
|
||||
|
||||
// command line string
|
||||
input.remove(jt);
|
||||
@@ -597,7 +598,7 @@ G4String G4UItcsh::GetCommandLine(const char* msg)
|
||||
MakePrompt(msg); // update
|
||||
relativeHistoryIndex= 0;
|
||||
|
||||
G4cout << promptString << G4std::flush;
|
||||
G4cout << promptString << std::flush;
|
||||
|
||||
G4String newCommand= ReadLine(); // read line...
|
||||
// multi-line
|
||||
@@ -606,7 +607,7 @@ G4String G4UItcsh::GetCommandLine(const char* msg)
|
||||
newCommand.remove(newCommand.length()-1);
|
||||
G4cout << G4endl;
|
||||
promptString= "? ";
|
||||
G4cout << promptString << G4std::flush;
|
||||
G4cout << promptString << std::flush;
|
||||
G4String newLine= ReadLine();
|
||||
newCommand.append(newLine);
|
||||
}
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIterminal.cc,v 1.17 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIterminal.cc,v 1.19 2003/06/16 16:56:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4UIcommandTree.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
@@ -204,7 +205,7 @@ G4String G4UIterminal::GetCommand(const char* msg)
|
||||
G4String ss= nC(1, nC.length()-1);
|
||||
G4int vl;
|
||||
const char* tt= ss;
|
||||
G4std::istrstream is((char*)tt);
|
||||
std::istrstream is((char*)tt);
|
||||
is >> vl;
|
||||
G4int nh= UI-> GetNumberOfHistory();
|
||||
if(vl>=0 && vl<nh) {
|
||||
@@ -245,7 +246,7 @@ G4String G4UIterminal::GetCommand(const char* msg)
|
||||
G4int G4UIterminal::ReceiveG4cout(G4String coutString)
|
||||
//////////////////////////////////////////////////////
|
||||
{
|
||||
G4std::cout << coutString << G4std::flush;
|
||||
std::cout << coutString << std::flush;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -253,7 +254,7 @@ G4int G4UIterminal::ReceiveG4cout(G4String coutString)
|
||||
G4int G4UIterminal::ReceiveG4cerr(G4String cerrString)
|
||||
//////////////////////////////////////////////////////
|
||||
{
|
||||
G4std::cerr << cerrString << G4std::flush;
|
||||
std::cerr << cerrString << std::flush;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUIshell.cc,v 1.7 2002/04/26 21:28:26 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VUIshell.cc,v 1.8 2003/06/16 16:56:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
@@ -298,7 +298,7 @@ void G4VUIshell::ListCommand(const G4String& dir,
|
||||
// waring : not matched
|
||||
if(!isMatch && candidate.empty())
|
||||
G4cout << "<" << input
|
||||
<< ">: No such directory or command" << G4std::flush;
|
||||
<< ">: No such directory or command" << std::flush;
|
||||
|
||||
// display
|
||||
G4UIArrayString arrayString(stream);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VBasicShell.hh,v 1.6 2001/07/11 10:01:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4VBasicShell_H
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef G4VInteractiveSession_H
|
||||
#define G4VInteractiveSession_H 1
|
||||
|
||||
#include "g4std/map"
|
||||
#include <map>
|
||||
|
||||
#include "G4VInteractorManager.hh"
|
||||
|
||||
@@ -33,25 +33,26 @@ class G4UImessenger;
|
||||
|
||||
// Class description :
|
||||
//
|
||||
// G4VInteractiveSession : a base class to isolate common things
|
||||
// G4VInteractiveSession is a base class to isolate common things
|
||||
// to various graphical "basic" G4UI sessions ; AddMenu, AddButton,
|
||||
// a dictionnary for widgets.
|
||||
// The word "interactor" is for "piece of user interface" or
|
||||
// "widget" (which means nothing).
|
||||
//
|
||||
// Class description - end :
|
||||
// The word "interactor" is for "piece of user interface" or "widget".
|
||||
|
||||
class G4VInteractiveSession
|
||||
{
|
||||
public: //with description
|
||||
|
||||
G4VInteractiveSession();
|
||||
virtual ~G4VInteractiveSession();
|
||||
virtual void AddMenu (const char*,const char*);
|
||||
virtual void AddButton (const char*,const char*,const char*);
|
||||
void AddInteractor(G4String,G4Interactor);
|
||||
G4Interactor GetInteractor(G4String);
|
||||
|
||||
private:
|
||||
|
||||
class G4VInteractiveSession {
|
||||
public:
|
||||
G4VInteractiveSession();
|
||||
virtual ~G4VInteractiveSession();
|
||||
virtual void AddMenu (const char*,const char*);
|
||||
virtual void AddButton (const char*,const char*,const char*);
|
||||
void AddInteractor(G4String,G4Interactor);
|
||||
G4Interactor GetInteractor(G4String);
|
||||
private:
|
||||
G4UImessenger* messenger;
|
||||
typedef G4std::map<G4String,G4Interactor, G4std::less<G4String> > G4interactor_map;
|
||||
typedef std::map<G4String,G4Interactor, std::less<G4String> > G4interactor_map;
|
||||
G4interactor_map interactors;
|
||||
};
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VInteractorManager.hh,v 1.7 2001/07/11 10:01:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VInteractorManager.hh,v 1.8 2003/06/16 16:56:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#define G4VINTERACTORMANAGER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
typedef void* G4Interactor;
|
||||
typedef G4bool (*G4DispatchFunction)(void*);
|
||||
@@ -82,10 +82,10 @@ private:
|
||||
int argc;
|
||||
char** argv;
|
||||
G4Interactor mainInteractor;
|
||||
G4std::vector<G4DispatchFunction> dispatchers;
|
||||
G4std::vector<G4SecondaryLoopAction> preActions;
|
||||
G4std::vector<G4SecondaryLoopAction> postActions;
|
||||
G4std::vector<G4Interactor> shells;
|
||||
std::vector<G4DispatchFunction> dispatchers;
|
||||
std::vector<G4SecondaryLoopAction> preActions;
|
||||
std::vector<G4SecondaryLoopAction> postActions;
|
||||
std::vector<G4Interactor> shells;
|
||||
G4bool secondaryLoopEnabled;
|
||||
G4bool alreadyInSecondaryLoop;
|
||||
int exitSecondaryLoop;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Win32.hh,v 1.6 2001/07/11 10:01:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// To unify Windows message treatment between
|
||||
// G4/interfaces Windows sessions and G4/visualizations Windows drivers.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Xt.hh,v 1.5 2001/07/11 10:01:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// To unify X11 event treatment between
|
||||
// G4/interfaces Xt sessions and G4/visualizations Xt drivers.
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VBasicShell.cc,v 1.9 2002/04/26 21:28:26 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VBasicShell.cc,v 1.10 2003/06/16 16:56:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
#include "G4VBasicShell.hh"
|
||||
#include "G4StateManager.hh"
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcommandStatus.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
G4VBasicShell::G4VBasicShell()
|
||||
:currentDirectory("/")
|
||||
@@ -51,7 +51,7 @@ G4String G4VBasicShell::ModifyToFullPathCommand(const char* aCommandLine)
|
||||
G4String commandString;
|
||||
G4String parameterString;
|
||||
size_t i = commandLine.index(" ");
|
||||
if( i != G4std::string::npos )
|
||||
if( i != std::string::npos )
|
||||
{
|
||||
commandString = (G4String)commandLine(0,i);
|
||||
parameterString = " ";
|
||||
@@ -111,7 +111,7 @@ G4UIcommand* G4VBasicShell::FindCommand(const char* commandName)
|
||||
G4String commandLine = (G4String)rawCommandLine.strip(G4String::both);
|
||||
G4String commandString;
|
||||
size_t i = commandLine.index(" ");
|
||||
if( i != G4std::string::npos )
|
||||
if( i != std::string::npos )
|
||||
{ commandString = (G4String)commandLine(0,i); }
|
||||
else
|
||||
{ commandString = commandLine; }
|
||||
@@ -168,7 +168,7 @@ G4String G4VBasicShell::Complete(G4String commandName)
|
||||
G4String rawCommandLine = commandName;
|
||||
G4String commandLine = rawCommandLine.strip(G4String::both);
|
||||
size_t i = commandLine.index(" ");
|
||||
if( i != G4std::string::npos ) return rawCommandLine; // Already entering parameters,
|
||||
if( i != std::string::npos ) return rawCommandLine; // Already entering parameters,
|
||||
// assume command path is correct.
|
||||
G4String commandString = commandLine;
|
||||
G4String targetCom = ModifyPath(commandString);
|
||||
@@ -186,13 +186,13 @@ G4String G4VBasicShell::FindMatchingPath(
|
||||
G4String empty = "";
|
||||
if(aTree==NULL) return empty;
|
||||
G4String pathName = aTree->GetPathName();
|
||||
if( aCommandPath.index( pathName ) == G4std::string::npos ) return empty;
|
||||
if( aCommandPath.index( pathName ) == std::string::npos ) return empty;
|
||||
G4String remainingPath = aCommandPath;
|
||||
remainingPath.remove(0,pathName.length());
|
||||
size_t i = remainingPath.first('/');
|
||||
if( i == G4std::string::npos ) {
|
||||
if( i == std::string::npos ) {
|
||||
// Look for number of matching commands :
|
||||
G4std::vector<G4UIcommand*> commands;
|
||||
std::vector<G4UIcommand*> commands;
|
||||
G4int n_commandEntry = aTree->GetCommandEntry();
|
||||
for( G4int i_thCommand = 1; i_thCommand <= n_commandEntry; i_thCommand++ ) {
|
||||
G4UIcommand* cmd = aTree->GetCommand(i_thCommand);
|
||||
@@ -212,7 +212,7 @@ G4String G4VBasicShell::FindMatchingPath(
|
||||
return empty;
|
||||
}
|
||||
// Look for sub tree :
|
||||
G4std::vector<G4UIcommandTree*> trees;
|
||||
std::vector<G4UIcommandTree*> trees;
|
||||
G4String nextPath = pathName;
|
||||
nextPath.append(remainingPath);
|
||||
G4int n_treeEntry = aTree->GetTreeEntry();
|
||||
@@ -330,7 +330,7 @@ void G4VBasicShell::ApplyShellCommand (
|
||||
G4String ss = command(1,command.length()-1);
|
||||
G4int vl;
|
||||
const char* tt = ss;
|
||||
G4std::istrstream is((char*)tt);
|
||||
std::istrstream is((char*)tt);
|
||||
is >> vl;
|
||||
G4int nh = UI->GetNumberOfHistory();
|
||||
if(vl>=0 && vl<nh) {
|
||||
@@ -408,7 +408,7 @@ void G4VBasicShell::TerminalHelp(G4String newCommand)
|
||||
if(UI==NULL) return;
|
||||
G4UIcommandTree * treeTop = UI->GetTree();
|
||||
size_t i = newCommand.index(" ");
|
||||
if( i != G4std::string::npos )
|
||||
if( i != std::string::npos )
|
||||
{
|
||||
G4String newValue = newCommand(i+1,newCommand.length()-(i+1));
|
||||
newValue.strip(G4String::both);
|
||||
@@ -442,7 +442,7 @@ void G4VBasicShell::TerminalHelp(G4String newCommand)
|
||||
floor[iFloor]->ListCurrentWithNum();
|
||||
// 1998 Oct 2 non-number input
|
||||
while(1){
|
||||
//G4cout << G4endl << "Type the number ( 0:end, -n:n level back ) : "<<G4std::flush;
|
||||
//G4cout << G4endl << "Type the number ( 0:end, -n:n level back ) : "<<std::flush;
|
||||
G4cout << G4endl << "Type the number ( 0:end, -n:n level back ) : "<<G4endl;
|
||||
G4int i;
|
||||
if(!GetHelpChoice(i)){
|
||||
|
||||
@@ -27,59 +27,38 @@
|
||||
#include "G4VInteractiveSession.hh"
|
||||
|
||||
/***************************************************************************/
|
||||
G4VInteractiveSession::G4VInteractiveSession (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
G4VInteractiveSession::G4VInteractiveSession ()
|
||||
{
|
||||
messenger = new G4InteractorMessenger(this);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
G4VInteractiveSession::~G4VInteractiveSession()
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
delete messenger;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
void G4VInteractiveSession::AddMenu (
|
||||
const char* a_name
|
||||
,const char* a_label
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
void G4VInteractiveSession::AddMenu (const char*,const char*)
|
||||
{
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
void G4VInteractiveSession::AddButton (
|
||||
const char* a_menu
|
||||
,const char* a_label
|
||||
,const char* a_command
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
void G4VInteractiveSession::AddButton (const char*,const char*,const char*)
|
||||
{
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
void G4VInteractiveSession::AddInteractor (
|
||||
G4String a_name
|
||||
,G4Interactor a_interactor
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
void G4VInteractiveSession::AddInteractor (G4String a_name,
|
||||
G4Interactor a_interactor)
|
||||
{
|
||||
interactors[a_name] = a_interactor;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
G4Interactor G4VInteractiveSession::GetInteractor (
|
||||
G4String a_name
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
G4Interactor G4VInteractiveSession::GetInteractor (G4String a_name)
|
||||
{
|
||||
G4interactor_map::iterator it;
|
||||
if((it=interactors.find(a_name))==interactors.end()) return NULL;
|
||||
return (*it).second;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VInteractorManager.cc,v 1.11 2001/12/03 08:07:45 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VInteractorManager.cc,v 1.12 2003/06/16 16:56:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "g4std/algorithm"
|
||||
#include <algorithm>
|
||||
|
||||
#include "G4VInteractorManager.hh"
|
||||
|
||||
@@ -153,7 +153,7 @@ void G4VInteractorManager::AddDispatcher (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
if(a_dispatcher==NULL) return;
|
||||
if(G4std::find(dispatchers.begin(),dispatchers.end(),a_dispatcher)!=dispatchers.end()) return;
|
||||
if(std::find(dispatchers.begin(),dispatchers.end(),a_dispatcher)!=dispatchers.end()) return;
|
||||
dispatchers.push_back(a_dispatcher);
|
||||
}
|
||||
/***************************************************************************/
|
||||
@@ -163,7 +163,7 @@ void G4VInteractorManager::RemoveDispatcher (
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4std::vector<G4DispatchFunction>::iterator it;
|
||||
std::vector<G4DispatchFunction>::iterator it;
|
||||
for (it = dispatchers.begin(); it != dispatchers.end(); it++) {
|
||||
if (*it == a_dispatcher) {
|
||||
dispatchers.erase(it);
|
||||
@@ -195,7 +195,7 @@ void G4VInteractorManager::AddSecondaryLoopPreAction (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
if(a_preAction==NULL) return;
|
||||
if(G4std::find(preActions.begin(),preActions.end(),a_preAction)!=preActions.end()) return;
|
||||
if(std::find(preActions.begin(),preActions.end(),a_preAction)!=preActions.end()) return;
|
||||
preActions.push_back(a_preAction);
|
||||
}
|
||||
/***************************************************************************/
|
||||
@@ -217,7 +217,7 @@ void G4VInteractorManager::AddSecondaryLoopPostAction (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
if(a_postAction==NULL) return;
|
||||
if(G4std::find(postActions.begin(),postActions.end(),a_postAction)!=postActions.end()) return;
|
||||
if(std::find(postActions.begin(),postActions.end(),a_postAction)!=postActions.end()) return;
|
||||
postActions.push_back(a_postAction);
|
||||
}
|
||||
/***************************************************************************/
|
||||
@@ -290,7 +290,7 @@ void G4VInteractorManager::AddShell (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
if(a_shell==NULL) return;
|
||||
if(G4std::find(shells.begin(),shells.end(),a_shell)!=shells.end()) return;
|
||||
if(std::find(shells.begin(),shells.end(),a_shell)!=shells.end()) return;
|
||||
shells.push_back(a_shell);
|
||||
}
|
||||
/***************************************************************************/
|
||||
@@ -300,7 +300,7 @@ void G4VInteractorManager::RemoveShell (
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4std::vector<G4Interactor>::iterator it;
|
||||
std::vector<G4Interactor>::iterator it;
|
||||
for (it = shells.begin(); it != shells.end(); it++) {
|
||||
if (*it == a_shell) {
|
||||
shells.erase(it);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Win32.cc,v 1.6 2001/07/11 10:01:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Xt.cc,v 1.9 2002/11/06 08:12:58 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
|
||||
Reference in New Issue
Block a user