Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4UIbridge Class Reference

#include <G4UIbridge.hh>

Public Member Functions

 G4UIbridge (G4UImanager *localUI, G4String dir)
 
 ~G4UIbridge ()
 
G4int ApplyCommand (const G4String &aCmd)
 
G4UImanagerLocalUI () const
 
G4String DirName () const
 
G4int DirLength () const
 

Detailed Description

Definition at line 59 of file G4UIbridge.hh.

Constructor & Destructor Documentation

G4UIbridge::G4UIbridge ( G4UImanager localUI,
G4String  dir 
)

Definition at line 36 of file G4UIbridge.cc.

References FatalException, G4Exception(), G4UImanager::GetMasterUIpointer(), and G4UImanager::RegisterBridge().

37 : localUImanager(localUI)
38 ////////////////////////////////////////////////////////////////////
39 {
40  // make sure dirName starts and ends with '/'
41  if(dir(0,1)=="/")
42  { dirName = dir; }
43  else
44  { dirName = "/"+dir; }
45  if(dirName(dirName.length()-1,1)!="/")
46  { dirName += "/"; }
47 
48  // register to the master G4UImanager
50  if(masterUI)
51  { masterUI->RegisterBridge(this); }
52  else
53  {
54  G4Exception("G4UIbridge::G4UIbridge()","UI7001",FatalException,
55  "G4UImanager for the master thread is not yet instantiated. Instantiate G4MTRunManager first.");
56  }
57 }
static G4UImanager * GetMasterUIpointer()
Definition: G4UImanager.cc:71
void RegisterBridge(G4UIbridge *brg)
Definition: G4UImanager.cc:689
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4UIbridge::~G4UIbridge ( )

Definition at line 61 of file G4UIbridge.cc.

63 {;}

Member Function Documentation

G4int G4UIbridge::ApplyCommand ( const G4String aCmd)

Definition at line 66 of file G4UIbridge.cc.

References G4UImanager::ApplyCommand().

68 { return localUImanager->ApplyCommand(aCmd); }
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:419
G4int G4UIbridge::DirLength ( ) const
inline

Definition at line 76 of file G4UIbridge.hh.

77  { return dirName.length(); }
G4String G4UIbridge::DirName ( ) const
inline

Definition at line 74 of file G4UIbridge.hh.

75  { return dirName; }
G4UImanager* G4UIbridge::LocalUI ( ) const
inline

Definition at line 72 of file G4UIbridge.hh.

Referenced by G4UImanager::RegisterBridge().

73  { return localUImanager; }

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