[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 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 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>G4UIcsh Class Reference</h1><code>#include <<a class="el" href="G4UIcsh_8hh-source.html">G4UIcsh.hh</a>></code> |
---|
| 9 | <p> |
---|
| 10 | Inheritance diagram for G4UIcsh:<p><center><img src="classG4UIcsh__inherit__graph.png" border="0" usemap="#G4UIcsh__inherit__map" alt="Inheritance graph"></center> |
---|
| 11 | <map name="G4UIcsh__inherit__map"> |
---|
| 12 | <area href="classG4VUIshell.html" shape="rect" coords="8,8,200,360" alt=""> |
---|
| 13 | </map> |
---|
| 14 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for G4UIcsh:<p><center><img src="classG4UIcsh__coll__graph.png" border="0" usemap="#G4UIcsh__coll__map" alt="Collaboration graph"></center> |
---|
| 15 | <map name="G4UIcsh__coll__map"> |
---|
| 16 | <area href="classG4VUIshell.html" shape="rect" coords="8,8,200,360" alt=""> |
---|
| 17 | </map> |
---|
| 18 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classG4UIcsh-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> |
---|
| 19 | <tr><td></td></tr> |
---|
| 20 | <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> |
---|
| 21 | <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIcsh.html#a0">G4UIcsh</a> (const G4String &prompt="%s >")</td></tr> |
---|
| 22 | |
---|
| 23 | <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIcsh.html#a1">~G4UIcsh</a> ()</td></tr> |
---|
| 24 | |
---|
| 25 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UIcsh.html#a2">GetCommandLine</a> (const char *msg=0)</td></tr> |
---|
| 26 | |
---|
| 27 | </table> |
---|
| 28 | <hr><h2>Constructor & Destructor Documentation</h2> |
---|
| 29 | <a class="anchor" name="a0" doxytag="G4UIcsh::G4UIcsh" ></a><p> |
---|
| 30 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 31 | <tr> |
---|
| 32 | <td class="mdRow"> |
---|
| 33 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 34 | <tr> |
---|
| 35 | <td class="md" nowrap valign="top"> G4UIcsh::G4UIcsh </td> |
---|
| 36 | <td class="md" valign="top">( </td> |
---|
| 37 | <td class="md" nowrap valign="top">const G4String & </td> |
---|
| 38 | <td class="mdname1" valign="top" nowrap> <em>prompt</em> = "%s >" </td> |
---|
| 39 | <td class="md" valign="top"> ) </td> |
---|
| 40 | <td class="md" nowrap></td> |
---|
| 41 | </tr> |
---|
| 42 | |
---|
| 43 | </table> |
---|
| 44 | </td> |
---|
| 45 | </tr> |
---|
| 46 | </table> |
---|
| 47 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 48 | <tr> |
---|
| 49 | <td> |
---|
| 50 | |
---|
| 51 | </td> |
---|
| 52 | <td> |
---|
| 53 | |
---|
| 54 | <p> |
---|
| 55 | |
---|
| 56 | <p> |
---|
| 57 | Definition at line <a class="el" href="G4UIcsh_8cc-source.html#l00034">34</a> of file <a class="el" href="G4UIcsh_8cc-source.html">G4UIcsh.cc</a>. |
---|
| 58 | <p> |
---|
| 59 | <div class="fragment"><pre>00035 : <a class="code" href="classG4VUIshell.html#a0">G4VUIshell</a>(prompt) |
---|
| 60 | 00037 { |
---|
| 61 | 00038 } |
---|
| 62 | </pre></div> </td> |
---|
| 63 | </tr> |
---|
| 64 | </table> |
---|
| 65 | <a class="anchor" name="a1" doxytag="G4UIcsh::~G4UIcsh" ></a><p> |
---|
| 66 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 67 | <tr> |
---|
| 68 | <td class="mdRow"> |
---|
| 69 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 70 | <tr> |
---|
| 71 | <td class="md" nowrap valign="top"> G4UIcsh::~<a class="el" href="classG4UIcsh.html">G4UIcsh</a> </td> |
---|
| 72 | <td class="md" valign="top">( </td> |
---|
| 73 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 74 | <td class="md" valign="top"> ) </td> |
---|
| 75 | <td class="md" nowrap></td> |
---|
| 76 | </tr> |
---|
| 77 | |
---|
| 78 | </table> |
---|
| 79 | </td> |
---|
| 80 | </tr> |
---|
| 81 | </table> |
---|
| 82 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 83 | <tr> |
---|
| 84 | <td> |
---|
| 85 | |
---|
| 86 | </td> |
---|
| 87 | <td> |
---|
| 88 | |
---|
| 89 | <p> |
---|
| 90 | |
---|
| 91 | <p> |
---|
| 92 | Definition at line <a class="el" href="G4UIcsh_8cc-source.html#l00041">41</a> of file <a class="el" href="G4UIcsh_8cc-source.html">G4UIcsh.cc</a>. |
---|
| 93 | <p> |
---|
| 94 | <div class="fragment"><pre>00043 { |
---|
| 95 | 00044 } |
---|
| 96 | </pre></div> </td> |
---|
| 97 | </tr> |
---|
| 98 | </table> |
---|
| 99 | <hr><h2>Member Function Documentation</h2> |
---|
| 100 | <a class="anchor" name="a2" doxytag="G4UIcsh::GetCommandLine" ></a><p> |
---|
| 101 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 102 | <tr> |
---|
| 103 | <td class="mdRow"> |
---|
| 104 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 105 | <tr> |
---|
| 106 | <td class="md" nowrap valign="top"> G4String G4UIcsh::GetCommandLine </td> |
---|
| 107 | <td class="md" valign="top">( </td> |
---|
| 108 | <td class="md" nowrap valign="top">const char * </td> |
---|
| 109 | <td class="mdname1" valign="top" nowrap> <em>msg</em> = 0 </td> |
---|
| 110 | <td class="md" valign="top"> ) </td> |
---|
| 111 | <td class="md" nowrap><code> [virtual]</code></td> |
---|
| 112 | </tr> |
---|
| 113 | |
---|
| 114 | </table> |
---|
| 115 | </td> |
---|
| 116 | </tr> |
---|
| 117 | </table> |
---|
| 118 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 119 | <tr> |
---|
| 120 | <td> |
---|
| 121 | |
---|
| 122 | </td> |
---|
| 123 | <td> |
---|
| 124 | |
---|
| 125 | <p> |
---|
| 126 | |
---|
| 127 | <p> |
---|
| 128 | Implements <a class="el" href="classG4VUIshell.html#a7">G4VUIshell</a>. |
---|
| 129 | <p> |
---|
| 130 | Definition at line <a class="el" href="G4UIcsh_8cc-source.html#l00048">48</a> of file <a class="el" href="G4UIcsh_8cc-source.html">G4UIcsh.cc</a>. |
---|
| 131 | <p> |
---|
| 132 | References <a class="el" href="G4VUIshell_8cc-source.html#l00062">G4VUIshell::MakePrompt()</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00062">G4VUIshell::promptString</a>. |
---|
| 133 | <p> |
---|
| 134 | <div class="fragment"><pre>00050 { |
---|
| 135 | 00051 <a class="code" href="classG4VUIshell.html#b0">MakePrompt</a>(msg); |
---|
| 136 | 00052 G4cout << <a class="code" href="classG4VUIshell.html#p1">promptString</a> << std::flush; |
---|
| 137 | 00053 |
---|
| 138 | 00054 G4String newCommand; |
---|
| 139 | 00055 newCommand.readLine(G4cin, FALSE); |
---|
| 140 | 00056 <span class="keywordflow">if</span> (!G4cin.good()) { |
---|
| 141 | 00057 G4cin.clear(); |
---|
| 142 | 00058 newCommand= <span class="stringliteral">"exit"</span>; |
---|
| 143 | 00059 <span class="keywordflow">return</span> newCommand; |
---|
| 144 | 00060 } |
---|
| 145 | 00061 newCommand = newCommand.strip(1,<span class="charliteral">'\r'</span>); <span class="comment">// fix for odd behavior on Windows</span> |
---|
| 146 | 00062 |
---|
| 147 | 00063 <span class="comment">// multi-line</span> |
---|
| 148 | 00064 <span class="keywordflow">while</span>( (newCommand.length() > 0) && |
---|
| 149 | 00065 (newCommand[newCommand.length()-1] == <span class="charliteral">'_'</span>) ) { |
---|
| 150 | 00066 G4String newLine; |
---|
| 151 | 00067 newCommand.remove(newCommand.length()-1); |
---|
| 152 | 00068 newLine.readLine(G4cin, FALSE); |
---|
| 153 | 00069 <span class="keywordflow">if</span> (!G4cin.good()) { |
---|
| 154 | 00070 G4cin.clear(); |
---|
| 155 | 00071 newCommand= <span class="stringliteral">"exit"</span>; |
---|
| 156 | 00072 <span class="keywordflow">return</span> newCommand; |
---|
| 157 | 00073 } |
---|
| 158 | 00074 newCommand.append(newLine); |
---|
| 159 | 00075 } |
---|
| 160 | 00076 |
---|
| 161 | 00077 <span class="keywordflow">return</span> newCommand; |
---|
| 162 | 00078 } |
---|
| 163 | </pre></div> </td> |
---|
| 164 | </tr> |
---|
| 165 | </table> |
---|
| 166 | |
---|
| 167 | <p> |
---|
| 168 | Here is the call graph for this function:<p><center><img src="classG4UIcsh_a2_cgraph.png" border="0" usemap="#classG4UIcsh_a2_cgraph_map" alt=""></center> |
---|
| 169 | <map name="classG4UIcsh_a2_cgraph_map"> |
---|
| 170 | <area href="classG4VUIshell.html#b0" shape="rect" coords="246,8,417,34" alt=""> |
---|
| 171 | </map> |
---|
| 172 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
| 173 | <li><a class="el" href="G4UIcsh_8hh-source.html">G4UIcsh.hh</a><li><a class="el" href="G4UIcsh_8cc-source.html">G4UIcsh.cc</a></ul> |
---|
| 174 | <hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:07:09 2007 by |
---|
| 175 | <a href="http://www.doxygen.org/index.html"> |
---|
| 176 | <img src="doxygen.png" alt="doxygen" align="middle" border=0 > |
---|
| 177 | </a>1.3.4 </small></address> |
---|
| 178 | </body> |
---|
| 179 | </html> |
---|