Geant4  10.00.p02
G4UIGainServer Class Reference

#include <G4UIGainServer.hh>

+ Inheritance diagram for G4UIGainServer:
+ Collaboration diagram for G4UIGainServer:

Public Member Functions

G4UIsessionSessionStart ()
 
virtual void PauseSessionStart (const G4String &msg)
 
virtual G4int ReceiveG4cout (const G4String &coutString)
 
virtual G4int ReceiveG4cerr (const G4String &cerrString)
 
 G4UIGainServer ()
 
 ~G4UIGainServer ()
 
void SessionTerminate ()
 
void Prompt (G4String)
 
G4String GetCommand ()
 
- Public Member Functions inherited from G4VBasicShell
 G4VBasicShell ()
 
virtual ~G4VBasicShell ()
 
- Public Member Functions inherited from G4UIsession
 G4UIsession ()
 
virtual ~G4UIsession ()
 
- Public Member Functions inherited from G4coutDestination
 G4coutDestination ()
 
virtual ~G4coutDestination ()
 

Private Member Functions

void GetNewTreeStructure (G4UIcommandTree *, int recursiveLevel)
 
void GetNewTreeValues (G4UIcommandTree *, int recursiveLevel)
 
virtual void ExecuteCommand (const G4String &aCommand)
 
virtual G4bool GetHelpChoice (G4int &aInt)
 
virtual void ExitHelp () const
 
bool SetUPServer ()
 
void WaitingConnection ()
 
void CloseConnection ()
 
void ChangeDirectory (G4String)
 
void ListDirectory (G4String)
 
void TerminalHelp (G4String)
 
G4String ModifyPrefix (G4String)
 
G4UIcommandTreeFindDirPath (G4String)
 
void ShowCurrent (G4String)
 
G4String GetFullPath (G4String)
 
void SendCommandProperties (G4UIcommandTree *)
 
void SendParameterProperties (G4UIcommandTree *)
 
void SendAParamProperty (G4UIcommand *)
 
void SendATclParamProperty (G4UIcommand *)
 
void CodeGenJavaTree (G4UIcommandTree *, int recursiveLevel)
 
void CodeGenJavaParams (G4UIcommandTree *, int recursiveLevel)
 
void CodeGenTclTree (G4UIcommandTree *, int recursiveLevel)
 
void CodeGenTclParams (G4UIcommandTree *, int recursiveLevel)
 
void SendDisableList (G4UIcommandTree *, int recursiveLevel)
 
void NotifyStateChange (void)
 
void NotifyCommandUpdate (void)
 
void NotifyParameterUpdate (G4UIcommand *)
 
int CommandUpdated (void)
 
void UpdateState (void)
 
void UpdateParamVal (void)
 

Private Attributes

G4String prefix
 
G4String promptCharacter
 
G4UImanagerUI
 
UImode uiMode
 
G4String JVersion
 
G4String TVersion
 
G4bool iExit
 
G4bool iCont
 
int socketD [3]
 
int port
 
struct sockaddr_in saddr
 
struct sockaddr_in caddr
 
int len
 
int ret
 
char buf [1024]
 
std::vector< G4StringpreviousTreeCommands
 
std::vector< G4StringnewTreeCommands
 
std::vector< G4StringpreviousTreeParams
 
std::vector< G4StringnewTreeParams
 
std::vector< G4UIcommand * > previousTreePCP
 
std::vector< G4UIcommand * > newTreePCP
 

Additional Inherited Members

- Protected Member Functions inherited from G4VBasicShell
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 &)
 
void ApplyShellCommand (const G4String &, G4bool &, G4bool &)
 
void ShowCurrent (const G4String &) const
 
void ChangeDirectoryCommand (const G4String &)
 
void ListDirectory (const G4String &) const
 
void TerminalHelp (const G4String &)
 

Detailed Description

Definition at line 64 of file G4UIGainServer.hh.

Constructor & Destructor Documentation

G4UIGainServer::G4UIGainServer ( )
G4UIGainServer::~G4UIGainServer ( )

Definition at line 77 of file G4UIGainServer.cc.

References G4UImanager::GetUIpointer(), G4UImanager::SetCoutDestination(), G4UImanager::SetSession(), and UI.

+ Here is the call graph for this function:

Member Function Documentation

void G4UIGainServer::ChangeDirectory ( G4String  newCommand)
private

Definition at line 476 of file G4UIGainServer.cc.

References G4String::both, FindDirPath(), G4cout, G4endl, ModifyPrefix(), prefix, and G4String::strip().

Referenced by GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::CloseConnection ( )
private
void G4UIGainServer::CodeGenJavaParams ( G4UIcommandTree tree,
int  recursiveLevel 
)
private

Definition at line 690 of file G4UIGainServer.cc.

References G4cout, G4endl, G4UIcommandTree::GetCommand(), G4UIcommandTree::GetCommandEntry(), G4UIcommandTree::GetPathName(), G4UIcommandTree::GetTitle(), G4UIcommandTree::GetTree(), G4UIcommandTree::GetTreeEntry(), and SendAParamProperty().

Referenced by SendCommandProperties(), and SendParameterProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::CodeGenJavaTree ( G4UIcommandTree tree,
int  recursiveLevel 
)
private

Definition at line 671 of file G4UIGainServer.cc.

References G4cout, G4endl, G4UIcommandTree::GetCommand(), G4UIcommandTree::GetCommandEntry(), G4UIcommand::GetCommandPath(), G4UIcommandTree::GetTree(), and G4UIcommandTree::GetTreeEntry().

Referenced by SendCommandProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::CodeGenTclParams ( G4UIcommandTree ,
int  recursiveLevel 
)
private
void G4UIGainServer::CodeGenTclTree ( G4UIcommandTree ,
int  recursiveLevel 
)
private
int G4UIGainServer::CommandUpdated ( void  )
private

Definition at line 827 of file G4UIGainServer.cc.

References added, addedAndDeleted, deleted, G4cout, G4endl, newTreeCommands, notChanged, and previousTreeCommands.

Referenced by ExecuteCommand().

+ Here is the caller graph for this function:

void G4UIGainServer::ExecuteCommand ( const G4String aCommand)
privatevirtual

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

Reimplemented from G4VBasicShell.

Definition at line 131 of file G4UIGainServer.cc.

References G4UImanager::ApplyCommand(), CommandUpdated(), fAliasNotFound, fCommandNotFound, fCommandSucceeded, fIllegalApplicationState, fParameterOutOfCandidates, fParameterOutOfRange, fParameterUnreadable, G4cerr, G4cout, G4endl, GetNewTreeStructure(), GetNewTreeValues(), G4UImanager::GetTree(), newTreeCommands, newTreeParams, newTreePCP, NotifyCommandUpdate(), previousTreeCommands, previousTreeParams, previousTreePCP, G4UImanager::SolveAlias(), terminal_mode, UI, uiMode, UpdateParamVal(), and UpdateState().

Referenced by PauseSessionStart(), and SessionStart().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::ExitHelp ( ) const
privatevirtual

Implements G4VBasicShell.

Definition at line 353 of file G4UIGainServer.cc.

References G4cin.

G4UIcommandTree * G4UIGainServer::FindDirPath ( G4String  newCommand)
private

Definition at line 626 of file G4UIGainServer.cc.

References G4UIcommandTree::GetTree(), G4UImanager::GetTree(), G4String::index(), and UI.

Referenced by ChangeDirectory(), and ListDirectory().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4UIGainServer::GetCommand ( )

Definition at line 183 of file G4UIGainServer.cc.

References G4String::append(), buf, ChangeDirectory(), G4cerr, G4cin, G4cout, G4endl, GetFullPath(), G4UImanager::GetNumberOfHistory(), G4UImanager::GetPreviousCommand(), G4UImanager::GetTree(), iCont, iExit, java_mode, JVersion, G4String::leading, ListDirectory(), NotifyStateChange(), promptCharacter, G4String::readLine(), G4String::remove(), SendCommandProperties(), ShowCurrent(), socketD, G4String::strip(), tcl_mode, terminal_mode, TerminalHelp(), TVersion, UI, and uiMode.

