ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VBasicShell Class Referenceabstract

#include <geant4/tree/geant4-10.6-release/source/interfaces/common/include/G4VBasicShell.hh>

+ Inheritance diagram for G4VBasicShell:
+ Collaboration diagram for G4VBasicShell:

Public Member Functions

 G4VBasicShell ()
 
virtual ~G4VBasicShell ()
 
virtual G4UIsessionSessionStart ()=0
 
virtual void PauseSessionStart (const G4String &Prompt)=0
 
- Public Member Functions inherited from G4UIsession
 G4UIsession ()
 
 G4UIsession (G4int iBatch)
 
virtual ~G4UIsession ()
 
virtual G4int ReceiveG4cout (const G4String &coutString)
 
virtual G4int ReceiveG4cerr (const G4String &cerrString)
 
G4int GetLastReturnCode () const
 
- Public Member Functions inherited from G4coutDestination
 G4coutDestination ()=default
 
virtual ~G4coutDestination ()
 
void AddCoutTransformer (const Transformer &t)
 
void AddCoutTransformer (Transformer &&t)
 
void AddCerrTransformer (const Transformer &t)
 
void AddCerrTransformer (Transformer &&t)
 
virtual void ResetTransformers ()
 
G4int ReceiveG4cout_ (const G4String &msg)
 
G4int ReceiveG4cerr_ (const G4String &msg)
 

Protected Member Functions

G4String ModifyToFullPathCommand (const char *aCommandLine) const
 
G4String GetCurrentWorkingDirectory () const
 
G4bool ChangeDirectory (const char *newDir)
 
G4UIcommandTreeFindDirectory (const char *dirName) const
 
G4UIcommandFindCommand (const char *commandName) const
 
G4String Complete (const G4String &)
 
G4String FindMatchingPath (G4UIcommandTree *, const G4String &)
 
virtual void ExecuteCommand (const G4String &)
 
virtual G4bool GetHelpChoice (G4int &)=0
 
virtual void ExitHelp () const =0
 
void ApplyShellCommand (const G4String &, G4bool &, G4bool &)
 
void ShowCurrent (const G4String &) const
 
void ChangeDirectoryCommand (const G4String &)
 
void ListDirectory (const G4String &) const
 
void TerminalHelp (const G4String &)
 

Private Member Functions

G4String ModifyPath (const G4String &tempPath) const
 

Private Attributes

G4String currentDirectory
 

Additional Inherited Members

- Public Types inherited from G4coutDestination
using Transformer = std::function< G4bool(G4String &)>
 
- Static Public Member Functions inherited from G4UIsession
static G4int InSession ()
 
- Protected Attributes inherited from G4UIsession
G4int ifBatch
 
G4int lastRC
 
- Static Protected Attributes inherited from G4UIsession
static G4ICOMS_DLL G4int inSession = 0
 

Detailed Description

Definition at line 51 of file G4VBasicShell.hh.

View newest version in sPHENIX GitHub at line 51 of file G4VBasicShell.hh

Constructor & Destructor Documentation

G4VBasicShell::G4VBasicShell ( )

Definition at line 38 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 38 of file G4VBasicShell.cc

G4VBasicShell::~G4VBasicShell ( )
virtual

Definition at line 43 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 43 of file G4VBasicShell.cc

Member Function Documentation

void G4VBasicShell::ApplyShellCommand ( const G4String a_string,
G4bool exitSession,
G4bool exitPause 
)
protected

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 231 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 231 of file G4VBasicShell.cc

References ChangeDirectoryCommand(), ExecuteCommand(), G4cerr, G4cout, G4endl, GetCurrentWorkingDirectory(), G4UImanager::GetNumberOfHistory(), G4UImanager::GetPreviousCommand(), G4UImanager::GetUIpointer(), G4String::leading, ListDirectory(), ModifyToFullPathCommand(), ShowCurrent(), G4String::strip(), and TerminalHelp().

+ Here is the call graph for this function:

G4bool G4VBasicShell::ChangeDirectory ( const char *  newDir)
protected

Definition at line 74 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 74 of file G4VBasicShell.cc

References G4String::both, currentDirectory, FindDirectory(), ModifyPath(), and G4String::strip().

Referenced by ChangeDirectoryCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VBasicShell::ChangeDirectoryCommand ( const G4String newCommand)
protected

Definition at line 325 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 325 of file G4VBasicShell.cc

References G4String::both, ChangeDirectory(), G4cout, G4endl, and G4String::strip().

Referenced by ApplyShellCommand(), G4MPIsession::GetCommand(), G4ZMQServer::GetCommand(), and G4UIterminal::GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4VBasicShell::Complete ( const G4String commandName)
protected

Definition at line 180 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 180 of file G4VBasicShell.cc

References G4String::both, FindMatchingPath(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), G4String::index(), ModifyPath(), G4String::strip(), and gammaraytel::tree.

+ Here is the call graph for this function:

void G4VBasicShell::ExecuteCommand ( const G4String aCommand)
protectedvirtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Reimplemented in G4UIGainServer, G4UIterminal, and G4ZMQServer.

Definition at line 205 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 205 of file G4VBasicShell.cc

References G4UImanager::ApplyCommand(), fCommandNotFound, fCommandSucceeded, fIllegalApplicationState, fParameterOutOfCandidates, fParameterOutOfRange, fParameterUnreadable, G4cerr, G4endl, and G4UImanager::GetUIpointer().

Referenced by ApplyShellCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void G4VBasicShell::ExitHelp ( ) const
protectedpure virtual

