#include <G4VBasicShell.hh>
Definition at line 52 of file G4VBasicShell.hh.
 
      
        
          | G4VBasicShell::G4VBasicShell  | 
          ( | 
           | ) | 
           | 
        
      
 
 
  
  
      
        
          | G4VBasicShell::~G4VBasicShell  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
Definition at line 232 of file G4VBasicShell.cc.
  244   if( command(0) == 
'#' ) {
 
  248   } 
else if( command == 
"ls" || command(0,3) == 
"ls " ) {
 
  252   } 
else if( command == 
"pwd" ) {
 
  254     G4cout << 
"Current Working Directory : " 
  257   } 
else if( command == 
"cd" || command(0,3) == 
"cd ") {
 
  261   } 
else if( command == 
"help" || command(0,5) == 
"help ") {
 
  265   } 
else if( command(0) == 
'?' ) {
 
  269   } 
else if( command == 
"hist" || command == 
"history") {
 
  272     for(
G4int i=0;i<nh;i++) {
 
  276   } 
else if( command(0) == 
'!' ) {
 
  278     G4String ss = command(1,command.length()-1);
 
  281     std::istringstream is(tt);
 
  289       G4cerr << 
"history " << vl << 
" is not found." << 
G4endl;
 
  292   } 
else if( command == 
"exit" ) {
 
  294     if( exitPause == 
false) { 
 
  296       G4cout << 
"Please abort it using \"/run/abort\" command first" << 
G4endl;
 
  297       G4cout << 
" and use \"continue\" command until the application" << 
G4endl;
 
  303   } 
else if( command == 
"cont" || command == 
"continue"){
 
G4int GetNumberOfHistory() const 
 
G4String GetPreviousCommand(G4int i) const 
 
void ChangeDirectoryCommand(const G4String &)
 
void TerminalHelp(const G4String &)
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
static G4UImanager * GetUIpointer()
 
G4GLOB_DLL std::ostream G4cout
 
virtual void ExecuteCommand(const G4String &)
 
G4String ModifyToFullPathCommand(const char *aCommandLine) const 
 
void ShowCurrent(const G4String &) const 
 
void ListDirectory(const G4String &) const 
 
G4String GetCurrentWorkingDirectory() const 
 
G4GLOB_DLL std::ostream G4cerr
 
 
 
 
  
  
      
        
          | G4bool G4VBasicShell::ChangeDirectory  | 
          ( | 
          const char *  | 
          newDir | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 75 of file G4VBasicShell.cc.
   79   G4String newDirectory = ModifyPath( newPrefix );
 
   80   if( newDirectory( newDirectory.length() - 1 ) != 
'/' )
 
   81   { newDirectory += 
"/"; }
 
   84   currentDirectory = newDirectory;
 
G4UIcommandTree * FindDirectory(const char *dirName) const 
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
 
 
 
  
  
      
        
          | void G4VBasicShell::ChangeDirectoryCommand  | 
          ( | 
          const G4String &  | 
          newCommand | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 326 of file G4VBasicShell.cc.
  329   if( newCommand.length() <= 3 ) {
 
  332     G4String aNewPrefix = newCommand.substr(3, newCommand.length()-3);
 
  336     G4cout << 
"directory <" << prefix << 
"> not found." << 
G4endl;
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
G4GLOB_DLL std::ostream G4cout
 
G4bool ChangeDirectory(const char *newDir)
 
 
 
 
Definition at line 181 of file G4VBasicShell.cc.
  183   G4String rawCommandLine = commandName;
 
  185   size_t i = commandLine.
index(
" ");
 
  186   if( i != std::string::npos ) 
return rawCommandLine; 
 
  188   G4String commandString = commandLine;
 
  189   G4String targetCom = ModifyPath(commandString);
 
  192   if(value==
"") 
return rawCommandLine;
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
G4String FindMatchingPath(G4UIcommandTree *, const G4String &)
 
static G4UImanager * GetUIpointer()
 
str_size index(const char *, G4int pos=0) const 
 
const XML_Char int const XML_Char * value
 
G4UIcommandTree * GetTree() const 
 
 
 
 
  
  
      
        
          | void G4VBasicShell::ExecuteCommand  | 
          ( | 
          const G4String &  | 
          aCommand | ) | 
           | 
         
       
   | 
  
protectedvirtual   | 
  
 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
Definition at line 206 of file G4VBasicShell.cc.
  211   if(aCommand.length()<2) 
return;
 
  215   switch(commandStatus) {
 
  219     G4cerr << 
"command not found: " << 
"\"" << aCommand << 
"\"" << 
G4endl;
 
  222     G4cerr << 
"illegal application state -- command refused:" << 
"\"" << aCommand << 
"\"" << 
G4endl;
 
  228     G4cerr << 
"command refused (" << commandStatus << 
"):" << 
"\"" << aCommand << 
"\"" << 
G4endl;
 
static G4UImanager * GetUIpointer()
 
G4int ApplyCommand(const char *aCommand)
 
G4GLOB_DLL std::ostream G4cerr
 
 
 
 
  
  
      
        
          | virtual void G4VBasicShell::ExitHelp  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
protectedpure virtual   | 
  
 
 
  
  
      
        
          | G4UIcommand * G4VBasicShell::FindCommand  | 
          ( | 
          const char *  | 
          commandName | ) | 
           const | 
         
       
   | 
  
protected   | 
  
 
Definition at line 110 of file G4VBasicShell.cc.
  112   G4String rawCommandLine = commandName;
 
  115   size_t i = commandLine.
index(
" ");
 
  116   if( i != std::string::npos )
 
  117   { commandString = commandLine(0,i); }
 
  119   { commandString = commandLine; }
 
  121   G4String targetCom = ModifyPath(commandString);
 
G4UIcommand * FindPath(const char *commandPath) const 
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
static G4UImanager * GetUIpointer()
 
str_size index(const char *, G4int pos=0) const 
 
G4UIcommandTree * GetTree() const 
 
 
 
 
  
  
      
        
          | G4UIcommandTree * G4VBasicShell::FindDirectory  | 
          ( | 
          const char *  | 
          dirName | ) | 
           const | 
         
       
   | 
  
protected   | 
  
 
Definition at line 88 of file G4VBasicShell.cc.
   92   G4String targetDir = ModifyPath( theDir );
 
   93   if( targetDir( targetDir.length()-1 ) != 
'/' )
 
   96   if( targetDir == 
"/" )
 
   99   while( idx < targetDir.length()-1 )
 
  101     size_t i = targetDir.
index(
"/",idx);
 
  102     comTree = comTree->
GetTree(targetDir.substr(0,i+1).c_str());
 
  103     if( comTree == NULL )
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
static G4UImanager * GetUIpointer()
 
str_size index(const char *, G4int pos=0) const 
 
G4UIcommandTree * GetTree(G4int i)
 
G4UIcommandTree * GetTree() const 
 
 
 
 
Definition at line 196 of file G4VBasicShell.cc.
  199   return aTree-> CompleteCommandPath(aCommandPath);
 
 
 
 
  
  
      
        
          | G4String G4VBasicShell::GetCurrentWorkingDirectory  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | virtual G4bool G4VBasicShell::GetHelpChoice  | 
          ( | 
          G4int &  | 
           | ) | 
           | 
         
       
   | 
  
protectedpure virtual   | 
  
 
 
  
  
      
        
          | void G4VBasicShell::ListDirectory  | 
          ( | 
          const G4String &  | 
          newCommand | ) | 
           const | 
         
       
   | 
  
protected   | 
  
 
Definition at line 340 of file G4VBasicShell.cc.
  343   if( newCommand.length() <= 3 ) {
 
  346     G4String newPrefix = newCommand.substr(3, newCommand.length()-3);
 
  350   if( commandTree == NULL ) {
 
  351     G4cout << 
"Directory <" << targetDir << 
"> is not found." << 
G4endl;
 
G4UIcommandTree * FindDirectory(const char *dirName) const 
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
G4GLOB_DLL std::ostream G4cout
 
G4String GetCurrentWorkingDirectory() const 
 
 
 
 
  
  
      
        
          | G4String G4VBasicShell::ModifyToFullPathCommand  | 
          ( | 
          const char *  | 
          aCommandLine | ) | 
           const | 
         
       
   | 
  
protected   | 
  
 
Definition at line 48 of file G4VBasicShell.cc.
   50   G4String rawCommandLine = aCommandLine;
 
   51   if(rawCommandLine.
isNull()||rawCommandLine(0)==
'\0') 
return rawCommandLine;
 
   55   size_t i = commandLine.
index(
" ");
 
   56   if( i != std::string::npos )
 
   58     commandString = commandLine(0,i);
 
   59     parameterString = 
" ";
 
   60     parameterString += commandLine(i+1,commandLine.length()-(i+1));
 
   63   { commandString = commandLine; }
 
   66     = ModifyPath( commandString )+parameterString;
 
   67   return fullPathCommandLine;
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
str_size index(const char *, G4int pos=0) const 
 
 
 
 
  
  
      
        
          | virtual void G4VBasicShell::PauseSessionStart  | 
          ( | 
          const G4String &  | 
          Prompt | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | void G4VBasicShell::ShowCurrent  | 
          ( | 
          const G4String &  | 
          newCommand | ) | 
           const | 
         
       
   | 
  
protected   | 
  
 
Definition at line 314 of file G4VBasicShell.cc.
  318   G4String comString = newCommand.substr(1,newCommand.length()-1);
 
  322     G4cout << 
"Current value(s) of the parameter(s) : " << curV << 
G4endl;
 
static G4UImanager * GetUIpointer()
 
G4GLOB_DLL std::ostream G4cout
 
G4String GetCurrentValues(const char *aCommand)
 
G4String ModifyToFullPathCommand(const char *aCommandLine) const 
 
 
 
 
  
  
      
        
          | void G4VBasicShell::TerminalHelp  | 
          ( | 
          const G4String &  | 
          newCommand | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 356 of file G4VBasicShell.cc.
  361   size_t i = newCommand.
index(
" ");
 
  362   if( i != std::string::npos )
 
  364     G4String newValue = newCommand.substr(i+1, newCommand.length()-(i+1));
 
  368     if( theCommand != NULL )
 
  375       G4cout << 
"Command <" << newValue << 
" is not found." << 
G4endl;
 
  383   size_t prefixIndex = 1;
 
  385   while( prefixIndex < prefix.length()-1 )
 
  387     size_t ii = prefix.
index(
"/",prefixIndex);
 
  400       G4cout << G4endl << 
"Not a number, once more" << 
G4endl;
 
  403       if( iFloor < (
size_t)-j ) iFloor = 0;
 
  415         if( j <= n_tree + floor[iFloor]->GetCommandEntry() )
 
  422         floor[iFloor+1] = floor[iFloor]->
GetTree(j);
 
virtual G4bool GetHelpChoice(G4int &)=0
 
virtual void ExitHelp() const =0
 
G4UIcommand * FindPath(const char *commandPath) const 
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
G4UIcommand * GetCommand(G4int i)
 
G4int GetTreeEntry() const 
 
static G4UImanager * GetUIpointer()
 
G4GLOB_DLL std::ostream G4cout
 
str_size index(const char *, G4int pos=0) const 
 
G4UIcommandTree * GetTree(G4int i)
 
void ListCurrentWithNum() const 
 
G4String ModifyToFullPathCommand(const char *aCommandLine) const 
 
G4UIcommandTree * GetTree() const 
 
G4String GetCurrentWorkingDirectory() const 
 
 
 
 
The documentation for this class was generated from the following files: