Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4UIGAG.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4UIGAG.hh 66892 2013-01-17 10:57:59Z gunter $
28 //
29 // G4UIGAG.hh
30 // GAG(Geant4 adaptive GUI) interface class
31 // 18.Feb.98 Y.Nagamatu and T.Kodama created G4UIGAG from G4UIterminal
32 
33 // If you want to use GAG (Tcl and JAVA version),
34 // read a document file README_Momo.html.
35 
36 #ifndef G4UIGAG_h
37 #define G4UIGAG_h 1
38 
39 #include "G4UIsession.hh"
40 #include "G4UImanager.hh"
41 #include <fstream>
42 #include <vector>
43 
46 
47 // class description:
48 //
49 // This class inherits the class G4UIsession.
50 // This is the class which is the front-end to GAG (Geant4 Adaptive GUI).
51 // Its usage is quite similar to G4UIterminal.
52 
53 class G4UIGAG : public G4UIsession
54 {
55  public: // with description
56  G4UIGAG();
57  ~G4UIGAG();
58 
60 
61  // A GAG session "gagSession" is instantiated.
62  // G4cout stream is redirected by default to the constructed instance.
63  // Usage: G4UIsession * gagSession = new G4UIGAG;
64  // "gagSession" is started.
65  // Usage: gagSession->SessionStart();
66  // "gagSession" is deleted.
67  // Usage: delete gagSession;
68  //
69  void PauseSessionStart(const G4String&);
71  G4int ReceiveG4cerr(const G4String&);
72  // These methods are implementation of the virtual methods of
73  // G4UIsession class.
74  //
75  void SessionTerminate();
76  void Prompt(const G4String&);
78  // These methods are not for users.
79  private:
86 
87  private:
90  void ExecuteCommand(const G4String&);
91  void ChangeDirectory(const G4String&);
92  void ListDirectory(const G4String&);
93  void TerminalHelp(const G4String&);
96  void ShowCurrent(const G4String&);
98 
103  void CodeGenJavaTree(G4UIcommandTree *,int recursiveLevel);
104  void CodeGenJavaParams(G4UIcommandTree *,int recursiveLevel);
105  void CodeGenTclTree(G4UIcommandTree *, int recursiveLevel);
106  void CodeGenTclParams(G4UIcommandTree *, int recursiveLevel);
107  void SendDisableList(G4UIcommandTree *, int recursiveLevel);
108 
109  void NotifyStateChange(void);
110  void NotifyCommandUpdate(void);
112 
113  int CommandUpdated(void);
114  void UpdateState(void);
115  void UpdateParamVal(void); // if param is updated,
116  // call NotifyParameterUpdate()
117 
118  // --- the following are used by Notify*Update() and *Updated()
119  void GetNewTreeStructure( G4UIcommandTree*,int recursiveLevel);
120  void GetNewTreeValues( G4UIcommandTree*,int recursiveLevel);
121 
122  std::vector<G4String> previousTreeCommands;
123  std::vector<G4String> newTreeCommands;
124  std::vector<G4String> previousTreeParams;
125  std::vector<G4String> newTreeParams;
126  std::vector<G4UIcommand*> previousTreePCP;
127  std::vector<G4UIcommand*> newTreePCP;
128 
129 };
130 
131 #endif
G4bool iExit
Definition: G4UIGAG.hh:83
void TerminalHelp(const G4String &)
Definition: G4UIGAG.cc:414
void GetNewTreeStructure(G4UIcommandTree *, int recursiveLevel)
Definition: G4UIGAG.cc:856
void ShowCurrent(const G4String &)
Definition: G4UIGAG.cc:342
void UpdateState(void)
Definition: G4UIGAG.cc:813
UImode
Definition: G4UIGAG.hh:44
G4UIcommandTree * FindDirPath(const G4String &)
Definition: G4UIGAG.cc:515
void SendATclParamProperty(G4UIcommand *)
Definition: G4UIGAG.cc:749
void CodeGenJavaParams(G4UIcommandTree *, int recursiveLevel)
Definition: G4UIGAG.cc:581
G4String GetCommand()
Definition: G4UIGAG.cc:189
void ExecuteCommand(const G4String &)
Definition: G4UIGAG.cc:100
void NotifyCommandUpdate(void)
Definition: G4UIGAG.cc:798
void PauseSessionStart(const G4String &)
Definition: G4UIGAG.cc:87
void NotifyStateChange(void)
Definition: G4UIGAG.cc:784
G4bool iCont
Definition: G4UIGAG.hh:84
void CodeGenTclParams(G4UIcommandTree *, int recursiveLevel)
Definition: G4UIGAG.cc:730
G4int ReceiveG4cerr(const G4String &)
Definition: G4UIGAG.cc:178
void CodeGenTclTree(G4UIcommandTree *, int recursiveLevel)
Definition: G4UIGAG.cc:668
G4UIsession * SessionStart()
Definition: G4UIGAG.cc:72
G4String prefix
Definition: G4UIGAG.hh:80
bool G4bool
Definition: G4Types.hh:79
std::vector< G4String > newTreeParams
Definition: G4UIGAG.hh:125
std::vector< G4String > previousTreeCommands
Definition: G4UIGAG.hh:122
void ListDirectory(const G4String &)
Definition: G4UIGAG.cc:386
G4UImanager * UI
Definition: G4UIGAG.hh:81
void SendCommandProperties(G4UIcommandTree *)
Definition: G4UIGAG.cc:532
void CodeGenJavaTree(G4UIcommandTree *, int recursiveLevel)
Definition: G4UIGAG.cc:563
Definition: G4UIGAG.hh:45
void SendDisableList(G4UIcommandTree *, int recursiveLevel)
Definition: G4UIGAG.cc:645
G4String JVersion
Definition: G4UIGAG.hh:88
void Prompt(const G4String &)
Definition: G4UIGAG.cc:184
G4String GetFullPath(const G4String &)
Definition: G4UIGAG.cc:303
G4int ReceiveG4cout(const G4String &)
Definition: G4UIGAG.cc:172
~G4UIGAG()
Definition: G4UIGAG.cc:62
void SessionTerminate()
Definition: G4UIGAG.cc:337
int G4int
Definition: G4Types.hh:78
void SendParameterProperties(G4UIcommandTree *)
Definition: G4UIGAG.cc:550
G4UIGAG()
Definition: G4UIGAG.cc:39
std::vector< G4String > newTreeCommands
Definition: G4UIGAG.hh:123
G4String ModifyPrefix(G4String)
Definition: G4UIGAG.cc:490
void SendAParamProperty(G4UIcommand *)
Definition: G4UIGAG.cc:604
std::vector< G4UIcommand * > newTreePCP
Definition: G4UIGAG.hh:127
G4String promptCharacter
Definition: G4UIGAG.hh:82
UImode uiMode
Definition: G4UIGAG.hh:85
ChangeOfTree
Definition: G4UIGAG.hh:45
G4String TVersion
Definition: G4UIGAG.hh:89
std::vector< G4String > previousTreeParams
Definition: G4UIGAG.hh:124
int CommandUpdated(void)
Definition: G4UIGAG.cc:826
void GetNewTreeValues(G4UIcommandTree *, int recursiveLevel)
Definition: G4UIGAG.cc:935
void ChangeDirectory(const G4String &)
Definition: G4UIGAG.cc:359
std::vector< G4UIcommand * > previousTreePCP
Definition: G4UIGAG.hh:126
void NotifyParameterUpdate(G4UIcommand *)
Definition: G4UIGAG.cc:804
void UpdateParamVal(void)
Definition: G4UIGAG.cc:883