Referenced by PauseSessionStart(), and SessionStart().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4UIGainServer::GetFullPath ( G4String  aNewCommand)
private

Definition at line 418 of file G4UIGainServer.cc.

References G4String::append(), G4String::both, ModifyPrefix(), prefix, and G4String::strip().

Referenced by GetCommand(), and ShowCurrent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4UIGainServer::GetHelpChoice ( G4int aInt)
privatevirtual

Implements G4VBasicShell.

Definition at line 340 of file G4UIGainServer.cc.

References FALSE, G4cin, and TRUE.

void G4UIGainServer::GetNewTreeStructure ( G4UIcommandTree tree,
int  recursiveLevel 
)
private

Definition at line 858 of file G4UIGainServer.cc.

References G4UIcommandTree::GetCommand(), G4UIcommandTree::GetCommandEntry(), G4UIcommand::GetCommandPath(), G4UIcommandTree::GetPathName(), G4UIcommandTree::GetTitle(), G4UIcommand::GetTitle(), G4UIcommandTree::GetTree(), G4UIcommandTree::GetTreeEntry(), and newTreeCommands.

Referenced by ExecuteCommand(), and G4UIGainServer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::GetNewTreeValues ( G4UIcommandTree tree,
int  recursiveLevel 
)
private

Definition at line 907 of file G4UIGainServer.cc.

References G4UIcommandTree::GetCommand(), G4UIcommandTree::GetCommandEntry(), G4UIcommand::GetCommandPath(), G4UIparameter::GetDefaultValue(), G4UIcommand::GetParameter(), G4UIparameter::GetParameterCandidates(), G4UIcommand::GetParameterEntries(), G4UIparameter::GetParameterName(), G4UIparameter::GetParameterRange(), G4UIparameter::GetParameterType(), G4UIcommandTree::GetTree(), G4UIcommandTree::GetTreeEntry(), newTreeParams, and newTreePCP.

Referenced by ExecuteCommand(), and G4UIGainServer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::ListDirectory ( G4String  newCommand)
private

Definition at line 503 of file G4UIGainServer.cc.

References G4String::both, FindDirPath(), G4cout, G4endl, G4UIcommandTree::ListCurrent(), ModifyPrefix(), prefix, and G4String::strip().

Referenced by GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4UIGainServer::ModifyPrefix ( G4String  newCommand)
private

Definition at line 603 of file G4UIGainServer.cc.

References G4String::last(), and prefix.

Referenced by ChangeDirectory(), GetFullPath(), and ListDirectory().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::NotifyCommandUpdate ( void  )
private

Definition at line 812 of file G4UIGainServer.cc.

References G4UImanager::GetTree(), SendCommandProperties(), and UI.

Referenced by ExecuteCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::NotifyParameterUpdate ( G4UIcommand com)
private

Definition at line 820 of file G4UIGainServer.cc.

References SendAParamProperty().

Referenced by UpdateParamVal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::NotifyStateChange ( void  )
private

Definition at line 796 of file G4UIGainServer.cc.

References G4cout, G4endl, G4StateManager::GetCurrentState(), G4StateManager::GetStateManager(), G4StateManager::GetStateString(), G4UImanager::GetTree(), SendDisableList(), terminal_mode, UI, and uiMode.

Referenced by GetCommand(), and UpdateState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::PauseSessionStart ( const G4String msg)
virtual

Implements G4VBasicShell.

Definition at line 113 of file G4UIGainServer.cc.

References buf, ExecuteCommand(), G4cout, G4endl, GetCommand(), iCont, promptCharacter, socketD, and TRUE.

+ Here is the call graph for this function:

void G4UIGainServer::Prompt ( G4String  )
G4int G4UIGainServer::ReceiveG4cerr ( const G4String cerrString)
virtual

