source: trunk/geant4/interfaces/html/G4UIcsh_8cc-source.html@ 790

Last change on this file since 790 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: 5.9 KB
RevLine 
[571]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>G4UIcsh.cc 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&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>G4UIcsh.cc</h1><a href="G4UIcsh_8cc.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">//</span>
900002 <span class="comment">// ********************************************************************</span>
1000003 <span class="comment">// * License and Disclaimer *</span>
1100004 <span class="comment">// * *</span>
1200005 <span class="comment">// * The Geant4 software is copyright of the Copyright Holders of *</span>
1300006 <span class="comment">// * the Geant4 Collaboration. It is provided under the terms and *</span>
1400007 <span class="comment">// * conditions of the Geant4 Software License, included in the file *</span>
1500008 <span class="comment">// * LICENSE and available at http://cern.ch/geant4/license . These *</span>
1600009 <span class="comment">// * include a list of copyright holders. *</span>
1700010 <span class="comment">// * *</span>
1800011 <span class="comment">// * Neither the authors of this software system, nor their employing *</span>
1900012 <span class="comment">// * institutes,nor the agencies providing financial support for this *</span>
2000013 <span class="comment">// * work make any representation or warranty, express or implied, *</span>
2100014 <span class="comment">// * regarding this software system or assume any liability for its *</span>
2200015 <span class="comment">// * use. Please see the license in the file LICENSE and URL above *</span>
2300016 <span class="comment">// * for the full disclaimer and the limitation of liability. *</span>
2400017 <span class="comment">// * *</span>
2500018 <span class="comment">// * This code implementation is the result of the scientific and *</span>
2600019 <span class="comment">// * technical work of the GEANT4 collaboration. *</span>
2700020 <span class="comment">// * By using, copying, modifying or distributing the software (or *</span>
2800021 <span class="comment">// * any work based on the software) you agree to acknowledge its *</span>
2900022 <span class="comment">// * use in resulting scientific publications, and indicate your *</span>
3000023 <span class="comment">// * acceptance of all terms of the Geant4 Software license. *</span>
3100024 <span class="comment">// ********************************************************************</span>
3200025 <span class="comment">//</span>
3300026 <span class="comment">//</span>
3400027 <span class="comment">// $Id: G4UIcsh.cc,v 1.8 2006/06/29 19:09:51 gunter Exp $</span>
3500028 <span class="comment">// GEANT4 tag $Name: geant4-08-01-patch-01 $</span>
3600029 <span class="comment">//</span>
3700030
3800031 <span class="preprocessor">#include "<a class="code" href="G4UIcsh_8hh.html">G4UIcsh.hh</a>"</span>
3900032
40<a name="l00034"></a><a class="code" href="classG4UIcsh.html#a0">00034</a> <a class="code" href="classG4UIcsh.html#a0">G4UIcsh::G4UIcsh</a>(<span class="keyword">const</span> G4String&amp; prompt)
4100035 : <a class="code" href="classG4VUIshell.html">G4VUIshell</a>(prompt)
4200037 {
4300038 }
4400039
45<a name="l00041"></a><a class="code" href="classG4UIcsh.html#a1">00041</a> <a class="code" href="classG4UIcsh.html#a1">G4UIcsh::~G4UIcsh</a>()
4600043 {
4700044 }
4800045
4900046
50<a name="l00048"></a><a class="code" href="classG4UIcsh.html#a2">00048</a> G4String <a class="code" href="classG4UIcsh.html#a2">G4UIcsh::GetCommandLine</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* msg)
5100050 {
5200051 <a class="code" href="classG4VUIshell.html#b0">MakePrompt</a>(msg);
5300052 G4cout &lt;&lt; <a class="code" href="classG4VUIshell.html#p1">promptString</a> &lt;&lt; std::flush;
5400053
5500054 G4String newCommand;
5600055 newCommand.readLine(G4cin, FALSE);
5700056 <span class="keywordflow">if</span> (!G4cin.good()) {
5800057 G4cin.clear();
5900058 newCommand= <span class="stringliteral">"exit"</span>;
6000059 <span class="keywordflow">return</span> newCommand;
6100060 }
6200061 newCommand = newCommand.strip(1,<span class="charliteral">'\r'</span>); <span class="comment">// fix for odd behavior on Windows</span>
6300062
6400063 <span class="comment">// multi-line</span>
6500064 <span class="keywordflow">while</span>( (newCommand.length() &gt; 0) &amp;&amp;
6600065 (newCommand[newCommand.length()-1] == <span class="charliteral">'_'</span>) ) {
6700066 G4String newLine;
6800067 newCommand.remove(newCommand.length()-1);
6900068 newLine.readLine(G4cin, FALSE);
7000069 <span class="keywordflow">if</span> (!G4cin.good()) {
7100070 G4cin.clear();
7200071 newCommand= <span class="stringliteral">"exit"</span>;
7300072 <span class="keywordflow">return</span> newCommand;
7400073 }
7500074 newCommand.append(newLine);
7600075 }
7700076
7800077 <span class="keywordflow">return</span> newCommand;
7900078 }
8000079
81</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:07:02 2007 by
82<a href="http://www.doxygen.org/index.html">
83<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
84</a>1.3.4 </small></address>
85</body>
86</html>
Note: See TracBrowser for help on using the repository browser.