1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
---|
3 | <title>G4UIterminal.hh Source File</title> |
---|
4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
5 | </head><body> |
---|
6 | <!-- Generated by Doxygen 1.3.4 --> |
---|
7 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div> |
---|
8 | <h1>G4UIterminal.hh</h1><a href="G4UIterminal_8hh.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">//</span> |
---|
9 | 00002 <span class="comment">// ********************************************************************</span> |
---|
10 | 00003 <span class="comment">// * License and Disclaimer *</span> |
---|
11 | 00004 <span class="comment">// * *</span> |
---|
12 | 00005 <span class="comment">// * The Geant4 software is copyright of the Copyright Holders of *</span> |
---|
13 | 00006 <span class="comment">// * the Geant4 Collaboration. It is provided under the terms and *</span> |
---|
14 | 00007 <span class="comment">// * conditions of the Geant4 Software License, included in the file *</span> |
---|
15 | 00008 <span class="comment">// * LICENSE and available at http://cern.ch/geant4/license . These *</span> |
---|
16 | 00009 <span class="comment">// * include a list of copyright holders. *</span> |
---|
17 | 00010 <span class="comment">// * *</span> |
---|
18 | 00011 <span class="comment">// * Neither the authors of this software system, nor their employing *</span> |
---|
19 | 00012 <span class="comment">// * institutes,nor the agencies providing financial support for this *</span> |
---|
20 | 00013 <span class="comment">// * work make any representation or warranty, express or implied, *</span> |
---|
21 | 00014 <span class="comment">// * regarding this software system or assume any liability for its *</span> |
---|
22 | 00015 <span class="comment">// * use. Please see the license in the file LICENSE and URL above *</span> |
---|
23 | 00016 <span class="comment">// * for the full disclaimer and the limitation of liability. *</span> |
---|
24 | 00017 <span class="comment">// * *</span> |
---|
25 | 00018 <span class="comment">// * This code implementation is the result of the scientific and *</span> |
---|
26 | 00019 <span class="comment">// * technical work of the GEANT4 collaboration. *</span> |
---|
27 | 00020 <span class="comment">// * By using, copying, modifying or distributing the software (or *</span> |
---|
28 | 00021 <span class="comment">// * any work based on the software) you agree to acknowledge its *</span> |
---|
29 | 00022 <span class="comment">// * use in resulting scientific publications, and indicate your *</span> |
---|
30 | 00023 <span class="comment">// * acceptance of all terms of the Geant4 Software license. *</span> |
---|
31 | 00024 <span class="comment">// ********************************************************************</span> |
---|
32 | 00025 <span class="comment">//</span> |
---|
33 | 00026 <span class="comment">//</span> |
---|
34 | 00027 <span class="comment">// $Id: G4UIterminal.hh,v 1.9 2006/06/29 19:09:39 gunter Exp $</span> |
---|
35 | 00028 <span class="comment">// GEANT4 tag $Name: geant4-08-01-patch-01 $</span> |
---|
36 | 00029 <span class="comment">//</span> |
---|
37 | 00030 |
---|
38 | 00031 <span class="preprocessor">#ifndef G4UIterminal_h</span> |
---|
39 | 00032 <span class="preprocessor"></span><span class="preprocessor">#define G4UIterminal_h 1</span> |
---|
40 | 00033 <span class="preprocessor"></span> |
---|
41 | 00034 <span class="preprocessor">#include <fstream></span> |
---|
42 | 00035 <span class="preprocessor">#include "G4UImanager.hh"</span> |
---|
43 | 00036 <span class="preprocessor">#include "<a class="code" href="G4VBasicShell_8hh.html">G4VBasicShell.hh</a>"</span> |
---|
44 | 00037 <span class="preprocessor">#include "<a class="code" href="G4VUIshell_8hh.html">G4VUIshell.hh</a>"</span> |
---|
45 | 00038 |
---|
46 | 00039 <span class="comment">//</span> |
---|
47 | 00040 <span class="comment">// Description:</span> |
---|
48 | 00041 <span class="comment">//</span> |
---|
49 | 00042 <span class="comment">// This class inherits the class G4UIsession.</span> |
---|
50 | 00043 <span class="comment">// This is the class to use a character-terminal sesion.</span> |
---|
51 | 00044 <span class="comment">//</span> |
---|
52 | 00045 <span class="comment">// Usage: </span> |
---|
53 | 00046 <span class="comment">// G4UIsession* terminalSession = new G4UIterminal; </span> |
---|
54 | 00047 <span class="comment">// or G4UIsession* terminalSession = new G4UIterminal(new your-shell); </span> |
---|
55 | 00048 <span class="comment">//</span> |
---|
56 | 00049 <span class="comment">// A character-terminal session "terminalSession" is instantiated.</span> |
---|
57 | 00050 <span class="comment">// G4cout stream is redirected by default to the constructed instance.</span> |
---|
58 | 00051 <span class="comment">//</span> |
---|
59 | 00052 <span class="comment">// terminalSession-> SessionStart(); // "terminalSession" is started.</span> |
---|
60 | 00053 <span class="comment">// delete terminalSession; // "terminalSession" is deleted.</span> |
---|
61 | 00054 <span class="comment">//</span> |
---|
62 | 00055 <span class="comment">//</span> |
---|
63 | 00056 <span class="comment">// In default(no arguments are given), csh-like shell is instantiated.</span> |
---|
64 | 00057 <span class="comment">// If you want to use another shell (e.g. tcsh-like), you can give</span> |
---|
65 | 00058 <span class="comment">// your favorite shell in an argument of the constructor.</span> |
---|
66 | 00059 <span class="comment">//</span> |
---|
67 | 00060 <span class="comment">// Which shell? / How to define your own shell?</span> |
---|
68 | 00061 <span class="comment">// Currently two kinds of shells,</span> |
---|
69 | 00062 <span class="comment">// G4UIcsh / G4UItcsh</span> |
---|
70 | 00063 <span class="comment">// , are presented. </span> |
---|
71 | 00064 <span class="comment">// They inherit the abstract base class, G4VUIshell.</span> |
---|
72 | 00065 <span class="comment">// In order to define your own shell, </span> |
---|
73 | 00066 <span class="comment">// - Define your own shell class derived from G4VUIshell.</span> |
---|
74 | 00067 <span class="comment">// - Implement GetCommandLine() method (pure virtual).</span> |
---|
75 | 00068 <span class="comment">// - Add more functionality, if need.</span> |
---|
76 | 00069 <span class="comment">//</span> |
---|
77 | 00070 <span class="comment">// For more detail, see source codes.</span> |
---|
78 | 00071 <span class="comment">//</span> |
---|
79 | 00072 |
---|
80 | <a name="l00073"></a><a class="code" href="classG4UIterminal.html">00073</a> <span class="keyword">class </span><a class="code" href="classG4UIterminal.html">G4UIterminal</a> : <span class="keyword">public</span> <a class="code" href="classG4VBasicShell.html">G4VBasicShell</a> { |
---|
81 | 00074 <span class="keyword">private</span>: |
---|
82 | <a name="l00075"></a><a class="code" href="classG4UIterminal.html#r0">00075</a> G4UImanager* <a class="code" href="classG4UIterminal.html#r0">UI</a>; |
---|
83 | 00076 <span class="comment">// shell</span> |
---|
84 | <a name="l00077"></a><a class="code" href="classG4UIterminal.html#r1">00077</a> <a class="code" href="classG4VUIshell.html">G4VUIshell</a>* <a class="code" href="classG4UIterminal.html#r1">shell</a>; |
---|
85 | 00078 |
---|
86 | 00079 <span class="comment">// program states</span> |
---|
87 | <a name="l00080"></a><a class="code" href="classG4UIterminal.html#r2">00080</a> G4bool <a class="code" href="classG4UIterminal.html#r2">iExit</a>; |
---|
88 | <a name="l00081"></a><a class="code" href="classG4UIterminal.html#r3">00081</a> G4bool <a class="code" href="classG4UIterminal.html#r3">iCont</a>; |
---|
89 | 00082 |
---|
90 | 00083 <span class="keyword">public</span>: |
---|
91 | 00084 <a class="code" href="classG4UIterminal.html#a0">G4UIterminal</a>(<a class="code" href="classG4VUIshell.html">G4VUIshell</a>* aShell=0); |
---|
92 | 00085 <a class="code" href="classG4UIterminal.html#a1">~G4UIterminal</a>(); |
---|
93 | 00086 |
---|
94 | 00087 <span class="keywordtype">void</span> <a class="code" href="classG4UIterminal.html#a2">SetPrompt</a>(<span class="keyword">const</span> G4String& prompt); |
---|
95 | 00088 |
---|
96 | 00089 <span class="keyword">private</span>: |
---|
97 | 00090 <span class="keywordtype">void</span> <a class="code" href="classG4UIterminal.html#d0">ExecuteCommand</a>(G4String aCommand); |
---|
98 | 00091 G4String <a class="code" href="classG4UIterminal.html#d1">GetCommand</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* msg=0); |
---|
99 | 00092 G4bool <a class="code" href="classG4UIterminal.html#d2">GetHelpChoice</a>(G4int& aInt); |
---|
100 | 00093 <span class="keywordtype">void</span> <a class="code" href="classG4UIterminal.html#d3">ExitHelp</a>(); |
---|
101 | 00094 |
---|
102 | 00095 <span class="keyword">public</span>: |
---|
103 | 00096 <span class="comment">// These methods are implementation of corresponding virtual methods</span> |
---|
104 | 00097 <span class="comment">// of G4UIsession class.</span> |
---|
105 | 00098 <span class="keyword">virtual</span> G4UIsession* <a class="code" href="classG4UIterminal.html#a3">SessionStart</a>(); |
---|
106 | 00099 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classG4UIterminal.html#a4">PauseSessionStart</a>(G4String msg); |
---|
107 | 00100 <span class="keyword">virtual</span> G4int <a class="code" href="classG4UIterminal.html#a5">ReceiveG4cout</a>(G4String coutString); |
---|
108 | 00101 <span class="keyword">virtual</span> G4int <a class="code" href="classG4UIterminal.html#a6">ReceiveG4cerr</a>(G4String cerrString); |
---|
109 | 00102 |
---|
110 | 00103 }; |
---|
111 | 00104 |
---|
112 | 00105 <span class="preprocessor">#endif</span> |
---|
113 | 00106 <span class="preprocessor"></span> |
---|
114 | </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:07:02 2007 by |
---|
115 | <a href="http://www.doxygen.org/index.html"> |
---|
116 | <img src="doxygen.png" alt="doxygen" align="middle" border=0 > |
---|
117 | </a>1.3.4 </small></address> |
---|
118 | </body> |
---|
119 | </html> |
---|