Implemented in G4UIGainServer, G4UIterminal, G4VMPIsession, and G4ZMQServer.

Referenced by TerminalHelp().

+ Here is the caller graph for this function:

G4UIcommand * G4VBasicShell::FindCommand ( const char *  commandName) const
protected

Definition at line 109 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 109 of file G4VBasicShell.cc

References G4String::both, G4UIcommandTree::FindPath(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), G4String::index(), ModifyPath(), and G4String::strip().

Referenced by G4VMPIsession::ExecCommand(), G4ZMQServer::ExecuteCommand(), and G4UIterminal::ExecuteCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4UIcommandTree * G4VBasicShell::FindDirectory ( const char *  dirName) const
protected

Definition at line 87 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 87 of file G4VBasicShell.cc

References G4String::both, G4UIcommandTree::GetTree(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), incremental_prev_tag::idx, G4String::index(), ModifyPath(), and G4String::strip().

Referenced by ChangeDirectory(), ListDirectory(), and G4ZMQServer::SessionStart().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4VBasicShell::FindMatchingPath ( G4UIcommandTree aTree,
const G4String aCommandPath 
)
protected

Definition at line 195 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 195 of file G4VBasicShell.cc

Referenced by Complete().

+ Here is the caller graph for this function:

G4String G4VBasicShell::GetCurrentWorkingDirectory ( ) const
protected

Definition at line 69 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 69 of file G4VBasicShell.cc

References currentDirectory.

Referenced by ApplyShellCommand(), G4MPIsession::GetCommand(), G4ZMQServer::GetCommand(), G4UIterminal::GetCommand(), ListDirectory(), G4ZMQServer::SessionStart(), and TerminalHelp().

+ Here is the caller graph for this function:

virtual G4bool G4VBasicShell::GetHelpChoice ( G4int )
protectedpure virtual

Implemented in G4UIGainServer, G4UIterminal, G4VMPIsession, and G4ZMQServer.

Referenced by TerminalHelp().

+ Here is the caller graph for this function:

void G4VBasicShell::ListDirectory ( const G4String newCommand) const
protected

Definition at line 339 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 339 of file G4VBasicShell.cc

References G4String::both, FindDirectory(), G4cout, G4endl, GetCurrentWorkingDirectory(), G4UIcommandTree::ListCurrent(), and G4String::strip().

Referenced by ApplyShellCommand(), G4MPIsession::GetCommand(), G4ZMQServer::GetCommand(), and G4UIterminal::GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4VBasicShell::ModifyPath ( const G4String tempPath) const
private

Definition at line 124 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 124 of file G4VBasicShell.cc

References currentDirectory, and incremental_prev_tag::idx.

Referenced by ChangeDirectory(), Complete(), FindCommand(), FindDirectory(), and ModifyToFullPathCommand().

+ Here is the caller graph for this function:

G4String G4VBasicShell::ModifyToFullPathCommand ( const char *  aCommandLine) const
protected

Definition at line 47 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 47 of file G4VBasicShell.cc

References G4String::both, G4String::index(), G4String::isNull(), ModifyPath(), and G4String::strip().

Referenced by ApplyShellCommand(), G4MPIsession::GetCommand(), G4ZMQServer::GetCommand(), G4UIterminal::GetCommand(), ShowCurrent(), and TerminalHelp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void G4VBasicShell::PauseSessionStart ( const G4String Prompt)
pure virtual

Reimplemented from G4UIsession.

Implemented in G4UIGainServer, G4UIterminal, G4ZMQServer, and G4VMPIsession.

virtual G4UIsession* G4VBasicShell::SessionStart ( )
pure virtual

Reimplemented from G4UIsession.

Implemented in G4UIGainServer, G4UIterminal, G4ZMQServer, G4MPIsession, and G4MPIbatch.

void G4VBasicShell::ShowCurrent ( const G4String newCommand) const
protected

Definition at line 313 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 313 of file G4VBasicShell.cc

References G4cout, G4endl, G4UImanager::GetCurrentValues(), G4UImanager::GetUIpointer(), G4String::isNull(), and ModifyToFullPathCommand().

Referenced by ApplyShellCommand(), G4MPIsession::GetCommand(), G4ZMQServer::GetCommand(), and G4UIterminal::GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VBasicShell::TerminalHelp ( const G4String newCommand)
protected

Definition at line 355 of file G4VBasicShell.cc.

View newest version in sPHENIX GitHub at line 355 of file G4VBasicShell.cc

References G4String::both, ExitHelp(), G4UIcommandTree::FindPath(), G4cout, G4endl, G4UIcommandTree::GetCommand(), GetCurrentWorkingDirectory(), GetHelpChoice(), G4UIcommandTree::GetTree(), G4UImanager::GetTree(), G4UIcommandTree::GetTreeEntry(), G4UImanager::GetUIpointer(), G4String::index(), G4UIcommand::List(), G4UIcommandTree::ListCurrentWithNum(), ModifyToFullPathCommand(), and G4String::strip().

Referenced by ApplyShellCommand(), G4MPIsession::GetCommand(), G4ZMQServer::GetCommand(), and G4UIterminal::GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

G4String G4VBasicShell::currentDirectory
private

Definition at line 101 of file G4VBasicShell.hh.

View newest version in sPHENIX GitHub at line 101 of file G4VBasicShell.hh

Referenced by ChangeDirectory(), GetCurrentWorkingDirectory(), and ModifyPath().


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