Reimplemented from G4UIsession.

Definition at line 327 of file G4UIGainServer.cc.

References socketD.

G4int G4UIGainServer::ReceiveG4cout ( const G4String coutString)
virtual

Reimplemented from G4UIsession.

Definition at line 314 of file G4UIGainServer.cc.

References socketD.

void G4UIGainServer::SendAParamProperty ( G4UIcommand Comp)
private

Definition at line 713 of file G4UIGainServer.cc.

References G4String::append(), G4cout, G4endl, G4UIcommand::GetCommandPath(), G4UIparameter::GetDefaultValue(), G4UIcommand::GetGuidanceEntries(), G4UIcommand::GetGuidanceLine(), G4UIcommand::GetParameter(), G4UIparameter::GetParameterCandidates(), G4UIcommand::GetParameterEntries(), G4UIparameter::GetParameterGuidance(), G4UIparameter::GetParameterName(), G4UIparameter::GetParameterRange(), G4UIparameter::GetParameterType(), G4UIcommand::GetRange(), and G4UIparameter::IsOmittable().

Referenced by CodeGenJavaParams(), and NotifyParameterUpdate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::SendATclParamProperty ( G4UIcommand )
private
void G4UIGainServer::SendCommandProperties ( G4UIcommandTree tree)
private

Definition at line 644 of file G4UIGainServer.cc.

References CodeGenJavaParams(), CodeGenJavaTree(), G4cerr, G4cout, G4endl, java_mode, and uiMode.

Referenced by GetCommand(), and NotifyCommandUpdate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::SendDisableList ( G4UIcommandTree tree,
int  recursiveLevel 
)
private

Definition at line 755 of file G4UIGainServer.cc.

References G4cout, G4endl, G4UIcommandTree::GetCommand(), G4UIcommandTree::GetCommandEntry(), G4UIcommand::GetCommandPath(), G4UIcommandTree::GetTree(), G4UIcommandTree::GetTreeEntry(), and G4UIcommand::IsAvailable().

Referenced by NotifyStateChange().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::SendParameterProperties ( G4UIcommandTree tree)
private

Definition at line 659 of file G4UIGainServer.cc.

References CodeGenJavaParams(), G4cerr, G4endl, java_mode, and uiMode.

+ Here is the call graph for this function:

G4UIsession * G4UIGainServer::SessionStart ( )
virtual

Implements G4VBasicShell.

Definition at line 94 of file G4UIGainServer.cc.

References ExecuteCommand(), GetCommand(), G4StateManager::GetCurrentState(), G4StateManager::GetStateManager(), G4StateManager::GetStateString(), iExit, promptCharacter, TRUE, and WaitingConnection().

+ Here is the call graph for this function:

void G4UIGainServer::SessionTerminate ( )

Definition at line 451 of file G4UIGainServer.cc.

References G4cout, and G4endl.

bool G4UIGainServer::SetUPServer ( )
private

Definition at line 361 of file G4UIGainServer.cc.

References G4cout, G4endl, port, saddr, SOCK_NAME, and socketD.

Referenced by G4UIGainServer().

+ Here is the caller graph for this function:

void G4UIGainServer::ShowCurrent ( G4String  newCommand)
private

Definition at line 458 of file G4UIGainServer.cc.

References G4cout, G4endl, G4UImanager::GetCurrentValues(), GetFullPath(), G4String::isNull(), terminal_mode, UI, and uiMode.

Referenced by GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::TerminalHelp ( G4String  newCommand)
private

Definition at line 532 of file G4UIGainServer.cc.

References G4String::both, G4UIcommandTree::FindPath(), G4cin, G4cout, G4endl, G4UIcommandTree::GetCommand(), G4UIcommandTree::GetTree(), G4UImanager::GetTree(), G4UIcommandTree::GetTreeEntry(), G4String::index(), G4UIcommand::List(), G4UIcommandTree::ListCurrentWithNum(), prefix, G4String::prepend(), G4String::strip(), and UI.

