source: trunk/geant4/interfaces/html/classG4UIterminal.html@ 571

Last change on this file since 571 was 571, checked in by garnier, 18 years ago

r581@mac-90108: laurentgarnier | 2007-08-17 17:30:26 +0200
deplacement de frame

  • Property svn:mime-type set to text/html
File size: 38.5 KB
Line 
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 class Reference</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&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8<h1>G4UIterminal Class Reference</h1><code>#include &lt;<a class="el" href="G4UIterminal_8hh-source.html">G4UIterminal.hh</a>&gt;</code>
9<p>
10Inheritance diagram for G4UIterminal:<p><center><img src="classG4UIterminal__inherit__graph.png" border="0" usemap="#G4UIterminal__inherit__map" alt="Inheritance graph"></center>
11<map name="G4UIterminal__inherit__map">
12<area href="classG4VBasicShell.html" shape="rect" coords="8,8,218,392" alt="">
13</map>
14<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for G4UIterminal:<p><center><img src="classG4UIterminal__coll__graph.png" border="0" usemap="#G4UIterminal__coll__map" alt="Collaboration graph"></center>
15<map name="G4UIterminal__coll__map">
16<area href="classG4VBasicShell.html" shape="rect" coords="8,8,218,392" alt="">
17<area href="classG4VUIshell.html" shape="rect" coords="242,24,434,376" alt="">
18</map>
19<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classG4UIterminal-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
20<tr><td></td></tr>
21<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
22<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#a0">G4UIterminal</a> (<a class="el" href="classG4VUIshell.html">G4VUIshell</a> *aShell=0)</td></tr>
23
24<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#a1">~G4UIterminal</a> ()</td></tr>
25
26<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#a2">SetPrompt</a> (const G4String &amp;prompt)</td></tr>
27
28<tr><td class="memItemLeft" nowrap align=right valign=top>virtual G4UIsession *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#a3">SessionStart</a> ()</td></tr>
29
30<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#a4">PauseSessionStart</a> (G4String msg)</td></tr>
31
32<tr><td class="memItemLeft" nowrap align=right valign=top>virtual G4int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#a5">ReceiveG4cout</a> (G4String coutString)</td></tr>
33
34<tr><td class="memItemLeft" nowrap align=right valign=top>virtual G4int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#a6">ReceiveG4cerr</a> (G4String cerrString)</td></tr>
35
36<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
37<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#d0">ExecuteCommand</a> (G4String aCommand)</td></tr>
38
39<tr><td class="memItemLeft" nowrap align=right valign=top>G4String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#d1">GetCommand</a> (const char *msg=0)</td></tr>
40
41<tr><td class="memItemLeft" nowrap align=right valign=top>G4bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#d2">GetHelpChoice</a> (G4int &amp;aInt)</td></tr>
42
43<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#d3">ExitHelp</a> ()</td></tr>
44
45<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
46<tr><td class="memItemLeft" nowrap align=right valign=top>G4UImanager *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#r0">UI</a></td></tr>
47
48<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classG4VUIshell.html">G4VUIshell</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#r1">shell</a></td></tr>
49
50<tr><td class="memItemLeft" nowrap align=right valign=top>G4bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#r2">iExit</a></td></tr>
51
52<tr><td class="memItemLeft" nowrap align=right valign=top>G4bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIterminal.html#r3">iCont</a></td></tr>
53
54</table>
55<hr><h2>Constructor &amp; Destructor Documentation</h2>
56<a class="anchor" name="a0" doxytag="G4UIterminal::G4UIterminal" ></a><p>
57<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
58 <tr>
59 <td class="mdRow">
60 <table cellpadding="0" cellspacing="0" border="0">
61 <tr>
62 <td class="md" nowrap valign="top"> G4UIterminal::G4UIterminal </td>
63 <td class="md" valign="top">(&nbsp;</td>
64 <td class="md" nowrap valign="top"><a class="el" href="classG4VUIshell.html">G4VUIshell</a> *&nbsp;</td>
65 <td class="mdname1" valign="top" nowrap> <em>aShell</em> = 0 </td>
66 <td class="md" valign="top">&nbsp;)&nbsp;</td>
67 <td class="md" nowrap></td>
68 </tr>
69
70 </table>
71 </td>
72 </tr>
73</table>
74<table cellspacing=5 cellpadding=0 border=0>
75 <tr>
76 <td>
77 &nbsp;
78 </td>
79 <td>
80
81<p>
82
83<p>
84Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00042">42</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
85<p>
86References <a class="el" href="G4UIterminal_8hh-source.html#l00081">iCont</a>, <a class="el" href="G4UIterminal_8hh-source.html#l00080">iExit</a>, <a class="el" href="G4UIterminal_8hh-source.html#l00077">shell</a>, and <a class="el" href="G4UIterminal_8hh-source.html#l00075">UI</a>.
87<p>
88<div class="fragment"><pre>00044 {
8900045 <a class="code" href="classG4UIterminal.html#r0">UI</a>= G4UImanager::GetUIpointer();
9000046 <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; SetSession(<span class="keyword">this</span>);
9100047 <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; SetCoutDestination(<span class="keyword">this</span>);
9200048
9300049 <a class="code" href="classG4UIterminal.html#r2">iExit</a>= FALSE;
9400050 <a class="code" href="classG4UIterminal.html#r3">iCont</a>= FALSE;
9500051
9600052 <span class="keywordflow">if</span>(aShell) <a class="code" href="classG4UIterminal.html#r1">shell</a>= aShell;
9700053 <span class="keywordflow">else</span> <a class="code" href="classG4UIterminal.html#r1">shell</a>= <span class="keyword">new</span> <a class="code" href="classG4UIcsh.html">G4UIcsh</a>;
9800054 }
99</pre></div> </td>
100 </tr>
101</table>
102<a class="anchor" name="a1" doxytag="G4UIterminal::~G4UIterminal" ></a><p>
103<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
104 <tr>
105 <td class="mdRow">
106 <table cellpadding="0" cellspacing="0" border="0">
107 <tr>
108 <td class="md" nowrap valign="top"> G4UIterminal::~<a class="el" href="classG4UIterminal.html">G4UIterminal</a> </td>
109 <td class="md" valign="top">(&nbsp;</td>
110 <td class="mdname1" valign="top" nowrap> </td>
111 <td class="md" valign="top">&nbsp;)&nbsp;</td>
112 <td class="md" nowrap></td>
113 </tr>
114
115 </table>
116 </td>
117 </tr>
118</table>
119<table cellspacing=5 cellpadding=0 border=0>
120 <tr>
121 <td>
122 &nbsp;
123 </td>
124 <td>
125
126<p>
127
128<p>
129Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00057">57</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
130<p>
131References <a class="el" href="G4UIterminal_8hh-source.html#l00077">shell</a>, and <a class="el" href="G4UIterminal_8hh-source.html#l00075">UI</a>.
132<p>
133<div class="fragment"><pre>00059 {
13400060 <span class="keywordflow">if</span>(<a class="code" href="classG4UIterminal.html#r1">shell</a>) <span class="keyword">delete</span> <a class="code" href="classG4UIterminal.html#r1">shell</a>;
13500061
13600062 <span class="keywordflow">if</span>(G4UImanager::GetUIpointer()) {
13700063 <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; SetSession(NULL);
13800064 <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; SetCoutDestination(NULL);
13900065 }
14000066 }
141</pre></div> </td>
142 </tr>
143</table>
144<hr><h2>Member Function Documentation</h2>
145<a class="anchor" name="d0" doxytag="G4UIterminal::ExecuteCommand" ></a><p>
146<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
147 <tr>
148 <td class="mdRow">
149 <table cellpadding="0" cellspacing="0" border="0">
150 <tr>
151 <td class="md" nowrap valign="top"> void G4UIterminal::ExecuteCommand </td>
152 <td class="md" valign="top">(&nbsp;</td>
153 <td class="md" nowrap valign="top">G4String&nbsp;</td>
154 <td class="mdname1" valign="top" nowrap> <em>aCommand</em> </td>
155 <td class="md" valign="top">&nbsp;)&nbsp;</td>
156 <td class="md" nowrap><code> [private, virtual]</code></td>
157 </tr>
158
159 </table>
160 </td>
161 </tr>
162</table>
163<table cellspacing=5 cellpadding=0 border=0>
164 <tr>
165 <td>
166 &nbsp;
167 </td>
168 <td>
169
170<p>
171!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
172<p>
173Reimplemented from <a class="el" href="classG4VBasicShell.html#b7">G4VBasicShell</a>.
174<p>
175Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00104">104</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
176<p>
177References <a class="el" href="G4VBasicShell_8cc-source.html#l00110">G4VBasicShell::FindCommand()</a>, and <a class="el" href="G4UIterminal_8hh-source.html#l00075">UI</a>.
178<p>
179Referenced by <a class="el" href="G4UIterminal_8cc-source.html#l00091">PauseSessionStart()</a>, and <a class="el" href="G4UIterminal_8cc-source.html#l00077">SessionStart()</a>.
180<p>
181<div class="fragment"><pre>00106 {
18200107 <span class="keywordflow">if</span>(aCommand.length()&lt;2) <span class="keywordflow">return</span>;
18300108
18400109 G4int returnVal = <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; ApplyCommand(aCommand);
18500110
18600111 G4int paramIndex = returnVal % 100;
18700112 <span class="comment">// 0 - 98 : paramIndex-th parameter is invalid</span>
18800113 <span class="comment">// 99 : convination of parameters is invalid</span>
18900114 G4int commandStatus = returnVal - paramIndex;
19000115
19100116 G4UIcommand* cmd = 0;
19200117 <span class="keywordflow">if</span>(commandStatus!=fCommandSucceeded)
19300118 { cmd = <a class="code" href="classG4VBasicShell.html#b4">FindCommand</a>(aCommand); }
19400119
19500120 <span class="keywordflow">switch</span>(commandStatus) {
19600121 <span class="keywordflow">case</span> fCommandSucceeded:
19700122 <span class="keywordflow">break</span>;
19800123 <span class="keywordflow">case</span> fCommandNotFound:
19900124 G4cerr &lt;&lt; <span class="stringliteral">"command &lt;"</span> &lt;&lt; <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt;SolveAlias(aCommand) &lt;&lt; <span class="stringliteral">"&gt; not found"</span> &lt;&lt; G4endl;
20000125 <span class="keywordflow">if</span>( aCommand.index(<span class="stringliteral">"@@"</span>) != G4String::npos) {
20100126 G4cout &lt;&lt; <span class="stringliteral">"@@G4UIterminal"</span> &lt;&lt; G4endl;
20200127 }
20300128 <span class="keywordflow">break</span>;
20400129 <span class="keywordflow">case</span> fIllegalApplicationState:
20500130 G4cerr &lt;&lt; <span class="stringliteral">"illegal application state -- command refused"</span> &lt;&lt; G4endl;
20600131 <span class="keywordflow">break</span>;
20700132 <span class="keywordflow">case</span> fParameterOutOfRange:
20800133 <span class="comment">// if(paramIndex&lt;99) {</span>
20900134 <span class="comment">// G4cerr &lt;&lt; "Parameter is out of range (index " &lt;&lt; paramIndex &lt;&lt; ")" &lt;&lt; G4endl;</span>
21000135 <span class="comment">// G4cerr &lt;&lt; "Allowed range : " &lt;&lt; cmd-&gt;GetParameter(paramIndex)-&gt;GetParameterRange() &lt;&lt; G4endl;</span>
21100136 <span class="comment">// } else {</span>
21200137 <span class="comment">// G4cerr &lt;&lt; "Parameter is out of range" &lt;&lt; G4endl;</span>
21300138 <span class="comment">// G4cerr &lt;&lt; "Allowed range : " &lt;&lt; cmd-&gt;GetRange() &lt;&lt; G4endl;</span>
21400139 <span class="comment">// }</span>
21500140 <span class="keywordflow">break</span>;
21600141 <span class="keywordflow">case</span> fParameterOutOfCandidates:
21700142 G4cerr &lt;&lt; <span class="stringliteral">"Parameter is out of candidate list (index "</span> &lt;&lt; paramIndex &lt;&lt; <span class="stringliteral">")"</span> &lt;&lt; G4endl;
21800143 G4cerr &lt;&lt; <span class="stringliteral">"Candidates : "</span> &lt;&lt; cmd-&gt;GetParameter(paramIndex)-&gt;GetParameterCandidates() &lt;&lt; G4endl;
21900144 <span class="keywordflow">break</span>;
22000145 <span class="keywordflow">case</span> fParameterUnreadable:
22100146 G4cerr &lt;&lt; <span class="stringliteral">"Parameter is wrong type and/or is not omittable (index "</span> &lt;&lt; paramIndex &lt;&lt; <span class="stringliteral">")"</span> &lt;&lt; G4endl;
22200147 <span class="keywordflow">break</span>;
22300148 <span class="keywordflow">case</span> fAliasNotFound:
22400149 <span class="keywordflow">default</span>:
22500150 G4cerr &lt;&lt; <span class="stringliteral">"command refused ("</span> &lt;&lt; commandStatus &lt;&lt; <span class="stringliteral">")"</span> &lt;&lt; G4endl;
22600151 }
22700152 }
228</pre></div> </td>
229 </tr>
230</table>
231
232<p>
233Here is the call graph for this function:<p><center><img src="classG4UIterminal_d0_cgraph.png" border="0" usemap="#classG4UIterminal_d0_cgraph_map" alt=""></center>
234<map name="classG4UIterminal_d0_cgraph_map">
235<area href="classG4VBasicShell.html#b4" shape="rect" coords="274,8,480,34" alt="">
236<area href="classG4VBasicShell.html#d0" shape="rect" coords="529,8,713,34" alt="">
237</map>
238<a class="anchor" name="d3" doxytag="G4UIterminal::ExitHelp" ></a><p>
239<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
240 <tr>
241 <td class="mdRow">
242 <table cellpadding="0" cellspacing="0" border="0">
243 <tr>
244 <td class="md" nowrap valign="top"> void G4UIterminal::ExitHelp </td>
245 <td class="md" valign="top">(&nbsp;</td>
246 <td class="mdname1" valign="top" nowrap> </td>
247 <td class="md" valign="top">&nbsp;)&nbsp;</td>
248 <td class="md" nowrap><code> [private, virtual]</code></td>
249 </tr>
250
251 </table>
252 </td>
253 </tr>
254</table>
255<table cellspacing=5 cellpadding=0 border=0>
256 <tr>
257 <td>
258 &nbsp;
259 </td>
260 <td>
261
262<p>
263
264<p>
265Implements <a class="el" href="classG4VBasicShell.html#b9">G4VBasicShell</a>.
266<p>
267Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00279">279</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
268<p>
269<div class="fragment"><pre>00281 {
27000282 <span class="keywordtype">char</span> temp[100];
27100283 G4cin.getline(temp, 100);
27200284 }
273</pre></div> </td>
274 </tr>
275</table>
276<a class="anchor" name="d1" doxytag="G4UIterminal::GetCommand" ></a><p>
277<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
278 <tr>
279 <td class="mdRow">
280 <table cellpadding="0" cellspacing="0" border="0">
281 <tr>
282 <td class="md" nowrap valign="top"> G4String G4UIterminal::GetCommand </td>
283 <td class="md" valign="top">(&nbsp;</td>
284 <td class="md" nowrap valign="top">const char *&nbsp;</td>
285 <td class="mdname1" valign="top" nowrap> <em>msg</em> = 0 </td>
286 <td class="md" valign="top">&nbsp;)&nbsp;</td>
287 <td class="md" nowrap><code> [private]</code></td>
288 </tr>
289
290 </table>
291 </td>
292 </tr>
293</table>
294<table cellspacing=5 cellpadding=0 border=0>
295 <tr>
296 <td>
297 &nbsp;
298 </td>
299 <td>
300
301<p>
302
303<p>
304Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00155">155</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
305<p>
306References <a class="el" href="G4VBasicShell_8cc-source.html#l00378">G4VBasicShell::ChangeDirectoryCommand()</a>, <a class="el" href="G4VBasicShell_8cc-source.html#l00070">G4VBasicShell::GetCurrentWorkingDirectory()</a>, <a class="el" href="G4UIterminal_8hh-source.html#l00081">iCont</a>, <a class="el" href="G4UIterminal_8hh-source.html#l00080">iExit</a>, <a class="el" href="G4VBasicShell_8cc-source.html#l00391">G4VBasicShell::ListDirectory()</a>, <a class="el" href="G4VBasicShell_8cc-source.html#l00048">G4VBasicShell::ModifyToFullPathCommand()</a>, <a class="el" href="G4UIterminal_8hh-source.html#l00077">shell</a>, <a class="el" href="G4VBasicShell_8cc-source.html#l00367">G4VBasicShell::ShowCurrent()</a>, <a class="el" href="G4VBasicShell_8cc-source.html#l00407">G4VBasicShell::TerminalHelp()</a>, and <a class="el" href="G4UIterminal_8hh-source.html#l00075">UI</a>.
307<p>
308Referenced by <a class="el" href="G4UIterminal_8cc-source.html#l00091">PauseSessionStart()</a>, and <a class="el" href="G4UIterminal_8cc-source.html#l00077">SessionStart()</a>.
309<p>
310<div class="fragment"><pre>00157 {
31100158 G4String newCommand;
31200159 G4String nullString;
31300160
31400161 newCommand= <a class="code" href="classG4UIterminal.html#r1">shell</a>-&gt; GetCommandLine(msg);
31500162
31600163 G4String nC= newCommand.strip(G4String::leading);
31700164 <span class="keywordflow">if</span>( nC.length() == 0 ) {
31800165 newCommand= nullString;
31900166
32000167 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( nC(0) == <span class="charliteral">'#'</span> ) {
32100168 G4cout &lt;&lt; nC &lt;&lt; G4endl;
32200169 newCommand= nullString;
32300170
32400171 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC==<span class="stringliteral">"ls"</span> || nC(0,3)==<span class="stringliteral">"ls "</span> ) { <span class="comment">// list commands</span>
32500172 <a class="code" href="classG4VBasicShell.html#b13">ListDirectory</a>(nC);
32600173 newCommand= nullString;
32700174
32800175 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC==<span class="stringliteral">"lc"</span> || nC(0,3)==<span class="stringliteral">"lc "</span> ) { <span class="comment">// ... by shell</span>
32900176 <a class="code" href="classG4UIterminal.html#r1">shell</a>-&gt; ListCommand(nC.remove(0,2));
33000177 newCommand= nullString;
33100178
33200179 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC == <span class="stringliteral">"pwd"</span>) { <span class="comment">// show current directory</span>
33300180 G4cout &lt;&lt; <span class="stringliteral">"Current Command Directory : "</span>
33400181 &lt;&lt; <a class="code" href="classG4VBasicShell.html#b1">GetCurrentWorkingDirectory</a>() &lt;&lt; G4endl;
33500182 newCommand= nullString;
33600183
33700184 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC == <span class="stringliteral">"cwd"</span>) { <span class="comment">// ... by shell</span>
33800185 <a class="code" href="classG4UIterminal.html#r1">shell</a>-&gt; ShowCurrentDirectory();
33900186 newCommand= nullString;
34000187
34100188 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC == <span class="stringliteral">"cd"</span> || nC(0,3) == <span class="stringliteral">"cd "</span>) { <span class="comment">// "cd"</span>
34200189 <a class="code" href="classG4VBasicShell.html#b12">ChangeDirectoryCommand</a>(nC);
34300190 <a class="code" href="classG4UIterminal.html#r1">shell</a>-&gt; SetCurrentDirectory(<a class="code" href="classG4VBasicShell.html#b1">GetCurrentWorkingDirectory</a>());
34400191 newCommand= nullString;
34500192
34600193 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC == <span class="stringliteral">"help"</span> || nC(0,5) == <span class="stringliteral">"help "</span>) { <span class="comment">// "help"</span>
34700194 <a class="code" href="classG4VBasicShell.html#b14">TerminalHelp</a>(nC);
34800195 newCommand= nullString;
34900196
35000197 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC(0) == <span class="charliteral">'?'</span>) { <span class="comment">// "show current value of a parameter"</span>
35100198 <a class="code" href="classG4VBasicShell.html#b11">ShowCurrent</a>(nC);
35200199 newCommand= nullString;
35300200
35400201 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC == <span class="stringliteral">"hist"</span> || nC == <span class="stringliteral">"history"</span>) { <span class="comment">// "hist/history"</span>
35500202 G4int nh= <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; GetNumberOfHistory();
35600203 <span class="keywordflow">for</span> (G4int i=0; i&lt;nh; i++) {
35700204 G4cout &lt;&lt; i &lt;&lt; <span class="stringliteral">": "</span> &lt;&lt; <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt;GetPreviousCommand(i) &lt;&lt; G4endl;
35800205 }
35900206 newCommand= nullString;
36000207
36100208 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC(0) == <span class="charliteral">'!'</span>) { <span class="comment">// "!"</span>
36200209 G4String ss= nC(1, nC.length()-1);
36300210 G4int vl;
36400211 <span class="keyword">const</span> <span class="keywordtype">char</span>* tt= ss;
36500212 std::istringstream is(tt);
36600213 is &gt;&gt; vl;
36700214 G4int nh= <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; GetNumberOfHistory();
36800215 <span class="keywordflow">if</span>(vl&gt;=0 &amp;&amp; vl&lt;nh) {
36900216 newCommand= <a class="code" href="classG4UIterminal.html#r0">UI</a>-&gt; GetPreviousCommand(vl);
37000217 G4cout &lt;&lt; newCommand &lt;&lt; G4endl;
37100218 } <span class="keywordflow">else</span> {
37200219 G4cerr &lt;&lt; <span class="stringliteral">"history "</span> &lt;&lt; vl &lt;&lt; <span class="stringliteral">" is not found."</span> &lt;&lt; G4endl;
37300220 newCommand= nullString;
37400221 }
37500222
37600223 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(nC == <span class="stringliteral">"exit"</span>) { <span class="comment">// "exit"</span>
37700224 <span class="keywordflow">if</span>(<a class="code" href="classG4UIterminal.html#r3">iCont</a>) {
37800225 G4cout &lt;&lt; <span class="stringliteral">"You are now processing RUN."</span> &lt;&lt; G4endl;
37900226 G4cout &lt;&lt; <span class="stringliteral">"Please abort it using \"/run/abort\" command first"</span> &lt;&lt; G4endl;
38000227 G4cout &lt;&lt; <span class="stringliteral">" and use \"continue\" command until the application"</span>
38100228 &lt;&lt; G4endl;
38200229 G4cout &lt;&lt; <span class="stringliteral">" becomes to Idle."</span> &lt;&lt; G4endl;
38300230 } <span class="keywordflow">else</span> {
38400231 <a class="code" href="classG4UIterminal.html#r2">iExit</a>= FALSE;
38500232 newCommand= nullString;
38600233 }
38700234
38800235 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( nC == <span class="stringliteral">"cont"</span> || nC == <span class="stringliteral">"continue"</span>){ <span class="comment">// "cont/continu"</span>
38900236 <a class="code" href="classG4UIterminal.html#r3">iCont</a>= FALSE;
39000237 newCommand= nullString;
39100238
39200239 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( nC.empty() ){ <span class="comment">// NULL command</span>
39300240 newCommand= nullString;
39400241
39500242 } <span class="keywordflow">else</span> {
39600243 }
39700244
39800245 <span class="keywordflow">return</span> <a class="code" href="classG4VBasicShell.html#b0">ModifyToFullPathCommand</a>(newCommand);
39900246 }
400</pre></div> </td>
401 </tr>
402</table>
403
404<p>
405Here is the call graph for this function:<p><center><img src="classG4UIterminal_d1_cgraph.png" border="0" usemap="#classG4UIterminal_d1_cgraph_map" alt=""></center>
406<map name="classG4UIterminal_d1_cgraph_map">
407<area href="classG4VBasicShell.html#b12" shape="rect" coords="248,8,528,34" alt="">
408<area href="classG4VBasicShell.html#b1" shape="rect" coords="576,109,864,136" alt="">
409<area href="classG4VBasicShell.html#b13" shape="rect" coords="292,109,484,136" alt="">
410<area href="classG4VBasicShell.html#b0" shape="rect" coords="578,210,861,237" alt="">
411<area href="classG4VBasicShell.html#b11" shape="rect" coords="289,261,486,288" alt="">
412<area href="classG4VBasicShell.html#b14" shape="rect" coords="290,160,485,186" alt="">
413</map>
414<a class="anchor" name="d2" doxytag="G4UIterminal::GetHelpChoice" ></a><p>
415<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
416 <tr>
417 <td class="mdRow">
418 <table cellpadding="0" cellspacing="0" border="0">
419 <tr>
420 <td class="md" nowrap valign="top"> G4bool G4UIterminal::GetHelpChoice </td>
421 <td class="md" valign="top">(&nbsp;</td>
422 <td class="md" nowrap valign="top">G4int &amp;&nbsp;</td>
423 <td class="mdname1" valign="top" nowrap> <em>aInt</em> </td>
424 <td class="md" valign="top">&nbsp;)&nbsp;</td>
425 <td class="md" nowrap><code> [private, virtual]</code></td>
426 </tr>
427
428 </table>
429 </td>
430 </tr>
431</table>
432<table cellspacing=5 cellpadding=0 border=0>
433 <tr>
434 <td>
435 &nbsp;
436 </td>
437 <td>
438
439<p>
440
441<p>
442Implements <a class="el" href="classG4VBasicShell.html#b8">G4VBasicShell</a>.
443<p>
444Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00266">266</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
445<p>
446<div class="fragment"><pre>00268 {
44700269 G4cin &gt;&gt; aInt;
44800270 <span class="keywordflow">if</span>(!G4cin.good()){
44900271 G4cin.clear();
45000272 G4cin.ignore(30,<span class="charliteral">'\n'</span>);
45100273 <span class="keywordflow">return</span> FALSE;
45200274 }
45300275 <span class="keywordflow">return</span> TRUE;
45400276 }
455</pre></div> </td>
456 </tr>
457</table>
458<a class="anchor" name="a4" doxytag="G4UIterminal::PauseSessionStart" ></a><p>
459<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
460 <tr>
461 <td class="mdRow">
462 <table cellpadding="0" cellspacing="0" border="0">
463 <tr>
464 <td class="md" nowrap valign="top"> void G4UIterminal::PauseSessionStart </td>
465 <td class="md" valign="top">(&nbsp;</td>
466 <td class="md" nowrap valign="top">G4String&nbsp;</td>
467 <td class="mdname1" valign="top" nowrap> <em>msg</em> </td>
468 <td class="md" valign="top">&nbsp;)&nbsp;</td>
469 <td class="md" nowrap><code> [virtual]</code></td>
470 </tr>
471
472 </table>
473 </td>
474 </tr>
475</table>
476<table cellspacing=5 cellpadding=0 border=0>
477 <tr>
478 <td>
479 &nbsp;
480 </td>
481 <td>
482
483<p>
484
485<p>
486Implements <a class="el" href="classG4VBasicShell.html#a3">G4VBasicShell</a>.
487<p>
488Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00091">91</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
489<p>
490References <a class="el" href="G4UIterminal_8cc-source.html#l00104">ExecuteCommand()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00155">GetCommand()</a>, and <a class="el" href="G4UIterminal_8hh-source.html#l00081">iCont</a>.
491<p>
492<div class="fragment"><pre>00093 {
49300094 <a class="code" href="classG4UIterminal.html#r3">iCont</a>= TRUE;
49400095
49500096 G4String newCommand= <a class="code" href="classG4UIterminal.html#d1">GetCommand</a>(msg);
49600097 <span class="keywordflow">while</span>(<a class="code" href="classG4UIterminal.html#r3">iCont</a>){
49700098 <a class="code" href="classG4UIterminal.html#d0">ExecuteCommand</a>(newCommand);
49800099 newCommand= <a class="code" href="classG4UIterminal.html#d1">GetCommand</a>(msg);
49900100 }
50000101 }
501</pre></div> </td>
502 </tr>
503</table>
504
505<p>
506Here is the call graph for this function:<p><center><img src="classG4UIterminal_a4_cgraph.png" border="0" usemap="#classG4UIterminal_a4_cgraph_map" alt=""></center>
507<map name="classG4UIterminal_a4_cgraph_map">
508<area href="classG4UIterminal.html#d0" shape="rect" coords="278,7,494,34" alt="">
509<area href="classG4UIterminal.html#d1" shape="rect" coords="292,58,481,85" alt="">
510</map>
511<a class="anchor" name="a6" doxytag="G4UIterminal::ReceiveG4cerr" ></a><p>
512<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
513 <tr>
514 <td class="mdRow">
515 <table cellpadding="0" cellspacing="0" border="0">
516 <tr>
517 <td class="md" nowrap valign="top"> G4int G4UIterminal::ReceiveG4cerr </td>
518 <td class="md" valign="top">(&nbsp;</td>
519 <td class="md" nowrap valign="top">G4String&nbsp;</td>
520 <td class="mdname1" valign="top" nowrap> <em>cerrString</em> </td>
521 <td class="md" valign="top">&nbsp;)&nbsp;</td>
522 <td class="md" nowrap><code> [virtual]</code></td>
523 </tr>
524
525 </table>
526 </td>
527 </tr>
528</table>
529<table cellspacing=5 cellpadding=0 border=0>
530 <tr>
531 <td>
532 &nbsp;
533 </td>
534 <td>
535
536<p>
537
538<p>
539Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00258">258</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
540<p>
541<div class="fragment"><pre>00260 {
54200261 std::cerr &lt;&lt; cerrString &lt;&lt; std::flush;
54300262 <span class="keywordflow">return</span> 0;
54400263 }
545</pre></div> </td>
546 </tr>
547</table>
548<a class="anchor" name="a5" doxytag="G4UIterminal::ReceiveG4cout" ></a><p>
549<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
550 <tr>
551 <td class="mdRow">
552 <table cellpadding="0" cellspacing="0" border="0">
553 <tr>
554 <td class="md" nowrap valign="top"> G4int G4UIterminal::ReceiveG4cout </td>
555 <td class="md" valign="top">(&nbsp;</td>
556 <td class="md" nowrap valign="top">G4String&nbsp;</td>
557 <td class="mdname1" valign="top" nowrap> <em>coutString</em> </td>
558 <td class="md" valign="top">&nbsp;)&nbsp;</td>
559 <td class="md" nowrap><code> [virtual]</code></td>
560 </tr>
561
562 </table>
563 </td>
564 </tr>
565</table>
566<table cellspacing=5 cellpadding=0 border=0>
567 <tr>
568 <td>
569 &nbsp;
570 </td>
571 <td>
572
573<p>
574
575<p>
576Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00250">250</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
577<p>
578<div class="fragment"><pre>00252 {
57900253 std::cout &lt;&lt; coutString &lt;&lt; std::flush;
58000254 <span class="keywordflow">return</span> 0;
58100255 }
582</pre></div> </td>
583 </tr>
584</table>
585<a class="anchor" name="a3" doxytag="G4UIterminal::SessionStart" ></a><p>
586<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
587 <tr>
588 <td class="mdRow">
589 <table cellpadding="0" cellspacing="0" border="0">
590 <tr>
591 <td class="md" nowrap valign="top"> G4UIsession * G4UIterminal::SessionStart </td>
592 <td class="md" valign="top">(&nbsp;</td>
593 <td class="mdname1" valign="top" nowrap> </td>
594 <td class="md" valign="top">&nbsp;)&nbsp;</td>
595 <td class="md" nowrap><code> [virtual]</code></td>
596 </tr>
597
598 </table>
599 </td>
600 </tr>
601</table>
602<table cellspacing=5 cellpadding=0 border=0>
603 <tr>
604 <td>
605 &nbsp;
606 </td>
607 <td>
608
609<p>
610
611<p>
612Implements <a class="el" href="classG4VBasicShell.html#a2">G4VBasicShell</a>.
613<p>
614Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00077">77</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
615<p>
616References <a class="el" href="G4UIterminal_8cc-source.html#l00104">ExecuteCommand()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00155">GetCommand()</a>, and <a class="el" href="G4UIterminal_8hh-source.html#l00080">iExit</a>.
617<p>
618<div class="fragment"><pre>00079 {
61900080 <a class="code" href="classG4UIterminal.html#r2">iExit</a>= TRUE;
62000081
62100082 G4String newCommand= <a class="code" href="classG4UIterminal.html#d1">GetCommand</a>();
62200083 <span class="keywordflow">while</span>(<a class="code" href="classG4UIterminal.html#r2">iExit</a>){
62300084 <a class="code" href="classG4UIterminal.html#d0">ExecuteCommand</a>(newCommand);
62400085 newCommand= <a class="code" href="classG4UIterminal.html#d1">GetCommand</a>();
62500086 }
62600087 <span class="keywordflow">return</span> NULL;
62700088 }
628</pre></div> </td>
629 </tr>
630</table>
631
632<p>
633Here is the call graph for this function:<p><center><img src="classG4UIterminal_a3_cgraph.png" border="0" usemap="#classG4UIterminal_a3_cgraph_map" alt=""></center>
634<map name="classG4UIterminal_a3_cgraph_map">
635<area href="classG4UIterminal.html#d0" shape="rect" coords="241,7,457,34" alt="">
636<area href="classG4UIterminal.html#d1" shape="rect" coords="254,58,444,85" alt="">
637</map>
638<a class="anchor" name="a2" doxytag="G4UIterminal::SetPrompt" ></a><p>
639<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
640 <tr>
641 <td class="mdRow">
642 <table cellpadding="0" cellspacing="0" border="0">
643 <tr>
644 <td class="md" nowrap valign="top"> void G4UIterminal::SetPrompt </td>
645 <td class="md" valign="top">(&nbsp;</td>
646 <td class="md" nowrap valign="top">const G4String &amp;&nbsp;</td>
647 <td class="mdname1" valign="top" nowrap> <em>prompt</em> </td>
648 <td class="md" valign="top">&nbsp;)&nbsp;</td>
649 <td class="md" nowrap></td>
650 </tr>
651
652 </table>
653 </td>
654 </tr>
655</table>
656<table cellspacing=5 cellpadding=0 border=0>
657 <tr>
658 <td>
659 &nbsp;
660 </td>
661 <td>
662
663<p>
664
665<p>
666Definition at line <a class="el" href="G4UIterminal_8cc-source.html#l00070">70</a> of file <a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a>.
667<p>
668References <a class="el" href="G4UIterminal_8hh-source.html#l00077">shell</a>.
669<p>
670<div class="fragment"><pre>00072 {
67100073 <a class="code" href="classG4UIterminal.html#r1">shell</a>-&gt; <a class="code" href="classG4UIterminal.html#a2">SetPrompt</a>(prompt);
67200074 }
673</pre></div> </td>
674 </tr>
675</table>
676<hr><h2>Member Data Documentation</h2>
677<a class="anchor" name="r3" doxytag="G4UIterminal::iCont" ></a><p>
678<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
679 <tr>
680 <td class="mdRow">
681 <table cellpadding="0" cellspacing="0" border="0">
682 <tr>
683 <td class="md" nowrap valign="top"> G4bool <a class="el" href="classG4UIterminal.html#r3">G4UIterminal::iCont</a><code> [private]</code>
684 </table>
685 </td>
686 </tr>
687</table>
688<table cellspacing=5 cellpadding=0 border=0>
689 <tr>
690 <td>
691 &nbsp;
692 </td>
693 <td>
694
695<p>
696
697<p>
698Definition at line <a class="el" href="G4UIterminal_8hh-source.html#l00081">81</a> of file <a class="el" href="G4UIterminal_8hh-source.html">G4UIterminal.hh</a>.
699<p>
700Referenced by <a class="el" href="G4UIterminal_8cc-source.html#l00042">G4UIterminal()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00155">GetCommand()</a>, and <a class="el" href="G4UIterminal_8cc-source.html#l00091">PauseSessionStart()</a>. </td>
701 </tr>
702</table>
703<a class="anchor" name="r2" doxytag="G4UIterminal::iExit" ></a><p>
704<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
705 <tr>
706 <td class="mdRow">
707 <table cellpadding="0" cellspacing="0" border="0">
708 <tr>
709 <td class="md" nowrap valign="top"> G4bool <a class="el" href="classG4UIterminal.html#r2">G4UIterminal::iExit</a><code> [private]</code>
710 </table>
711 </td>
712 </tr>
713</table>
714<table cellspacing=5 cellpadding=0 border=0>
715 <tr>
716 <td>
717 &nbsp;
718 </td>
719 <td>
720
721<p>
722
723<p>
724Definition at line <a class="el" href="G4UIterminal_8hh-source.html#l00080">80</a> of file <a class="el" href="G4UIterminal_8hh-source.html">G4UIterminal.hh</a>.
725<p>
726Referenced by <a class="el" href="G4UIterminal_8cc-source.html#l00042">G4UIterminal()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00155">GetCommand()</a>, and <a class="el" href="G4UIterminal_8cc-source.html#l00077">SessionStart()</a>. </td>
727 </tr>
728</table>
729<a class="anchor" name="r1" doxytag="G4UIterminal::shell" ></a><p>
730<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
731 <tr>
732 <td class="mdRow">
733 <table cellpadding="0" cellspacing="0" border="0">
734 <tr>
735 <td class="md" nowrap valign="top"> <a class="el" href="classG4VUIshell.html">G4VUIshell</a>* <a class="el" href="classG4UIterminal.html#r1">G4UIterminal::shell</a><code> [private]</code>
736 </table>
737 </td>
738 </tr>
739</table>
740<table cellspacing=5 cellpadding=0 border=0>
741 <tr>
742 <td>
743 &nbsp;
744 </td>
745 <td>
746
747<p>
748
749<p>
750Definition at line <a class="el" href="G4UIterminal_8hh-source.html#l00077">77</a> of file <a class="el" href="G4UIterminal_8hh-source.html">G4UIterminal.hh</a>.
751<p>
752Referenced by <a class="el" href="G4UIterminal_8cc-source.html#l00042">G4UIterminal()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00155">GetCommand()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00070">SetPrompt()</a>, and <a class="el" href="G4UIterminal_8cc-source.html#l00057">~G4UIterminal()</a>. </td>
753 </tr>
754</table>
755<a class="anchor" name="r0" doxytag="G4UIterminal::UI" ></a><p>
756<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
757 <tr>
758 <td class="mdRow">
759 <table cellpadding="0" cellspacing="0" border="0">
760 <tr>
761 <td class="md" nowrap valign="top"> G4UImanager* <a class="el" href="classG4UIterminal.html#r0">G4UIterminal::UI</a><code> [private]</code>
762 </table>
763 </td>
764 </tr>
765</table>
766<table cellspacing=5 cellpadding=0 border=0>
767 <tr>
768 <td>
769 &nbsp;
770 </td>
771 <td>
772
773<p>
774
775<p>
776Definition at line <a class="el" href="G4UIterminal_8hh-source.html#l00075">75</a> of file <a class="el" href="G4UIterminal_8hh-source.html">G4UIterminal.hh</a>.
777<p>
778Referenced by <a class="el" href="G4UIterminal_8cc-source.html#l00104">ExecuteCommand()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00042">G4UIterminal()</a>, <a class="el" href="G4UIterminal_8cc-source.html#l00155">GetCommand()</a>, and <a class="el" href="G4UIterminal_8cc-source.html#l00057">~G4UIterminal()</a>. </td>
779 </tr>
780</table>
781<hr>The documentation for this class was generated from the following files:<ul>
782<li><a class="el" href="G4UIterminal_8hh-source.html">G4UIterminal.hh</a><li><a class="el" href="G4UIterminal_8cc-source.html">G4UIterminal.cc</a></ul>
783<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:07:36 2007 by
784<a href="http://www.doxygen.org/index.html">
785<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
786</a>1.3.4 </small></address>
787</body>
788</html>
Note: See TracBrowser for help on using the repository browser.