Referenced by GetCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::UpdateParamVal ( void  )
private

Definition at line 886 of file G4UIGainServer.cc.

References G4cout, G4endl, G4UIcommand::GetCommandPath(), newTreeParams, newTreePCP, NotifyParameterUpdate(), and previousTreeParams.

Referenced by ExecuteCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::UpdateState ( void  )
private

Definition at line 781 of file G4UIGainServer.cc.

References G4State_PreInit, G4ThreadLocal, G4StateManager::GetCurrentState(), G4StateManager::GetStateManager(), and NotifyStateChange().

Referenced by ExecuteCommand().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4UIGainServer::WaitingConnection ( )
private

Definition at line 396 of file G4UIGainServer.cc.

References caddr, FatalException, G4cerr, G4endl, G4Exception(), len, and socketD.

Referenced by SessionStart().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

char G4UIGainServer::buf[1024]
private

Definition at line 87 of file G4UIGainServer.hh.

Referenced by GetCommand(), and PauseSessionStart().

struct sockaddr_in G4UIGainServer::caddr
private

Definition at line 84 of file G4UIGainServer.hh.

Referenced by WaitingConnection().

G4bool G4UIGainServer::iCont
private

Definition at line 78 of file G4UIGainServer.hh.

Referenced by G4UIGainServer(), GetCommand(), and PauseSessionStart().

G4bool G4UIGainServer::iExit
private

Definition at line 77 of file G4UIGainServer.hh.

Referenced by G4UIGainServer(), GetCommand(), and SessionStart().

G4String G4UIGainServer::JVersion
private

Definition at line 70 of file G4UIGainServer.hh.

Referenced by G4UIGainServer(), and GetCommand().

int G4UIGainServer::len
private

Definition at line 85 of file G4UIGainServer.hh.

Referenced by WaitingConnection().

std::vector<G4String> G4UIGainServer::newTreeCommands
private
std::vector<G4String> G4UIGainServer::newTreeParams
private

Definition at line 96 of file G4UIGainServer.hh.

Referenced by ExecuteCommand(), G4UIGainServer(), GetNewTreeValues(), and UpdateParamVal().

std::vector<G4UIcommand*> G4UIGainServer::newTreePCP
private

Definition at line 98 of file G4UIGainServer.hh.

Referenced by ExecuteCommand(), G4UIGainServer(), GetNewTreeValues(), and UpdateParamVal().

int G4UIGainServer::port
private

Definition at line 82 of file G4UIGainServer.hh.

Referenced by G4UIGainServer(), and SetUPServer().

G4String G4UIGainServer::prefix
private
std::vector<G4String> G4UIGainServer::previousTreeCommands
private

Definition at line 93 of file G4UIGainServer.hh.

Referenced by CommandUpdated(), ExecuteCommand(), and G4UIGainServer().

std::vector<G4String> G4UIGainServer::previousTreeParams
private

Definition at line 95 of file G4UIGainServer.hh.

Referenced by ExecuteCommand(), G4UIGainServer(), and UpdateParamVal().

std::vector<G4UIcommand*> G4UIGainServer::previousTreePCP
private

Definition at line 97 of file G4UIGainServer.hh.

Referenced by ExecuteCommand(), and G4UIGainServer().

G4String G4UIGainServer::promptCharacter
private

Definition at line 67 of file G4UIGainServer.hh.

Referenced by G4UIGainServer(), GetCommand(), PauseSessionStart(), and SessionStart().

int G4UIGainServer::ret
private

Definition at line 86 of file G4UIGainServer.hh.

struct sockaddr_in G4UIGainServer::saddr
private

Definition at line 83 of file G4UIGainServer.hh.

Referenced by SetUPServer().

int G4UIGainServer::socketD[3]
private
G4String G4UIGainServer::TVersion
private

Definition at line 71 of file G4UIGainServer.hh.

Referenced by G4UIGainServer(), and GetCommand().


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