[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>G4UItcsh 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>G4UItcsh Class Reference</h1><code>#include <<a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>></code> |
---|
| 9 | <p> |
---|
| 10 | Inheritance diagram for G4UItcsh:<p><center><img src="classG4UItcsh__inherit__graph.png" border="0" usemap="#G4UItcsh__inherit__map" alt="Inheritance graph"></center> |
---|
| 11 | <map name="G4UItcsh__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 G4UItcsh:<p><center><img src="classG4UItcsh__coll__graph.png" border="0" usemap="#G4UItcsh__coll__map" alt="Collaboration graph"></center> |
---|
| 15 | <map name="G4UItcsh__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="classG4UItcsh-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="classG4UItcsh.html#a0">G4UItcsh</a> (const G4String &prompt="%s >", G4int maxhist=100)</td></tr> |
---|
| 22 | |
---|
| 23 | <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#a1">~G4UItcsh</a> ()</td></tr> |
---|
| 24 | |
---|
| 25 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#a2">SetLsColor</a> (<a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> dirColor, <a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> cmdColor)</td></tr> |
---|
| 26 | |
---|
| 27 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#a3">GetCommandLine</a> (const char *msg=0)</td></tr> |
---|
| 28 | |
---|
| 29 | <tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr> |
---|
| 30 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b0">MakePrompt</a> (const char *msg=0)</td></tr> |
---|
| 31 | |
---|
| 32 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4bool </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b1">IsCursorLast</a> () const </td></tr> |
---|
| 33 | |
---|
| 34 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b2">InitializeCommandLine</a> ()</td></tr> |
---|
| 35 | |
---|
| 36 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b3">ReadLine</a> ()</td></tr> |
---|
| 37 | |
---|
| 38 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b4">InsertCharacter</a> (char cc)</td></tr> |
---|
| 39 | |
---|
| 40 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b5">BackspaceCharacter</a> ()</td></tr> |
---|
| 41 | |
---|
| 42 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b6">DeleteCharacter</a> ()</td></tr> |
---|
| 43 | |
---|
| 44 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b7">ClearLine</a> ()</td></tr> |
---|
| 45 | |
---|
| 46 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b8">ClearAfterCursor</a> ()</td></tr> |
---|
| 47 | |
---|
| 48 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b9">ClearScreen</a> ()</td></tr> |
---|
| 49 | |
---|
| 50 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b10">ForwardCursor</a> ()</td></tr> |
---|
| 51 | |
---|
| 52 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b11">BackwardCursor</a> ()</td></tr> |
---|
| 53 | |
---|
| 54 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b12">MoveCursorTop</a> ()</td></tr> |
---|
| 55 | |
---|
| 56 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b13">MoveCursorEnd</a> ()</td></tr> |
---|
| 57 | |
---|
| 58 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b14">NextCommand</a> ()</td></tr> |
---|
| 59 | |
---|
| 60 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b15">PreviousCommand</a> ()</td></tr> |
---|
| 61 | |
---|
| 62 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b16">ListMatchedCommand</a> ()</td></tr> |
---|
| 63 | |
---|
| 64 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b17">CompleteCommand</a> ()</td></tr> |
---|
| 65 | |
---|
| 66 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b18">GetFirstMatchedString</a> (const G4String &str1, const G4String &str2) const </td></tr> |
---|
| 67 | |
---|
| 68 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b19">StoreHistory</a> (G4String aCommand)</td></tr> |
---|
| 69 | |
---|
| 70 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b20">RestoreHistory</a> (G4int index)</td></tr> |
---|
| 71 | |
---|
| 72 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b21">SetTermToInputMode</a> ()</td></tr> |
---|
| 73 | |
---|
| 74 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#b22">RestoreTerm</a> ()</td></tr> |
---|
| 75 | |
---|
| 76 | <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> |
---|
| 77 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p0">commandLine</a></td></tr> |
---|
| 78 | |
---|
| 79 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4int </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p1">cursorPosition</a></td></tr> |
---|
| 80 | |
---|
| 81 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p2">commandLineBuf</a></td></tr> |
---|
| 82 | |
---|
| 83 | <tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< G4String > </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p3">commandHistory</a></td></tr> |
---|
| 84 | |
---|
| 85 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4int </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p4">maxHistory</a></td></tr> |
---|
| 86 | |
---|
| 87 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4int </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p5">currentHistoryNo</a></td></tr> |
---|
| 88 | |
---|
| 89 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4int </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p6">relativeHistoryIndex</a></td></tr> |
---|
| 90 | |
---|
| 91 | <tr><td class="memItemLeft" nowrap align=right valign=top>termios </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p7">tios</a></td></tr> |
---|
| 92 | |
---|
| 93 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4UItcsh.html#p8">clearString</a></td></tr> |
---|
| 94 | |
---|
| 95 | </table> |
---|
| 96 | <hr><h2>Constructor & Destructor Documentation</h2> |
---|
| 97 | <a class="anchor" name="a0" doxytag="G4UItcsh::G4UItcsh" ></a><p> |
---|
| 98 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 99 | <tr> |
---|
| 100 | <td class="mdRow"> |
---|
| 101 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 102 | <tr> |
---|
| 103 | <td class="md" nowrap valign="top"> G4UItcsh::G4UItcsh </td> |
---|
| 104 | <td class="md" valign="top">( </td> |
---|
| 105 | <td class="md" nowrap valign="top">const G4String & </td> |
---|
| 106 | <td class="mdname" nowrap> <em>prompt</em> = "%s >", </td> |
---|
| 107 | </tr> |
---|
| 108 | <tr> |
---|
| 109 | <td></td> |
---|
| 110 | <td></td> |
---|
| 111 | <td class="md" nowrap>G4int </td> |
---|
| 112 | <td class="mdname" nowrap> <em>maxhist</em> = 100</td> |
---|
| 113 | </tr> |
---|
| 114 | <tr> |
---|
| 115 | <td></td> |
---|
| 116 | <td class="md">) </td> |
---|
| 117 | <td class="md" colspan="2"></td> |
---|
| 118 | </tr> |
---|
| 119 | |
---|
| 120 | </table> |
---|
| 121 | </td> |
---|
| 122 | </tr> |
---|
| 123 | </table> |
---|
| 124 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 125 | <tr> |
---|
| 126 | <td> |
---|
| 127 | |
---|
| 128 | </td> |
---|
| 129 | <td> |
---|
| 130 | |
---|
| 131 | <p> |
---|
| 132 | |
---|
| 133 | <p> |
---|
| 134 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00062">62</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 135 | <p> |
---|
| 136 | References <a class="el" href="G4UItcsh_8hh-source.html#l00116">tios</a>. |
---|
| 137 | <p> |
---|
| 138 | <div class="fragment"><pre>00063 : <a class="code" href="classG4VUIshell.html#a0">G4VUIshell</a>(prompt), |
---|
| 139 | 00064 <a class="code" href="classG4UItcsh.html#p0">commandLine</a>(<span class="stringliteral">""</span>), <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>(1), |
---|
| 140 | 00065 <a class="code" href="classG4UItcsh.html#p3">commandHistory</a>(maxhist), <a class="code" href="classG4UItcsh.html#p4">maxHistory</a>(maxhist), |
---|
| 141 | 00066 <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>(1), <a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a>(0) |
---|
| 142 | 00068 { |
---|
| 143 | 00069 <span class="comment">// get current terminal mode</span> |
---|
| 144 | 00070 tcgetattr(0, &tios); |
---|
| 145 | 00071 } |
---|
| 146 | </pre></div> </td> |
---|
| 147 | </tr> |
---|
| 148 | </table> |
---|
| 149 | <a class="anchor" name="a1" doxytag="G4UItcsh::~G4UItcsh" ></a><p> |
---|
| 150 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 151 | <tr> |
---|
| 152 | <td class="mdRow"> |
---|
| 153 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 154 | <tr> |
---|
| 155 | <td class="md" nowrap valign="top"> G4UItcsh::~<a class="el" href="classG4UItcsh.html">G4UItcsh</a> </td> |
---|
| 156 | <td class="md" valign="top">( </td> |
---|
| 157 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 158 | <td class="md" valign="top"> ) </td> |
---|
| 159 | <td class="md" nowrap></td> |
---|
| 160 | </tr> |
---|
| 161 | |
---|
| 162 | </table> |
---|
| 163 | </td> |
---|
| 164 | </tr> |
---|
| 165 | </table> |
---|
| 166 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 167 | <tr> |
---|
| 168 | <td> |
---|
| 169 | |
---|
| 170 | </td> |
---|
| 171 | <td> |
---|
| 172 | |
---|
| 173 | <p> |
---|
| 174 | |
---|
| 175 | <p> |
---|
| 176 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00074">74</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 177 | <p> |
---|
| 178 | <div class="fragment"><pre>00076 { |
---|
| 179 | 00077 } |
---|
| 180 | </pre></div> </td> |
---|
| 181 | </tr> |
---|
| 182 | </table> |
---|
| 183 | <hr><h2>Member Function Documentation</h2> |
---|
| 184 | <a class="anchor" name="b5" doxytag="G4UItcsh::BackspaceCharacter" ></a><p> |
---|
| 185 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 186 | <tr> |
---|
| 187 | <td class="mdRow"> |
---|
| 188 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 189 | <tr> |
---|
| 190 | <td class="md" nowrap valign="top"> void G4UItcsh::BackspaceCharacter </td> |
---|
| 191 | <td class="md" valign="top">( </td> |
---|
| 192 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 193 | <td class="md" valign="top"> ) </td> |
---|
| 194 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 195 | </tr> |
---|
| 196 | |
---|
| 197 | </table> |
---|
| 198 | </td> |
---|
| 199 | </tr> |
---|
| 200 | </table> |
---|
| 201 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 202 | <tr> |
---|
| 203 | <td> |
---|
| 204 | |
---|
| 205 | </td> |
---|
| 206 | <td> |
---|
| 207 | |
---|
| 208 | <p> |
---|
| 209 | |
---|
| 210 | <p> |
---|
| 211 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00168">168</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 212 | <p> |
---|
| 213 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>. |
---|
| 214 | <p> |
---|
| 215 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 216 | <p> |
---|
| 217 | <div class="fragment"><pre>00170 { |
---|
| 218 | 00171 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>==1) <span class="keywordflow">return</span>; |
---|
| 219 | 00172 |
---|
| 220 | 00173 <span class="comment">// display...</span> |
---|
| 221 | 00174 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#b1">IsCursorLast</a>()) { |
---|
| 222 | 00175 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a> << <span class="charliteral">' '</span> << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a> << std::flush; |
---|
| 223 | 00176 } <span class="keywordflow">else</span> { |
---|
| 224 | 00177 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 225 | 00178 size_t i; |
---|
| 226 | 00179 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-2; i< <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()-1 ;i++){ |
---|
| 227 | 00180 G4cout << <a class="code" href="classG4UItcsh.html#p0">commandLine</a>[i+1]; |
---|
| 228 | 00181 } |
---|
| 229 | 00182 G4cout << <span class="charliteral">' '</span>; |
---|
| 230 | 00183 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-2; i< <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length() ;i++){ |
---|
| 231 | 00184 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 232 | 00185 } |
---|
| 233 | 00186 G4cout << std::flush; |
---|
| 234 | 00187 } |
---|
| 235 | 00188 |
---|
| 236 | 00189 <span class="comment">// command line string...</span> |
---|
| 237 | 00190 <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.erase(cursorPosition-2, 1); |
---|
| 238 | 00191 |
---|
| 239 | 00192 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>--; |
---|
| 240 | 00193 } |
---|
| 241 | </pre></div> </td> |
---|
| 242 | </tr> |
---|
| 243 | </table> |
---|
| 244 | |
---|
| 245 | <p> |
---|
| 246 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b5_cgraph.png" border="0" usemap="#classG4UItcsh_b5_cgraph_map" alt=""></center> |
---|
| 247 | <map name="classG4UItcsh_b5_cgraph_map"> |
---|
| 248 | <area href="classG4UItcsh.html#b1" shape="rect" coords="265,8,425,34" alt=""> |
---|
| 249 | </map> |
---|
| 250 | <a class="anchor" name="b11" doxytag="G4UItcsh::BackwardCursor" ></a><p> |
---|
| 251 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 252 | <tr> |
---|
| 253 | <td class="mdRow"> |
---|
| 254 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 255 | <tr> |
---|
| 256 | <td class="md" nowrap valign="top"> void G4UItcsh::BackwardCursor </td> |
---|
| 257 | <td class="md" valign="top">( </td> |
---|
| 258 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 259 | <td class="md" valign="top"> ) </td> |
---|
| 260 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 261 | </tr> |
---|
| 262 | |
---|
| 263 | </table> |
---|
| 264 | </td> |
---|
| 265 | </tr> |
---|
| 266 | </table> |
---|
| 267 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 268 | <tr> |
---|
| 269 | <td> |
---|
| 270 | |
---|
| 271 | </td> |
---|
| 272 | <td> |
---|
| 273 | |
---|
| 274 | <p> |
---|
| 275 | |
---|
| 276 | <p> |
---|
| 277 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00274">274</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 278 | <p> |
---|
| 279 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>. |
---|
| 280 | <p> |
---|
| 281 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 282 | <p> |
---|
| 283 | <div class="fragment"><pre>00276 { |
---|
| 284 | 00277 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>==1) <span class="keywordflow">return</span>; |
---|
| 285 | 00278 |
---|
| 286 | 00279 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>--; |
---|
| 287 | 00280 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a> << std::flush; |
---|
| 288 | 00281 } |
---|
| 289 | </pre></div> </td> |
---|
| 290 | </tr> |
---|
| 291 | </table> |
---|
| 292 | <a class="anchor" name="b8" doxytag="G4UItcsh::ClearAfterCursor" ></a><p> |
---|
| 293 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 294 | <tr> |
---|
| 295 | <td class="mdRow"> |
---|
| 296 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 297 | <tr> |
---|
| 298 | <td class="md" nowrap valign="top"> void G4UItcsh::ClearAfterCursor </td> |
---|
| 299 | <td class="md" valign="top">( </td> |
---|
| 300 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 301 | <td class="md" valign="top"> ) </td> |
---|
| 302 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 303 | </tr> |
---|
| 304 | |
---|
| 305 | </table> |
---|
| 306 | </td> |
---|
| 307 | </tr> |
---|
| 308 | </table> |
---|
| 309 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 310 | <tr> |
---|
| 311 | <td> |
---|
| 312 | |
---|
| 313 | </td> |
---|
| 314 | <td> |
---|
| 315 | |
---|
| 316 | <p> |
---|
| 317 | |
---|
| 318 | <p> |
---|
| 319 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00233">233</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 320 | <p> |
---|
| 321 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>. |
---|
| 322 | <p> |
---|
| 323 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 324 | <p> |
---|
| 325 | <div class="fragment"><pre>00235 { |
---|
| 326 | 00236 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#b1">IsCursorLast</a>()) <span class="keywordflow">return</span>; |
---|
| 327 | 00237 |
---|
| 328 | 00238 <span class="comment">// display...</span> |
---|
| 329 | 00239 G4int i; |
---|
| 330 | 00240 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>; i<=G4int(<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()); i++) G4cout << <span class="charliteral">' '</span>; |
---|
| 331 | 00241 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length(); i>=cursorPosition; i--) G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 332 | 00242 G4cout << std::flush; |
---|
| 333 | 00243 |
---|
| 334 | 00244 <span class="comment">// command line string...</span> |
---|
| 335 | 00245 <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.erase(cursorPosition-1, |
---|
| 336 | 00246 <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()-cursorPosition+1); |
---|
| 337 | 00247 } |
---|
| 338 | </pre></div> </td> |
---|
| 339 | </tr> |
---|
| 340 | </table> |
---|
| 341 | |
---|
| 342 | <p> |
---|
| 343 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b8_cgraph.png" border="0" usemap="#classG4UItcsh_b8_cgraph_map" alt=""></center> |
---|
| 344 | <map name="classG4UItcsh_b8_cgraph_map"> |
---|
| 345 | <area href="classG4UItcsh.html#b1" shape="rect" coords="243,8,403,34" alt=""> |
---|
| 346 | </map> |
---|
| 347 | <a class="anchor" name="b7" doxytag="G4UItcsh::ClearLine" ></a><p> |
---|
| 348 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 349 | <tr> |
---|
| 350 | <td class="mdRow"> |
---|
| 351 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 352 | <tr> |
---|
| 353 | <td class="md" nowrap valign="top"> void G4UItcsh::ClearLine </td> |
---|
| 354 | <td class="md" valign="top">( </td> |
---|
| 355 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 356 | <td class="md" valign="top"> ) </td> |
---|
| 357 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 358 | </tr> |
---|
| 359 | |
---|
| 360 | </table> |
---|
| 361 | </td> |
---|
| 362 | </tr> |
---|
| 363 | </table> |
---|
| 364 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 365 | <tr> |
---|
| 366 | <td> |
---|
| 367 | |
---|
| 368 | </td> |
---|
| 369 | <td> |
---|
| 370 | |
---|
| 371 | <p> |
---|
| 372 | |
---|
| 373 | <p> |
---|
| 374 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00217">217</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 375 | <p> |
---|
| 376 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>. |
---|
| 377 | <p> |
---|
| 378 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>. |
---|
| 379 | <p> |
---|
| 380 | <div class="fragment"><pre>00219 { |
---|
| 381 | 00220 <span class="comment">// display...</span> |
---|
| 382 | 00221 G4int i; |
---|
| 383 | 00222 <span class="keywordflow">for</span>(i= <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>; i>=2; i--) G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 384 | 00223 <span class="keywordflow">for</span>(i=1; i<=G4int(<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()); i++) G4cout << <span class="charliteral">' '</span>; |
---|
| 385 | 00224 <span class="keywordflow">for</span>(i=1; i<=G4int(<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()); i++) G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 386 | 00225 G4cout << std::flush; |
---|
| 387 | 00226 |
---|
| 388 | 00227 <span class="comment">// command line string...</span> |
---|
| 389 | 00228 <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.erase(); |
---|
| 390 | 00229 cursorPosition= 1; |
---|
| 391 | 00230 } |
---|
| 392 | </pre></div> </td> |
---|
| 393 | </tr> |
---|
| 394 | </table> |
---|
| 395 | <a class="anchor" name="b9" doxytag="G4UItcsh::ClearScreen" ></a><p> |
---|
| 396 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 397 | <tr> |
---|
| 398 | <td class="mdRow"> |
---|
| 399 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 400 | <tr> |
---|
| 401 | <td class="md" nowrap valign="top"> void G4UItcsh::ClearScreen </td> |
---|
| 402 | <td class="md" valign="top">( </td> |
---|
| 403 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 404 | <td class="md" valign="top"> ) </td> |
---|
| 405 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 406 | </tr> |
---|
| 407 | |
---|
| 408 | </table> |
---|
| 409 | </td> |
---|
| 410 | </tr> |
---|
| 411 | </table> |
---|
| 412 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 413 | <tr> |
---|
| 414 | <td> |
---|
| 415 | |
---|
| 416 | </td> |
---|
| 417 | <td> |
---|
| 418 | |
---|
| 419 | <p> |
---|
| 420 | |
---|
| 421 | <p> |
---|
| 422 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00250">250</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 423 | <p> |
---|
| 424 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00117">clearString</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00062">G4VUIshell::promptString</a>. |
---|
| 425 | <p> |
---|
| 426 | <div class="fragment"><pre>00252 { |
---|
| 427 | 00253 <span class="keywordflow">if</span>(! <a class="code" href="classG4UItcsh.html#p8">clearString</a>.empty() ) { |
---|
| 428 | 00254 G4cout << <a class="code" href="classG4UItcsh.html#p8">clearString</a>; |
---|
| 429 | 00255 |
---|
| 430 | 00256 G4cout << <a class="code" href="classG4VUIshell.html#p1">promptString</a> << <a class="code" href="classG4UItcsh.html#p0">commandLine</a> << std::flush; |
---|
| 431 | 00257 <span class="comment">// reset cursur position</span> |
---|
| 432 | 00258 <span class="keywordflow">for</span>(G4int i=<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()+1; i>=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>+1; i--) |
---|
| 433 | 00259 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a> << std::flush; |
---|
| 434 | 00260 } |
---|
| 435 | 00261 } |
---|
| 436 | </pre></div> </td> |
---|
| 437 | </tr> |
---|
| 438 | </table> |
---|
| 439 | <a class="anchor" name="b17" doxytag="G4UItcsh::CompleteCommand" ></a><p> |
---|
| 440 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 441 | <tr> |
---|
| 442 | <td class="mdRow"> |
---|
| 443 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 444 | <tr> |
---|
| 445 | <td class="md" nowrap valign="top"> void G4UItcsh::CompleteCommand </td> |
---|
| 446 | <td class="md" valign="top">( </td> |
---|
| 447 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 448 | <td class="md" valign="top"> ) </td> |
---|
| 449 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 450 | </tr> |
---|
| 451 | |
---|
| 452 | </table> |
---|
| 453 | </td> |
---|
| 454 | </tr> |
---|
| 455 | </table> |
---|
| 456 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 457 | <tr> |
---|
| 458 | <td> |
---|
| 459 | |
---|
| 460 | </td> |
---|
| 461 | <td> |
---|
| 462 | |
---|
| 463 | <p> |
---|
| 464 | |
---|
| 465 | <p> |
---|
| 466 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00385">385</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 467 | <p> |
---|
| 468 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4VUIshell_8hh-source.html#l00073">G4VUIshell::currentCommandDir</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, <a class="el" href="G4VUIshell_8cc-source.html#l00141">G4VUIshell::GetAbsCommandDirPath()</a>, <a class="el" href="G4VUIshell_8cc-source.html#l00177">G4VUIshell::GetCommandPathTail()</a>, <a class="el" href="G4VUIshell_8cc-source.html#l00112">G4VUIshell::GetCommandTree()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00635">GetFirstMatchedString()</a>. |
---|
| 469 | <p> |
---|
| 470 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 471 | <p> |
---|
| 472 | <div class="fragment"><pre>00387 { |
---|
| 473 | 00388 <span class="comment">// inputting string</span> |
---|
| 474 | 00389 G4String input= G4String(commandLine).strip(G4String::leading); |
---|
| 475 | 00390 <span class="comment">// target token is last token</span> |
---|
| 476 | 00391 G4int jhead= input.last(<span class="charliteral">' '</span>); |
---|
| 477 | 00392 <span class="keywordflow">if</span>(jhead != G4int(G4String::npos)) { |
---|
| 478 | 00393 input.remove(0, jhead); |
---|
| 479 | 00394 input= input.strip(G4String::leading); |
---|
| 480 | 00395 } |
---|
| 481 | 00396 |
---|
| 482 | 00397 <span class="comment">// command tree of "user specified directory" </span> |
---|
| 483 | 00398 G4String vpath= <a class="code" href="classG4VUIshell.html#p6">currentCommandDir</a>; |
---|
| 484 | 00399 G4String vcmd; |
---|
| 485 | 00400 |
---|
| 486 | 00401 G4int len= input.length(); |
---|
| 487 | 00402 <span class="keywordflow">if</span>(!input.empty()) { |
---|
| 488 | 00403 G4int indx= -1; |
---|
| 489 | 00404 <span class="keywordflow">for</span>(G4int i=len-1; i>=0; i--) { |
---|
| 490 | 00405 <span class="keywordflow">if</span>(input(i)==<span class="charliteral">'/'</span>) { |
---|
| 491 | 00406 indx= i; |
---|
| 492 | 00407 <span class="keywordflow">break</span>; |
---|
| 493 | 00408 } |
---|
| 494 | 00409 } |
---|
| 495 | 00410 <span class="comment">// get abs. path</span> |
---|
| 496 | 00411 <span class="keywordflow">if</span>(indx != -1) vpath= <a class="code" href="classG4VUIshell.html#b2">GetAbsCommandDirPath</a>(input(0,indx+1)); |
---|
| 497 | 00412 <span class="keywordflow">if</span>(!(indx==0 && len==1)) vcmd= input(indx+1,len-indx-1); <span class="comment">// care for "/"</span> |
---|
| 498 | 00413 } |
---|
| 499 | 00414 |
---|
| 500 | 00415 G4UIcommandTree* atree= <a class="code" href="classG4VUIshell.html#b1">GetCommandTree</a>(vpath); <span class="comment">// get command tree</span> |
---|
| 501 | 00416 <span class="keywordflow">if</span>(atree == NULL) <span class="keywordflow">return</span>; |
---|
| 502 | 00417 |
---|
| 503 | 00418 <span class="comment">// list matched directories/commands</span> |
---|
| 504 | 00419 G4String stream, strtmp; |
---|
| 505 | 00420 G4String inputpath= vpath+vcmd; |
---|
| 506 | 00421 G4int nMatch= 0; |
---|
| 507 | 00422 |
---|
| 508 | 00423 <span class="keywordtype">int</span> Ndir= atree-> GetTreeEntry(); |
---|
| 509 | 00424 <span class="keywordtype">int</span> Ncmd= atree-> GetCommandEntry(); |
---|
| 510 | 00425 |
---|
| 511 | 00426 <span class="comment">// directory ...</span> |
---|
| 512 | 00427 <span class="keywordflow">for</span>(G4int idir=1; idir<=Ndir; idir++) { |
---|
| 513 | 00428 G4String fpdir= atree-> GetTree(idir)-> GetPathName(); |
---|
| 514 | 00429 <span class="comment">// matching test</span> |
---|
| 515 | 00430 <span class="keywordflow">if</span>( fpdir.index(inputpath, 0) == 0) { |
---|
| 516 | 00431 <span class="keywordflow">if</span>(nMatch==0) { |
---|
| 517 | 00432 stream= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpdir); |
---|
| 518 | 00433 } <span class="keywordflow">else</span> { |
---|
| 519 | 00434 strtmp= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpdir); |
---|
| 520 | 00435 stream= <a class="code" href="classG4UItcsh.html#b18">GetFirstMatchedString</a>(stream, strtmp); |
---|
| 521 | 00436 } |
---|
| 522 | 00437 nMatch++; |
---|
| 523 | 00438 } |
---|
| 524 | 00439 } |
---|
| 525 | 00440 |
---|
| 526 | 00441 <span class="comment">// command ...</span> |
---|
| 527 | 00442 <span class="keywordflow">for</span>(G4int icmd=1; icmd<=Ncmd; icmd++){ |
---|
| 528 | 00443 G4String fpcmd= atree-> GetPathName() + |
---|
| 529 | 00444 atree-> GetCommand(icmd) -> GetCommandName(); |
---|
| 530 | 00445 <span class="comment">// matching test</span> |
---|
| 531 | 00446 <span class="keywordflow">if</span>( fpcmd.index(inputpath, 0) ==0) { |
---|
| 532 | 00447 <span class="keywordflow">if</span>(nMatch==0) { |
---|
| 533 | 00448 stream= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpcmd) + <span class="stringliteral">" "</span>; |
---|
| 534 | 00449 } <span class="keywordflow">else</span> { |
---|
| 535 | 00450 strtmp= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpcmd) + <span class="stringliteral">" "</span>; |
---|
| 536 | 00451 stream= <a class="code" href="classG4UItcsh.html#b18">GetFirstMatchedString</a>(stream, strtmp); |
---|
| 537 | 00452 } |
---|
| 538 | 00453 nMatch++; |
---|
| 539 | 00454 } |
---|
| 540 | 00455 } |
---|
| 541 | 00456 |
---|
| 542 | 00457 <span class="keywordflow">if</span>(nMatch==0) <span class="keywordflow">return</span>; <span class="comment">// no matched</span> |
---|
| 543 | 00458 |
---|
| 544 | 00459 <span class="comment">// display...</span> |
---|
| 545 | 00460 input= <a class="code" href="classG4UItcsh.html#p0">commandLine</a>; |
---|
| 546 | 00461 <span class="comment">// target token is last token</span> |
---|
| 547 | 00462 jhead= input.last(<span class="charliteral">' '</span>); |
---|
| 548 | 00463 <span class="keywordflow">if</span>(jhead == G4int(G4String::npos)) jhead=0; |
---|
| 549 | 00464 <span class="keywordflow">else</span> jhead++; |
---|
| 550 | 00465 |
---|
| 551 | 00466 G4int jt= input.find_last_of(<span class="charliteral">'/'</span>); |
---|
| 552 | 00467 <span class="keywordflow">if</span>(jt<jhead) jt=G4String::npos; |
---|
| 553 | 00468 |
---|
| 554 | 00469 <span class="keywordflow">if</span>(jt==G4int(G4String::npos)) jt= jhead; |
---|
| 555 | 00470 <span class="keywordflow">else</span> jt++; |
---|
| 556 | 00471 |
---|
| 557 | 00472 G4String dspstr; |
---|
| 558 | 00473 G4int i; |
---|
| 559 | 00474 <span class="keywordflow">for</span>(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(AsciiBS); <span class="comment">// cleanup</span> |
---|
| 560 | 00475 <span class="keywordflow">for</span>(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(<span class="charliteral">' '</span>); |
---|
| 561 | 00476 <span class="keywordflow">for</span>(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(AsciiBS); |
---|
| 562 | 00477 |
---|
| 563 | 00478 dspstr+= stream; |
---|
| 564 | 00479 G4cout << dspstr << std::flush; |
---|
| 565 | 00480 |
---|
| 566 | 00481 <span class="comment">// command line string</span> |
---|
| 567 | 00482 input.remove(jt); |
---|
| 568 | 00483 input+= stream; |
---|
| 569 | 00484 |
---|
| 570 | 00485 commandLine= input; |
---|
| 571 | 00486 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>= commandLine.length()+1; |
---|
| 572 | 00487 } |
---|
| 573 | </pre></div> </td> |
---|
| 574 | </tr> |
---|
| 575 | </table> |
---|
| 576 | |
---|
| 577 | <p> |
---|
| 578 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b17_cgraph.png" border="0" usemap="#classG4UItcsh_b17_cgraph_map" alt=""></center> |
---|
| 579 | <map name="classG4UItcsh_b17_cgraph_map"> |
---|
| 580 | <area href="classG4VUIshell.html#b2" shape="rect" coords="260,8,505,34" alt=""> |
---|
| 581 | <area href="classG4VUIshell.html#b3" shape="rect" coords="269,58,496,85" alt=""> |
---|
| 582 | <area href="classG4VUIshell.html#b1" shape="rect" coords="280,109,485,136" alt=""> |
---|
| 583 | <area href="classG4UItcsh.html#b18" shape="rect" coords="273,160,492,186" alt=""> |
---|
| 584 | </map> |
---|
| 585 | <a class="anchor" name="b6" doxytag="G4UItcsh::DeleteCharacter" ></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"> void G4UItcsh::DeleteCharacter </td> |
---|
| 592 | <td class="md" valign="top">( </td> |
---|
| 593 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 594 | <td class="md" valign="top"> ) </td> |
---|
| 595 | <td class="md" nowrap><code> [protected]</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 | |
---|
| 606 | </td> |
---|
| 607 | <td> |
---|
| 608 | |
---|
| 609 | <p> |
---|
| 610 | |
---|
| 611 | <p> |
---|
| 612 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00196">196</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 613 | <p> |
---|
| 614 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>. |
---|
| 615 | <p> |
---|
| 616 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 617 | <p> |
---|
| 618 | <div class="fragment"><pre>00198 { |
---|
| 619 | 00199 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#b1">IsCursorLast</a>()) <span class="keywordflow">return</span>; |
---|
| 620 | 00200 |
---|
| 621 | 00201 <span class="comment">// display...</span> |
---|
| 622 | 00202 size_t i; |
---|
| 623 | 00203 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-1; i< <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()-1 ;i++){ |
---|
| 624 | 00204 G4cout << <a class="code" href="classG4UItcsh.html#p0">commandLine</a>[i+1]; |
---|
| 625 | 00205 } |
---|
| 626 | 00206 G4cout << <span class="charliteral">' '</span>; |
---|
| 627 | 00207 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-1; i< <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length() ;i++){ |
---|
| 628 | 00208 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 629 | 00209 } |
---|
| 630 | 00210 G4cout << std::flush; |
---|
| 631 | 00211 |
---|
| 632 | 00212 <span class="comment">// command lin string...</span> |
---|
| 633 | 00213 <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.erase(cursorPosition-1, 1); |
---|
| 634 | 00214 } |
---|
| 635 | </pre></div> </td> |
---|
| 636 | </tr> |
---|
| 637 | </table> |
---|
| 638 | |
---|
| 639 | <p> |
---|
| 640 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b6_cgraph.png" border="0" usemap="#classG4UItcsh_b6_cgraph_map" alt=""></center> |
---|
| 641 | <map name="classG4UItcsh_b6_cgraph_map"> |
---|
| 642 | <area href="classG4UItcsh.html#b1" shape="rect" coords="238,8,398,34" alt=""> |
---|
| 643 | </map> |
---|
| 644 | <a class="anchor" name="b10" doxytag="G4UItcsh::ForwardCursor" ></a><p> |
---|
| 645 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 646 | <tr> |
---|
| 647 | <td class="mdRow"> |
---|
| 648 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 649 | <tr> |
---|
| 650 | <td class="md" nowrap valign="top"> void G4UItcsh::ForwardCursor </td> |
---|
| 651 | <td class="md" valign="top">( </td> |
---|
| 652 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 653 | <td class="md" valign="top"> ) </td> |
---|
| 654 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 655 | </tr> |
---|
| 656 | |
---|
| 657 | </table> |
---|
| 658 | </td> |
---|
| 659 | </tr> |
---|
| 660 | </table> |
---|
| 661 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 662 | <tr> |
---|
| 663 | <td> |
---|
| 664 | |
---|
| 665 | </td> |
---|
| 666 | <td> |
---|
| 667 | |
---|
| 668 | <p> |
---|
| 669 | |
---|
| 670 | <p> |
---|
| 671 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00264">264</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 672 | <p> |
---|
| 673 | References <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>. |
---|
| 674 | <p> |
---|
| 675 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 676 | <p> |
---|
| 677 | <div class="fragment"><pre>00266 { |
---|
| 678 | 00267 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#b1">IsCursorLast</a>()) <span class="keywordflow">return</span>; |
---|
| 679 | 00268 |
---|
| 680 | 00269 G4cout << <a class="code" href="classG4UItcsh.html#p0">commandLine</a>[(size_t)(<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-1)] << std::flush; |
---|
| 681 | 00270 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>++; |
---|
| 682 | 00271 } |
---|
| 683 | </pre></div> </td> |
---|
| 684 | </tr> |
---|
| 685 | </table> |
---|
| 686 | |
---|
| 687 | <p> |
---|
| 688 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b10_cgraph.png" border="0" usemap="#classG4UItcsh_b10_cgraph_map" alt=""></center> |
---|
| 689 | <map name="classG4UItcsh_b10_cgraph_map"> |
---|
| 690 | <area href="classG4UItcsh.html#b1" shape="rect" coords="233,8,393,34" alt=""> |
---|
| 691 | </map> |
---|
| 692 | <a class="anchor" name="a3" doxytag="G4UItcsh::GetCommandLine" ></a><p> |
---|
| 693 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 694 | <tr> |
---|
| 695 | <td class="mdRow"> |
---|
| 696 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 697 | <tr> |
---|
| 698 | <td class="md" nowrap valign="top"> G4String G4UItcsh::GetCommandLine </td> |
---|
| 699 | <td class="md" valign="top">( </td> |
---|
| 700 | <td class="md" nowrap valign="top">const char * </td> |
---|
| 701 | <td class="mdname1" valign="top" nowrap> <em>msg</em> = 0 </td> |
---|
| 702 | <td class="md" valign="top"> ) </td> |
---|
| 703 | <td class="md" nowrap><code> [virtual]</code></td> |
---|
| 704 | </tr> |
---|
| 705 | |
---|
| 706 | </table> |
---|
| 707 | </td> |
---|
| 708 | </tr> |
---|
| 709 | </table> |
---|
| 710 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 711 | <tr> |
---|
| 712 | <td> |
---|
| 713 | |
---|
| 714 | </td> |
---|
| 715 | <td> |
---|
| 716 | |
---|
| 717 | <p> |
---|
| 718 | |
---|
| 719 | <p> |
---|
| 720 | Implements <a class="el" href="classG4VUIshell.html#a7">G4VUIshell</a>. |
---|
| 721 | <p> |
---|
| 722 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00595">595</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 723 | <p> |
---|
| 724 | References <a class="el" href="G4UItcsh_8cc-source.html#l00080">MakePrompt()</a>, <a class="el" href="G4VUIshell_8hh-source.html#l00062">G4VUIshell::promptString</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00109">relativeHistoryIndex</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00702">RestoreTerm()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00686">SetTermToInputMode()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00660">StoreHistory()</a>. |
---|
| 725 | <p> |
---|
| 726 | <div class="fragment"><pre>00597 { |
---|
| 727 | 00598 <a class="code" href="classG4UItcsh.html#b21">SetTermToInputMode</a>(); |
---|
| 728 | 00599 |
---|
| 729 | 00600 <a class="code" href="classG4UItcsh.html#b0">MakePrompt</a>(msg); <span class="comment">// update</span> |
---|
| 730 | 00601 <a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a>= 0; |
---|
| 731 | 00602 |
---|
| 732 | 00603 G4cout << <a class="code" href="classG4VUIshell.html#p1">promptString</a> << std::flush; |
---|
| 733 | 00604 |
---|
| 734 | 00605 G4String newCommand= <a class="code" href="classG4UItcsh.html#b3">ReadLine</a>(); <span class="comment">// read line...</span> |
---|
| 735 | 00606 <span class="comment">// multi-line</span> |
---|
| 736 | 00607 <span class="keywordflow">while</span>( (newCommand.length() > 0) && |
---|
| 737 | 00608 ( newCommand[newCommand.length()-1] == <span class="charliteral">'_'</span>) ) { |
---|
| 738 | 00609 newCommand.remove(newCommand.length()-1); |
---|
| 739 | 00610 G4cout << G4endl; |
---|
| 740 | 00611 <a class="code" href="classG4VUIshell.html#p1">promptString</a>= <span class="stringliteral">"? "</span>; |
---|
| 741 | 00612 G4cout << <a class="code" href="classG4VUIshell.html#p1">promptString</a> << std::flush; |
---|
| 742 | 00613 G4String newLine= <a class="code" href="classG4UItcsh.html#b3">ReadLine</a>(); |
---|
| 743 | 00614 newCommand.append(newLine); |
---|
| 744 | 00615 } |
---|
| 745 | 00616 |
---|
| 746 | 00617 <span class="comment">// update history...</span> |
---|
| 747 | 00618 G4bool isMeaningfull= FALSE; <span class="comment">// check NULL command</span> |
---|
| 748 | 00619 <span class="keywordflow">for</span> (size_t i=0; i<newCommand.length(); i++) { |
---|
| 749 | 00620 <span class="keywordflow">if</span>(newCommand[i] != <span class="charliteral">' '</span>) { |
---|
| 750 | 00621 isMeaningfull= TRUE; |
---|
| 751 | 00622 <span class="keywordflow">break</span>; |
---|
| 752 | 00623 } |
---|
| 753 | 00624 } |
---|
| 754 | 00625 <span class="keywordflow">if</span>( !newCommand.empty() && isMeaningfull) <a class="code" href="classG4UItcsh.html#b19">StoreHistory</a>(newCommand); |
---|
| 755 | 00626 |
---|
| 756 | 00627 <span class="comment">// reset terminal</span> |
---|
| 757 | 00628 <a class="code" href="classG4UItcsh.html#b22">RestoreTerm</a>(); |
---|
| 758 | 00629 |
---|
| 759 | 00630 G4cout << G4endl; |
---|
| 760 | 00631 <span class="keywordflow">return</span> newCommand; |
---|
| 761 | 00632 } |
---|
| 762 | </pre></div> </td> |
---|
| 763 | </tr> |
---|
| 764 | </table> |
---|
| 765 | |
---|
| 766 | <p> |
---|
| 767 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_a3_cgraph.png" border="0" usemap="#classG4UItcsh_a3_cgraph_map" alt=""></center> |
---|
| 768 | <map name="classG4UItcsh_a3_cgraph_map"> |
---|
| 769 | <area href="classG4UItcsh.html#b0" shape="rect" coords="276,286,436,313" alt=""> |
---|
| 770 | <area href="classG4UItcsh.html#b3" shape="rect" coords="285,337,426,363" alt=""> |
---|
| 771 | <area href="classG4UItcsh.html#b22" shape="rect" coords="276,387,436,414" alt=""> |
---|
| 772 | <area href="classG4UItcsh.html#b21" shape="rect" coords="250,438,461,465" alt=""> |
---|
| 773 | <area href="classG4UItcsh.html#b19" shape="rect" coords="277,489,434,515" alt=""> |
---|
| 774 | <area href="classG4UItcsh.html#b5" shape="rect" coords="516,58,724,85" alt=""> |
---|
| 775 | <area href="classG4UItcsh.html#b1" shape="rect" coords="822,134,982,161" alt=""> |
---|
| 776 | <area href="classG4UItcsh.html#b11" shape="rect" coords="528,311,712,338" alt=""> |
---|
| 777 | <area href="classG4UItcsh.html#b8" shape="rect" coords="528,109,712,135" alt=""> |
---|
| 778 | <area href="classG4UItcsh.html#b17" shape="rect" coords="518,413,721,439" alt=""> |
---|
| 779 | <area href="classG4UItcsh.html#b6" shape="rect" coords="529,159,710,186" alt=""> |
---|
| 780 | <area href="classG4UItcsh.html#b10" shape="rect" coords="533,210,706,237" alt=""> |
---|
| 781 | <area href="classG4UItcsh.html#b2" shape="rect" coords="509,463,730,490" alt=""> |
---|
| 782 | <area href="classG4UItcsh.html#b4" shape="rect" coords="532,261,708,287" alt=""> |
---|
| 783 | <area href="classG4UItcsh.html#b16" shape="rect" coords="510,362,729,389" alt=""> |
---|
| 784 | <area href="classG4UItcsh.html#b13" shape="rect" coords="529,514,710,541" alt=""> |
---|
| 785 | <area href="classG4UItcsh.html#b12" shape="rect" coords="530,565,709,591" alt=""> |
---|
| 786 | <area href="classG4UItcsh.html#b14" shape="rect" coords="533,615,706,642" alt=""> |
---|
| 787 | <area href="classG4UItcsh.html#b15" shape="rect" coords="521,666,718,693" alt=""> |
---|
| 788 | <area href="classG4VUIshell.html#b2" shape="rect" coords="780,362,1025,389" alt=""> |
---|
| 789 | <area href="classG4VUIshell.html#b3" shape="rect" coords="789,413,1016,439" alt=""> |
---|
| 790 | <area href="classG4VUIshell.html#b1" shape="rect" coords="800,463,1005,490" alt=""> |
---|
| 791 | <area href="classG4UItcsh.html#b18" shape="rect" coords="793,514,1012,541" alt=""> |
---|
| 792 | <area href="classG4VUIshell.html#a6" shape="rect" coords="813,311,992,338" alt=""> |
---|
| 793 | <area href="classG4UItcsh.html#b7" shape="rect" coords="832,615,973,642" alt=""> |
---|
| 794 | <area href="classG4UItcsh.html#b20" shape="rect" coords="816,666,989,693" alt=""> |
---|
| 795 | </map> |
---|
| 796 | <a class="anchor" name="b18" doxytag="G4UItcsh::GetFirstMatchedString" ></a><p> |
---|
| 797 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 798 | <tr> |
---|
| 799 | <td class="mdRow"> |
---|
| 800 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 801 | <tr> |
---|
| 802 | <td class="md" nowrap valign="top"> G4String G4UItcsh::GetFirstMatchedString </td> |
---|
| 803 | <td class="md" valign="top">( </td> |
---|
| 804 | <td class="md" nowrap valign="top">const G4String & </td> |
---|
| 805 | <td class="mdname" nowrap> <em>str1</em>, </td> |
---|
| 806 | </tr> |
---|
| 807 | <tr> |
---|
| 808 | <td></td> |
---|
| 809 | <td></td> |
---|
| 810 | <td class="md" nowrap>const G4String & </td> |
---|
| 811 | <td class="mdname" nowrap> <em>str2</em></td> |
---|
| 812 | </tr> |
---|
| 813 | <tr> |
---|
| 814 | <td></td> |
---|
| 815 | <td class="md">) </td> |
---|
| 816 | <td class="md" colspan="2"> const<code> [protected]</code></td> |
---|
| 817 | </tr> |
---|
| 818 | |
---|
| 819 | </table> |
---|
| 820 | </td> |
---|
| 821 | </tr> |
---|
| 822 | </table> |
---|
| 823 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 824 | <tr> |
---|
| 825 | <td> |
---|
| 826 | |
---|
| 827 | </td> |
---|
| 828 | <td> |
---|
| 829 | |
---|
| 830 | <p> |
---|
| 831 | |
---|
| 832 | <p> |
---|
| 833 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00635">635</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 834 | <p> |
---|
| 835 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00385">CompleteCommand()</a>. |
---|
| 836 | <p> |
---|
| 837 | <div class="fragment"><pre>00638 { |
---|
| 838 | 00639 <span class="keywordtype">int</span> nlen1= str1.length(); |
---|
| 839 | 00640 <span class="keywordtype">int</span> nlen2= str2.length(); |
---|
| 840 | 00641 |
---|
| 841 | 00642 <span class="keywordtype">int</span> nmin = nlen1<nlen2 ? nlen1 : nlen2; |
---|
| 842 | 00643 |
---|
| 843 | 00644 G4String strMatched; |
---|
| 844 | 00645 <span class="keywordflow">for</span>(size_t i=0; G4int(i)<nmin; i++){ |
---|
| 845 | 00646 <span class="keywordflow">if</span>(str1[i]==str2[i]) { |
---|
| 846 | 00647 strMatched+= str1[i]; |
---|
| 847 | 00648 } <span class="keywordflow">else</span> { |
---|
| 848 | 00649 <span class="keywordflow">break</span>; |
---|
| 849 | 00650 } |
---|
| 850 | 00651 } |
---|
| 851 | 00652 |
---|
| 852 | 00653 <span class="keywordflow">return</span> strMatched; |
---|
| 853 | 00654 } |
---|
| 854 | </pre></div> </td> |
---|
| 855 | </tr> |
---|
| 856 | </table> |
---|
| 857 | <a class="anchor" name="b2" doxytag="G4UItcsh::InitializeCommandLine" ></a><p> |
---|
| 858 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 859 | <tr> |
---|
| 860 | <td class="mdRow"> |
---|
| 861 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 862 | <tr> |
---|
| 863 | <td class="md" nowrap valign="top"> void G4UItcsh::InitializeCommandLine </td> |
---|
| 864 | <td class="md" valign="top">( </td> |
---|
| 865 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 866 | <td class="md" valign="top"> ) </td> |
---|
| 867 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 868 | </tr> |
---|
| 869 | |
---|
| 870 | </table> |
---|
| 871 | </td> |
---|
| 872 | </tr> |
---|
| 873 | </table> |
---|
| 874 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 875 | <tr> |
---|
| 876 | <td> |
---|
| 877 | |
---|
| 878 | </td> |
---|
| 879 | <td> |
---|
| 880 | |
---|
| 881 | <p> |
---|
| 882 | |
---|
| 883 | <p> |
---|
| 884 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00136">136</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 885 | <p> |
---|
| 886 | References <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>. |
---|
| 887 | <p> |
---|
| 888 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 889 | <p> |
---|
| 890 | <div class="fragment"><pre>00138 { |
---|
| 891 | 00139 <a class="code" href="classG4UItcsh.html#p0">commandLine</a>= <span class="stringliteral">""</span>; |
---|
| 892 | 00140 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>= 1; |
---|
| 893 | 00141 } |
---|
| 894 | </pre></div> </td> |
---|
| 895 | </tr> |
---|
| 896 | </table> |
---|
| 897 | <a class="anchor" name="b4" doxytag="G4UItcsh::InsertCharacter" ></a><p> |
---|
| 898 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 899 | <tr> |
---|
| 900 | <td class="mdRow"> |
---|
| 901 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 902 | <tr> |
---|
| 903 | <td class="md" nowrap valign="top"> void G4UItcsh::InsertCharacter </td> |
---|
| 904 | <td class="md" valign="top">( </td> |
---|
| 905 | <td class="md" nowrap valign="top">char </td> |
---|
| 906 | <td class="mdname1" valign="top" nowrap> <em>cc</em> </td> |
---|
| 907 | <td class="md" valign="top"> ) </td> |
---|
| 908 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 909 | </tr> |
---|
| 910 | |
---|
| 911 | </table> |
---|
| 912 | </td> |
---|
| 913 | </tr> |
---|
| 914 | </table> |
---|
| 915 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 916 | <tr> |
---|
| 917 | <td> |
---|
| 918 | |
---|
| 919 | </td> |
---|
| 920 | <td> |
---|
| 921 | |
---|
| 922 | <p> |
---|
| 923 | |
---|
| 924 | <p> |
---|
| 925 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00144">144</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 926 | <p> |
---|
| 927 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00059">AsciiPrintableMin</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>. |
---|
| 928 | <p> |
---|
| 929 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 930 | <p> |
---|
| 931 | <div class="fragment"><pre>00146 { |
---|
| 932 | 00147 <span class="keywordflow">if</span>( ! (cc >= <a class="code" href="G4UItcsh_8cc.html#a17">AsciiPrintableMin</a> && isprint(cc)) ) <span class="keywordflow">return</span>; |
---|
| 933 | 00148 |
---|
| 934 | 00149 <span class="comment">// display...</span> |
---|
| 935 | 00150 G4cout << cc; |
---|
| 936 | 00151 size_t i; |
---|
| 937 | 00152 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-1; i<<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length() ;i++) |
---|
| 938 | 00153 G4cout << <a class="code" href="classG4UItcsh.html#p0">commandLine</a>[i]; |
---|
| 939 | 00154 <span class="keywordflow">for</span>(i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-1; i<commandLine.length() ;i++) |
---|
| 940 | 00155 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 941 | 00156 G4cout << std::flush; |
---|
| 942 | 00157 |
---|
| 943 | 00158 <span class="comment">// command line string...</span> |
---|
| 944 | 00159 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#b1">IsCursorLast</a>()) { <span class="comment">// add</span> |
---|
| 945 | 00160 commandLine+= cc; |
---|
| 946 | 00161 } <span class="keywordflow">else</span> { <span class="comment">// insert</span> |
---|
| 947 | 00162 commandLine.insert(cursorPosition-1, G4String(cc)); |
---|
| 948 | 00163 } |
---|
| 949 | 00164 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>++; |
---|
| 950 | 00165 } |
---|
| 951 | </pre></div> </td> |
---|
| 952 | </tr> |
---|
| 953 | </table> |
---|
| 954 | |
---|
| 955 | <p> |
---|
| 956 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b4_cgraph.png" border="0" usemap="#classG4UItcsh_b4_cgraph_map" alt=""></center> |
---|
| 957 | <map name="classG4UItcsh_b4_cgraph_map"> |
---|
| 958 | <area href="classG4UItcsh.html#b1" shape="rect" coords="235,8,395,34" alt=""> |
---|
| 959 | </map> |
---|
| 960 | <a class="anchor" name="b1" doxytag="G4UItcsh::IsCursorLast" ></a><p> |
---|
| 961 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 962 | <tr> |
---|
| 963 | <td class="mdRow"> |
---|
| 964 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 965 | <tr> |
---|
| 966 | <td class="md" nowrap valign="top"> G4bool G4UItcsh::IsCursorLast </td> |
---|
| 967 | <td class="md" valign="top">( </td> |
---|
| 968 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 969 | <td class="md" valign="top"> ) </td> |
---|
| 970 | <td class="md" nowrap> const<code> [inline, protected]</code></td> |
---|
| 971 | </tr> |
---|
| 972 | |
---|
| 973 | </table> |
---|
| 974 | </td> |
---|
| 975 | </tr> |
---|
| 976 | </table> |
---|
| 977 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 978 | <tr> |
---|
| 979 | <td> |
---|
| 980 | |
---|
| 981 | </td> |
---|
| 982 | <td> |
---|
| 983 | |
---|
| 984 | <p> |
---|
| 985 | |
---|
| 986 | <p> |
---|
| 987 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00129">129</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 988 | <p> |
---|
| 989 | References <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>. |
---|
| 990 | <p> |
---|
| 991 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00168">BackspaceCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00233">ClearAfterCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00196">DeleteCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00264">ForwardCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00144">InsertCharacter()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 992 | <p> |
---|
| 993 | <div class="fragment"><pre>00130 { |
---|
| 994 | 00131 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a> == G4int(<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()+1)) <span class="keywordflow">return</span> TRUE; |
---|
| 995 | 00132 <span class="keywordflow">else</span> <span class="keywordflow">return</span> FALSE; |
---|
| 996 | 00133 } |
---|
| 997 | </pre></div> </td> |
---|
| 998 | </tr> |
---|
| 999 | </table> |
---|
| 1000 | <a class="anchor" name="b16" doxytag="G4UItcsh::ListMatchedCommand" ></a><p> |
---|
| 1001 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1002 | <tr> |
---|
| 1003 | <td class="mdRow"> |
---|
| 1004 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1005 | <tr> |
---|
| 1006 | <td class="md" nowrap valign="top"> void G4UItcsh::ListMatchedCommand </td> |
---|
| 1007 | <td class="md" valign="top">( </td> |
---|
| 1008 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1009 | <td class="md" valign="top"> ) </td> |
---|
| 1010 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1011 | </tr> |
---|
| 1012 | |
---|
| 1013 | </table> |
---|
| 1014 | </td> |
---|
| 1015 | </tr> |
---|
| 1016 | </table> |
---|
| 1017 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1018 | <tr> |
---|
| 1019 | <td> |
---|
| 1020 | |
---|
| 1021 | </td> |
---|
| 1022 | <td> |
---|
| 1023 | |
---|
| 1024 | <p> |
---|
| 1025 | |
---|
| 1026 | <p> |
---|
| 1027 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00346">346</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1028 | <p> |
---|
| 1029 | References <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4VUIshell_8hh-source.html#l00073">G4VUIshell::currentCommandDir</a>, <a class="el" href="G4VUIshell_8cc-source.html#l00141">G4VUIshell::GetAbsCommandDirPath()</a>, <a class="el" href="G4VUIshell_8cc-source.html#l00215">G4VUIshell::ListCommand()</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00062">G4VUIshell::promptString</a>. |
---|
| 1030 | <p> |
---|
| 1031 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 1032 | <p> |
---|
| 1033 | <div class="fragment"><pre>00348 { |
---|
| 1034 | 00349 G4cout << G4endl; |
---|
| 1035 | 00350 |
---|
| 1036 | 00351 <span class="comment">// input string</span> |
---|
| 1037 | 00352 G4String input= G4String(commandLine).strip(G4String::leading); |
---|
| 1038 | 00353 <span class="comment">// target token is last token</span> |
---|
| 1039 | 00354 G4int jhead= input.last(<span class="charliteral">' '</span>); |
---|
| 1040 | 00355 <span class="keywordflow">if</span>(jhead != G4int(G4String::npos)) { |
---|
| 1041 | 00356 input.remove(0, jhead); |
---|
| 1042 | 00357 input= input.strip(G4String::leading); |
---|
| 1043 | 00358 } |
---|
| 1044 | 00359 |
---|
| 1045 | 00360 <span class="comment">// command tree of "user specified directory"</span> |
---|
| 1046 | 00361 G4String vpath= <a class="code" href="classG4VUIshell.html#p6">currentCommandDir</a>; |
---|
| 1047 | 00362 G4String vcmd; |
---|
| 1048 | 00363 |
---|
| 1049 | 00364 <span class="keywordflow">if</span>( !input.empty() ) { |
---|
| 1050 | 00365 G4int len= input.length(); |
---|
| 1051 | 00366 G4int indx=-1; |
---|
| 1052 | 00367 <span class="keywordflow">for</span>(G4int i=len-1; i>=0; i--) { |
---|
| 1053 | 00368 <span class="keywordflow">if</span>(input[(size_t)i]==<span class="charliteral">'/'</span>) { |
---|
| 1054 | 00369 indx= i; |
---|
| 1055 | 00370 <span class="keywordflow">break</span>; |
---|
| 1056 | 00371 } |
---|
| 1057 | 00372 } |
---|
| 1058 | 00373 <span class="comment">// get abs. path</span> |
---|
| 1059 | 00374 <span class="keywordflow">if</span>(indx != -1) vpath= <a class="code" href="classG4VUIshell.html#b2">GetAbsCommandDirPath</a>(input(0,indx+1)); |
---|
| 1060 | 00375 <span class="keywordflow">if</span>(!(indx==0 && len==1)) vcmd= input(indx+1,len-indx-1); <span class="comment">// care for "/"</span> |
---|
| 1061 | 00376 } |
---|
| 1062 | 00377 |
---|
| 1063 | 00378 <span class="comment">// list matched dirs/commands</span> |
---|
| 1064 | 00379 <a class="code" href="classG4VUIshell.html#a6">ListCommand</a>(vpath, vpath+vcmd); |
---|
| 1065 | 00380 |
---|
| 1066 | 00381 G4cout << <a class="code" href="classG4VUIshell.html#p1">promptString</a> << <a class="code" href="classG4UItcsh.html#p0">commandLine</a> << std::flush; |
---|
| 1067 | 00382 } |
---|
| 1068 | </pre></div> </td> |
---|
| 1069 | </tr> |
---|
| 1070 | </table> |
---|
| 1071 | |
---|
| 1072 | <p> |
---|
| 1073 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b16_cgraph.png" border="0" usemap="#classG4UItcsh_b16_cgraph_map" alt=""></center> |
---|
| 1074 | <map name="classG4UItcsh_b16_cgraph_map"> |
---|
| 1075 | <area href="classG4VUIshell.html#b2" shape="rect" coords="275,7,521,34" alt=""> |
---|
| 1076 | <area href="classG4VUIshell.html#a6" shape="rect" coords="309,58,487,85" alt=""> |
---|
| 1077 | <area href="classG4UIArrayString.html#a2" shape="rect" coords="571,58,731,85" alt=""> |
---|
| 1078 | </map> |
---|
| 1079 | <a class="anchor" name="b0" doxytag="G4UItcsh::MakePrompt" ></a><p> |
---|
| 1080 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1081 | <tr> |
---|
| 1082 | <td class="mdRow"> |
---|
| 1083 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1084 | <tr> |
---|
| 1085 | <td class="md" nowrap valign="top"> void G4UItcsh::MakePrompt </td> |
---|
| 1086 | <td class="md" valign="top">( </td> |
---|
| 1087 | <td class="md" nowrap valign="top">const char * </td> |
---|
| 1088 | <td class="mdname1" valign="top" nowrap> <em>msg</em> = 0 </td> |
---|
| 1089 | <td class="md" valign="top"> ) </td> |
---|
| 1090 | <td class="md" nowrap><code> [protected, virtual]</code></td> |
---|
| 1091 | </tr> |
---|
| 1092 | |
---|
| 1093 | </table> |
---|
| 1094 | </td> |
---|
| 1095 | </tr> |
---|
| 1096 | </table> |
---|
| 1097 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1098 | <tr> |
---|
| 1099 | <td> |
---|
| 1100 | |
---|
| 1101 | </td> |
---|
| 1102 | <td> |
---|
| 1103 | |
---|
| 1104 | <p> |
---|
| 1105 | |
---|
| 1106 | <p> |
---|
| 1107 | Reimplemented from <a class="el" href="classG4VUIshell.html#b0">G4VUIshell</a>. |
---|
| 1108 | <p> |
---|
| 1109 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00080">80</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1110 | <p> |
---|
| 1111 | References <a class="el" href="G4VUIshell_8hh-source.html#l00073">G4VUIshell::currentCommandDir</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00108">currentHistoryNo</a>, <a class="el" href="G4VUIshell_8hh-source.html#l00061">G4VUIshell::promptSetting</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00062">G4VUIshell::promptString</a>. |
---|
| 1112 | <p> |
---|
| 1113 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00595">GetCommandLine()</a>. |
---|
| 1114 | <p> |
---|
| 1115 | <div class="fragment"><pre>00082 { |
---|
| 1116 | 00083 <span class="keywordflow">if</span>(<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>.length()<=1) { |
---|
| 1117 | 00084 <a class="code" href="classG4VUIshell.html#p1">promptString</a>= <a class="code" href="classG4VUIshell.html#p0">promptSetting</a>; |
---|
| 1118 | 00085 <span class="keywordflow">return</span>; |
---|
| 1119 | 00086 } |
---|
| 1120 | 00087 |
---|
| 1121 | 00088 <a class="code" href="classG4VUIshell.html#p1">promptString</a>=<span class="stringliteral">""</span>; |
---|
| 1122 | 00089 size_t i; |
---|
| 1123 | 00090 <span class="keywordflow">for</span>(i=0; i<<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>.length()-1; i++){ |
---|
| 1124 | 00091 <span class="keywordflow">if</span>(<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>[i]==<span class="charliteral">'%'</span>){ |
---|
| 1125 | 00092 <span class="keywordflow">switch</span> (<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>[i+1]) { |
---|
| 1126 | 00093 <span class="keywordflow">case</span> <span class="charliteral">'s'</span>: <span class="comment">// current application status</span> |
---|
| 1127 | 00094 { |
---|
| 1128 | 00095 G4String stateStr; |
---|
| 1129 | 00096 <span class="keywordflow">if</span>(msg) |
---|
| 1130 | 00097 { stateStr = msg; } |
---|
| 1131 | 00098 <span class="keywordflow">else</span> |
---|
| 1132 | 00099 { |
---|
| 1133 | 00100 G4StateManager* statM= G4StateManager::GetStateManager(); |
---|
| 1134 | 00101 stateStr= statM-> GetStateString(statM->GetCurrentState()); |
---|
| 1135 | 00102 } |
---|
| 1136 | 00103 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(stateStr); |
---|
| 1137 | 00104 i++; |
---|
| 1138 | 00105 } |
---|
| 1139 | 00106 <span class="keywordflow">break</span>; |
---|
| 1140 | 00107 <span class="keywordflow">case</span> <span class="charliteral">'/'</span>: <span class="comment">// current working directory</span> |
---|
| 1141 | 00108 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(currentCommandDir); |
---|
| 1142 | 00109 i++; |
---|
| 1143 | 00110 <span class="keywordflow">break</span>; |
---|
| 1144 | 00111 <span class="keywordflow">case</span> <span class="charliteral">'h'</span>: <span class="comment">// history#</span> |
---|
| 1145 | 00112 { |
---|
| 1146 | 00113 std::ostringstream os; |
---|
| 1147 | 00114 os << <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>; |
---|
| 1148 | 00115 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(os.str()); |
---|
| 1149 | 00116 i++; |
---|
| 1150 | 00117 } |
---|
| 1151 | 00118 <span class="keywordflow">break</span>; |
---|
| 1152 | 00119 <span class="keywordflow">default</span>: |
---|
| 1153 | 00120 <span class="keywordflow">break</span>; |
---|
| 1154 | 00121 } |
---|
| 1155 | 00122 } <span class="keywordflow">else</span> { |
---|
| 1156 | 00123 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(G4String(promptSetting[i])); |
---|
| 1157 | 00124 } |
---|
| 1158 | 00125 } |
---|
| 1159 | 00126 |
---|
| 1160 | 00127 <span class="comment">// append last chaacter</span> |
---|
| 1161 | 00128 <span class="keywordflow">if</span>(i == <a class="code" href="classG4VUIshell.html#p0">promptSetting</a>.length()-1) |
---|
| 1162 | 00129 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(G4String(promptSetting[i])); |
---|
| 1163 | 00130 } |
---|
| 1164 | </pre></div> </td> |
---|
| 1165 | </tr> |
---|
| 1166 | </table> |
---|
| 1167 | <a class="anchor" name="b13" doxytag="G4UItcsh::MoveCursorEnd" ></a><p> |
---|
| 1168 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1169 | <tr> |
---|
| 1170 | <td class="mdRow"> |
---|
| 1171 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1172 | <tr> |
---|
| 1173 | <td class="md" nowrap valign="top"> void G4UItcsh::MoveCursorEnd </td> |
---|
| 1174 | <td class="md" valign="top">( </td> |
---|
| 1175 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1176 | <td class="md" valign="top"> ) </td> |
---|
| 1177 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1178 | </tr> |
---|
| 1179 | |
---|
| 1180 | </table> |
---|
| 1181 | </td> |
---|
| 1182 | </tr> |
---|
| 1183 | </table> |
---|
| 1184 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1185 | <tr> |
---|
| 1186 | <td> |
---|
| 1187 | |
---|
| 1188 | </td> |
---|
| 1189 | <td> |
---|
| 1190 | |
---|
| 1191 | <p> |
---|
| 1192 | |
---|
| 1193 | <p> |
---|
| 1194 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00295">295</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1195 | <p> |
---|
| 1196 | References <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>. |
---|
| 1197 | <p> |
---|
| 1198 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 1199 | <p> |
---|
| 1200 | <div class="fragment"><pre>00297 { |
---|
| 1201 | 00298 <span class="keywordflow">for</span>(size_t i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>-1; i<<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length(); i++){ |
---|
| 1202 | 00299 G4cout << <a class="code" href="classG4UItcsh.html#p0">commandLine</a>[i]; |
---|
| 1203 | 00300 } |
---|
| 1204 | 00301 G4cout << std::flush; |
---|
| 1205 | 00302 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>=<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()+1; |
---|
| 1206 | 00303 } |
---|
| 1207 | </pre></div> </td> |
---|
| 1208 | </tr> |
---|
| 1209 | </table> |
---|
| 1210 | <a class="anchor" name="b12" doxytag="G4UItcsh::MoveCursorTop" ></a><p> |
---|
| 1211 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1212 | <tr> |
---|
| 1213 | <td class="mdRow"> |
---|
| 1214 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1215 | <tr> |
---|
| 1216 | <td class="md" nowrap valign="top"> void G4UItcsh::MoveCursorTop </td> |
---|
| 1217 | <td class="md" valign="top">( </td> |
---|
| 1218 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1219 | <td class="md" valign="top"> ) </td> |
---|
| 1220 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1221 | </tr> |
---|
| 1222 | |
---|
| 1223 | </table> |
---|
| 1224 | </td> |
---|
| 1225 | </tr> |
---|
| 1226 | </table> |
---|
| 1227 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1228 | <tr> |
---|
| 1229 | <td> |
---|
| 1230 | |
---|
| 1231 | </td> |
---|
| 1232 | <td> |
---|
| 1233 | |
---|
| 1234 | <p> |
---|
| 1235 | |
---|
| 1236 | <p> |
---|
| 1237 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00284">284</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1238 | <p> |
---|
| 1239 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>. |
---|
| 1240 | <p> |
---|
| 1241 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 1242 | <p> |
---|
| 1243 | <div class="fragment"><pre>00286 { |
---|
| 1244 | 00287 <span class="keywordflow">for</span>(G4int i=<a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>; i>1; i--){ |
---|
| 1245 | 00288 G4cout << <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>; |
---|
| 1246 | 00289 } |
---|
| 1247 | 00290 G4cout << std::flush; |
---|
| 1248 | 00291 cursorPosition=1; |
---|
| 1249 | 00292 } |
---|
| 1250 | </pre></div> </td> |
---|
| 1251 | </tr> |
---|
| 1252 | </table> |
---|
| 1253 | <a class="anchor" name="b14" doxytag="G4UItcsh::NextCommand" ></a><p> |
---|
| 1254 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1255 | <tr> |
---|
| 1256 | <td class="mdRow"> |
---|
| 1257 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1258 | <tr> |
---|
| 1259 | <td class="md" nowrap valign="top"> void G4UItcsh::NextCommand </td> |
---|
| 1260 | <td class="md" valign="top">( </td> |
---|
| 1261 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1262 | <td class="md" valign="top"> ) </td> |
---|
| 1263 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1264 | </tr> |
---|
| 1265 | |
---|
| 1266 | </table> |
---|
| 1267 | </td> |
---|
| 1268 | </tr> |
---|
| 1269 | </table> |
---|
| 1270 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1271 | <tr> |
---|
| 1272 | <td> |
---|
| 1273 | |
---|
| 1274 | </td> |
---|
| 1275 | <td> |
---|
| 1276 | |
---|
| 1277 | <p> |
---|
| 1278 | |
---|
| 1279 | <p> |
---|
| 1280 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00326">326</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1281 | <p> |
---|
| 1282 | References <a class="el" href="G4UItcsh_8cc-source.html#l00217">ClearLine()</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00077">commandLineBuf</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00108">currentHistoryNo</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00107">maxHistory</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00109">relativeHistoryIndex</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00671">RestoreHistory()</a>. |
---|
| 1283 | <p> |
---|
| 1284 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 1285 | <p> |
---|
| 1286 | <div class="fragment"><pre>00328 { |
---|
| 1287 | 00329 G4int nhmax= <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>-1 >= <a class="code" href="classG4UItcsh.html#p4">maxHistory</a> ? |
---|
| 1288 | 00330 <a class="code" href="classG4UItcsh.html#p4">maxHistory</a> : <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>-1; |
---|
| 1289 | 00331 |
---|
| 1290 | 00332 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a>>=-nhmax && <a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a><=-1) { |
---|
| 1291 | 00333 <a class="code" href="classG4UItcsh.html#b7">ClearLine</a>(); |
---|
| 1292 | 00334 relativeHistoryIndex++; |
---|
| 1293 | 00335 |
---|
| 1294 | 00336 <span class="keywordflow">if</span>(relativeHistoryIndex==0) <a class="code" href="classG4UItcsh.html#p0">commandLine</a>= <a class="code" href="classG4UItcsh.html#p2">commandLineBuf</a>; |
---|
| 1295 | 00337 <span class="keywordflow">else</span> <a class="code" href="classG4UItcsh.html#p0">commandLine</a>= <a class="code" href="classG4UItcsh.html#b20">RestoreHistory</a>(currentHistoryNo+relativeHistoryIndex); |
---|
| 1296 | 00338 |
---|
| 1297 | 00339 G4cout << <a class="code" href="classG4UItcsh.html#p0">commandLine</a> << std::flush; |
---|
| 1298 | 00340 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>= <a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()+1; |
---|
| 1299 | 00341 } |
---|
| 1300 | 00342 } |
---|
| 1301 | </pre></div> </td> |
---|
| 1302 | </tr> |
---|
| 1303 | </table> |
---|
| 1304 | |
---|
| 1305 | <p> |
---|
| 1306 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b14_cgraph.png" border="0" usemap="#classG4UItcsh_b14_cgraph_map" alt=""></center> |
---|
| 1307 | <map name="classG4UItcsh_b14_cgraph_map"> |
---|
| 1308 | <area href="classG4UItcsh.html#b7" shape="rect" coords="245,7,386,34" alt=""> |
---|
| 1309 | <area href="classG4UItcsh.html#b20" shape="rect" coords="229,58,402,85" alt=""> |
---|
| 1310 | </map> |
---|
| 1311 | <a class="anchor" name="b15" doxytag="G4UItcsh::PreviousCommand" ></a><p> |
---|
| 1312 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1313 | <tr> |
---|
| 1314 | <td class="mdRow"> |
---|
| 1315 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1316 | <tr> |
---|
| 1317 | <td class="md" nowrap valign="top"> void G4UItcsh::PreviousCommand </td> |
---|
| 1318 | <td class="md" valign="top">( </td> |
---|
| 1319 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1320 | <td class="md" valign="top"> ) </td> |
---|
| 1321 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1322 | </tr> |
---|
| 1323 | |
---|
| 1324 | </table> |
---|
| 1325 | </td> |
---|
| 1326 | </tr> |
---|
| 1327 | </table> |
---|
| 1328 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1329 | <tr> |
---|
| 1330 | <td> |
---|
| 1331 | |
---|
| 1332 | </td> |
---|
| 1333 | <td> |
---|
| 1334 | |
---|
| 1335 | <p> |
---|
| 1336 | |
---|
| 1337 | <p> |
---|
| 1338 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00306">306</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1339 | <p> |
---|
| 1340 | References <a class="el" href="G4UItcsh_8cc-source.html#l00217">ClearLine()</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00077">commandLineBuf</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00108">currentHistoryNo</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00076">cursorPosition</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00107">maxHistory</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00109">relativeHistoryIndex</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00671">RestoreHistory()</a>. |
---|
| 1341 | <p> |
---|
| 1342 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. |
---|
| 1343 | <p> |
---|
| 1344 | <div class="fragment"><pre>00308 { |
---|
| 1345 | 00309 G4int nhmax= <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>-1 >= <a class="code" href="classG4UItcsh.html#p4">maxHistory</a> ? |
---|
| 1346 | 00310 <a class="code" href="classG4UItcsh.html#p4">maxHistory</a> : <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>-1; |
---|
| 1347 | 00311 |
---|
| 1348 | 00312 <span class="comment">// retain current input</span> |
---|
| 1349 | 00313 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a>==0) <a class="code" href="classG4UItcsh.html#p2">commandLineBuf</a>= <a class="code" href="classG4UItcsh.html#p0">commandLine</a>; |
---|
| 1350 | 00314 |
---|
| 1351 | 00315 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a>>=-nhmax+1 && <a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a><=0) { |
---|
| 1352 | 00316 <a class="code" href="classG4UItcsh.html#b7">ClearLine</a>(); |
---|
| 1353 | 00317 <a class="code" href="classG4UItcsh.html#p6">relativeHistoryIndex</a>--; |
---|
| 1354 | 00318 commandLine= <a class="code" href="classG4UItcsh.html#b20">RestoreHistory</a>(currentHistoryNo+relativeHistoryIndex); |
---|
| 1355 | 00319 |
---|
| 1356 | 00320 G4cout << commandLine << std::flush; |
---|
| 1357 | 00321 <a class="code" href="classG4UItcsh.html#p1">cursorPosition</a>= commandLine.length()+1; |
---|
| 1358 | 00322 } |
---|
| 1359 | 00323 } |
---|
| 1360 | </pre></div> </td> |
---|
| 1361 | </tr> |
---|
| 1362 | </table> |
---|
| 1363 | |
---|
| 1364 | <p> |
---|
| 1365 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b15_cgraph.png" border="0" usemap="#classG4UItcsh_b15_cgraph_map" alt=""></center> |
---|
| 1366 | <map name="classG4UItcsh_b15_cgraph_map"> |
---|
| 1367 | <area href="classG4UItcsh.html#b7" shape="rect" coords="271,7,413,34" alt=""> |
---|
| 1368 | <area href="classG4UItcsh.html#b20" shape="rect" coords="255,58,429,85" alt=""> |
---|
| 1369 | </map> |
---|
| 1370 | <a class="anchor" name="b3" doxytag="G4UItcsh::ReadLine" ></a><p> |
---|
| 1371 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1372 | <tr> |
---|
| 1373 | <td class="mdRow"> |
---|
| 1374 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1375 | <tr> |
---|
| 1376 | <td class="md" nowrap valign="top"> G4String G4UItcsh::ReadLine </td> |
---|
| 1377 | <td class="md" valign="top">( </td> |
---|
| 1378 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1379 | <td class="md" valign="top"> ) </td> |
---|
| 1380 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1381 | </tr> |
---|
| 1382 | |
---|
| 1383 | </table> |
---|
| 1384 | </td> |
---|
| 1385 | </tr> |
---|
| 1386 | </table> |
---|
| 1387 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1388 | <tr> |
---|
| 1389 | <td> |
---|
| 1390 | |
---|
| 1391 | </td> |
---|
| 1392 | <td> |
---|
| 1393 | |
---|
| 1394 | <p> |
---|
| 1395 | |
---|
| 1396 | <p> |
---|
| 1397 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00494">494</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1398 | <p> |
---|
| 1399 | References <a class="el" href="G4UItcsh_8cc-source.html#l00055">AsciiBS</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00041">AsciiCtrA</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00042">AsciiCtrB</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00043">AsciiCtrC</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00044">AsciiCtrD</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00045">AsciiCtrE</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00046">AsciiCtrF</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00047">AsciiCtrK</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00048">AsciiCtrL</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00049">AsciiCtrN</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00050">AsciiCtrP</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00051">AsciiCtrQ</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00052">AsciiCtrS</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00053">AsciiCtrZ</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00056">AsciiDEL</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00057">AsciiESC</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00054">AsciiTAB</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00168">BackspaceCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00274">BackwardCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00233">ClearAfterCursor()</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00075">commandLine</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00385">CompleteCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00196">DeleteCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00264">ForwardCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00136">InitializeCommandLine()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00144">InsertCharacter()</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00346">ListMatchedCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00295">MoveCursorEnd()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00284">MoveCursorTop()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>. |
---|
| 1400 | <p> |
---|
| 1401 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00595">GetCommandLine()</a>. |
---|
| 1402 | <p> |
---|
| 1403 | <div class="fragment"><pre>00496 { |
---|
| 1404 | 00497 <a class="code" href="classG4UItcsh.html#b2">InitializeCommandLine</a>(); |
---|
| 1405 | 00498 |
---|
| 1406 | 00499 <span class="keywordtype">char</span> cc; |
---|
| 1407 | 00500 <span class="keywordflow">do</span>{ <span class="comment">// input loop</span> |
---|
| 1408 | 00501 G4cin.get(cc); |
---|
| 1409 | 00502 |
---|
| 1410 | 00503 <span class="comment">// treatment for special character</span> |
---|
| 1411 | 00504 <span class="keywordflow">switch</span>(cc){ |
---|
| 1412 | 00505 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a0">AsciiCtrA</a>: <span class="comment">// ... move cursor to the top</span> |
---|
| 1413 | 00506 <a class="code" href="classG4UItcsh.html#b12">MoveCursorTop</a>(); |
---|
| 1414 | 00507 <span class="keywordflow">break</span>; |
---|
| 1415 | 00508 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a1">AsciiCtrB</a>: <span class="comment">// ... backward cursor</span> |
---|
| 1416 | 00509 <a class="code" href="classG4UItcsh.html#b11">BackwardCursor</a>(); |
---|
| 1417 | 00510 <span class="keywordflow">break</span>; |
---|
| 1418 | 00511 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a3">AsciiCtrD</a>: <span class="comment">// ... delete/exit/show matched list</span> |
---|
| 1419 | 00512 <span class="keywordflow">if</span>(<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.length()!=0 && <a class="code" href="classG4UItcsh.html#b1">IsCursorLast</a>()) <a class="code" href="classG4UItcsh.html#b16">ListMatchedCommand</a>(); |
---|
| 1420 | 00513 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.empty()) { |
---|
| 1421 | 00514 G4cout << G4endl; |
---|
| 1422 | 00515 exit(0); |
---|
| 1423 | 00516 } <span class="keywordflow">else</span> <a class="code" href="classG4UItcsh.html#b6">DeleteCharacter</a>(); |
---|
| 1424 | 00517 <span class="keywordflow">break</span>; |
---|
| 1425 | 00518 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a4">AsciiCtrE</a>: <span class="comment">// ... move cursor to the end</span> |
---|
| 1426 | 00519 <a class="code" href="classG4UItcsh.html#b13">MoveCursorEnd</a>(); |
---|
| 1427 | 00520 <span class="keywordflow">break</span>; |
---|
| 1428 | 00521 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a5">AsciiCtrF</a>: <span class="comment">// ... forward cursor</span> |
---|
| 1429 | 00522 <a class="code" href="classG4UItcsh.html#b10">ForwardCursor</a>(); |
---|
| 1430 | 00523 <span class="keywordflow">break</span>; |
---|
| 1431 | 00524 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a6">AsciiCtrK</a>: <span class="comment">// ... clear after the cursor</span> |
---|
| 1432 | 00525 <a class="code" href="classG4UItcsh.html#b8">ClearAfterCursor</a>(); |
---|
| 1433 | 00526 <span class="keywordflow">break</span>; |
---|
| 1434 | 00527 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a7">AsciiCtrL</a>: <span class="comment">// ... clear screen</span> |
---|
| 1435 | 00528 <span class="comment">// ClearScreen();</span> |
---|
| 1436 | 00529 <span class="keywordflow">break</span>; |
---|
| 1437 | 00530 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a8">AsciiCtrN</a>: <span class="comment">// ... next command</span> |
---|
| 1438 | 00531 <a class="code" href="classG4UItcsh.html#b14">NextCommand</a>(); |
---|
| 1439 | 00532 <span class="keywordflow">break</span>; |
---|
| 1440 | 00533 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a9">AsciiCtrP</a>: <span class="comment">// ... previous command</span> |
---|
| 1441 | 00534 <a class="code" href="classG4UItcsh.html#b15">PreviousCommand</a>(); |
---|
| 1442 | 00535 <span class="keywordflow">break</span>; |
---|
| 1443 | 00536 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a13">AsciiTAB</a>: <span class="comment">// ... command completion</span> |
---|
| 1444 | 00537 <span class="keywordflow">if</span>( (!<a class="code" href="classG4UItcsh.html#p0">commandLine</a>.empty()) && <a class="code" href="classG4UItcsh.html#b1">IsCursorLast</a>()) <a class="code" href="classG4UItcsh.html#b17">CompleteCommand</a>(); |
---|
| 1445 | 00538 <span class="keywordflow">break</span>; |
---|
| 1446 | 00539 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a15">AsciiDEL</a>: <span class="comment">// ... backspace</span> |
---|
| 1447 | 00540 <a class="code" href="classG4UItcsh.html#b5">BackspaceCharacter</a>(); |
---|
| 1448 | 00541 <span class="keywordflow">break</span>; |
---|
| 1449 | 00542 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a14">AsciiBS</a>: <span class="comment">// ... backspace</span> |
---|
| 1450 | 00543 <a class="code" href="classG4UItcsh.html#b5">BackspaceCharacter</a>(); |
---|
| 1451 | 00544 <span class="keywordflow">break</span>; |
---|
| 1452 | 00545 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a2">AsciiCtrC</a>: <span class="comment">// ... kill prompt</span> |
---|
| 1453 | 00546 <span class="keywordflow">break</span>; |
---|
| 1454 | 00547 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a10">AsciiCtrQ</a>: <span class="comment">// ... restarts suspeded output</span> |
---|
| 1455 | 00548 <span class="keywordflow">break</span>; |
---|
| 1456 | 00549 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a11">AsciiCtrS</a>: <span class="comment">// ... suspend output</span> |
---|
| 1457 | 00550 <span class="keywordflow">break</span>; |
---|
| 1458 | 00551 <span class="keywordflow">case</span> <a class="code" href="G4UItcsh_8cc.html#a12">AsciiCtrZ</a>: <span class="comment">// ... suspend</span> |
---|
| 1459 | 00552 <span class="keywordflow">break</span>; |
---|
| 1460 | 00553 <span class="keywordflow">default</span>: |
---|
| 1461 | 00554 <span class="keywordflow">break</span>; |
---|
| 1462 | 00555 } |
---|
| 1463 | 00556 |
---|
| 1464 | 00557 <span class="comment">// treatment for ESC. character</span> |
---|
| 1465 | 00558 <span class="keywordflow">if</span>( cc == <a class="code" href="G4UItcsh_8cc.html#a16">AsciiESC</a>) { <span class="comment">// ESC</span> |
---|
| 1466 | 00559 G4cin.get(cc); |
---|
| 1467 | 00560 <span class="keywordflow">if</span> (cc == <span class="charliteral">'['</span> || <span class="charliteral">'O'</span>) { <span class="comment">// care for another termcap, such as konsole</span> |
---|
| 1468 | 00561 G4cin.get(cc); |
---|
| 1469 | 00562 <span class="keywordflow">switch</span>(cc) { |
---|
| 1470 | 00563 <span class="keywordflow">case</span> <span class="charliteral">'A'</span>: <span class="comment">// [UP]</span> |
---|
| 1471 | 00564 cc = <span class="charliteral">'P'</span> - <span class="charliteral">'@'</span>; |
---|
| 1472 | 00565 <a class="code" href="classG4UItcsh.html#b15">PreviousCommand</a>(); <span class="comment">// ... show previous commad</span> |
---|
| 1473 | 00566 <span class="keywordflow">break</span>; |
---|
| 1474 | 00567 <span class="keywordflow">case</span> <span class="charliteral">'B'</span>: <span class="comment">// [DOWN]</span> |
---|
| 1475 | 00568 cc = <span class="charliteral">'N'</span> - <span class="charliteral">'@'</span>; |
---|
| 1476 | 00569 <a class="code" href="classG4UItcsh.html#b14">NextCommand</a>(); <span class="comment">// ... show next commad</span> |
---|
| 1477 | 00570 <span class="keywordflow">break</span>; |
---|
| 1478 | 00571 <span class="keywordflow">case</span> <span class="charliteral">'C'</span>: <span class="comment">// [RIGHT]</span> |
---|
| 1479 | 00572 cc = <span class="charliteral">'F'</span> - <span class="charliteral">'@'</span>; |
---|
| 1480 | 00573 <a class="code" href="classG4UItcsh.html#b10">ForwardCursor</a>(); <span class="comment">// ... forward cursor</span> |
---|
| 1481 | 00574 <span class="keywordflow">break</span>; |
---|
| 1482 | 00575 <span class="keywordflow">case</span> <span class="charliteral">'D'</span>: <span class="comment">// [LEFT]</span> |
---|
| 1483 | 00576 cc = <span class="charliteral">'B'</span> - <span class="charliteral">'@'</span>; |
---|
| 1484 | 00577 <a class="code" href="classG4UItcsh.html#b11">BackwardCursor</a>(); <span class="comment">// ... backward cursor</span> |
---|
| 1485 | 00578 <span class="keywordflow">break</span>; |
---|
| 1486 | 00579 <span class="keywordflow">default</span>: <span class="comment">// who knows !?</span> |
---|
| 1487 | 00580 cc = 0; |
---|
| 1488 | 00581 <span class="keywordflow">break</span>; |
---|
| 1489 | 00582 } |
---|
| 1490 | 00583 } |
---|
| 1491 | 00584 } |
---|
| 1492 | 00585 |
---|
| 1493 | 00586 <span class="comment">// insert character to command line and display</span> |
---|
| 1494 | 00587 <a class="code" href="classG4UItcsh.html#b4">InsertCharacter</a>(cc); |
---|
| 1495 | 00588 |
---|
| 1496 | 00589 } <span class="keywordflow">while</span>( cc != <span class="charliteral">'\n'</span>); |
---|
| 1497 | 00590 |
---|
| 1498 | 00591 <span class="keywordflow">return</span> <a class="code" href="classG4UItcsh.html#p0">commandLine</a>; |
---|
| 1499 | 00592 } |
---|
| 1500 | </pre></div> </td> |
---|
| 1501 | </tr> |
---|
| 1502 | </table> |
---|
| 1503 | |
---|
| 1504 | <p> |
---|
| 1505 | Here is the call graph for this function:<p><center><img src="classG4UItcsh_b3_cgraph.png" border="0" usemap="#classG4UItcsh_b3_cgraph_map" alt=""></center> |
---|
| 1506 | <map name="classG4UItcsh_b3_cgraph_map"> |
---|
| 1507 | <area href="classG4UItcsh.html#b5" shape="rect" coords="203,58,411,85" alt=""> |
---|
| 1508 | <area href="classG4UItcsh.html#b1" shape="rect" coords="510,134,670,161" alt=""> |
---|
| 1509 | <area href="classG4UItcsh.html#b11" shape="rect" coords="215,311,399,338" alt=""> |
---|
| 1510 | <area href="classG4UItcsh.html#b8" shape="rect" coords="215,109,399,135" alt=""> |
---|
| 1511 | <area href="classG4UItcsh.html#b17" shape="rect" coords="206,413,409,439" alt=""> |
---|
| 1512 | <area href="classG4UItcsh.html#b6" shape="rect" coords="217,159,398,186" alt=""> |
---|
| 1513 | <area href="classG4UItcsh.html#b10" shape="rect" coords="221,210,394,237" alt=""> |
---|
| 1514 | <area href="classG4UItcsh.html#b2" shape="rect" coords="197,463,418,490" alt=""> |
---|
| 1515 | <area href="classG4UItcsh.html#b4" shape="rect" coords="219,261,395,287" alt=""> |
---|
| 1516 | <area href="classG4UItcsh.html#b16" shape="rect" coords="198,362,417,389" alt=""> |
---|
| 1517 | <area href="classG4UItcsh.html#b13" shape="rect" coords="217,514,398,541" alt=""> |
---|
| 1518 | <area href="classG4UItcsh.html#b12" shape="rect" coords="218,565,397,591" alt=""> |
---|
| 1519 | <area href="classG4UItcsh.html#b14" shape="rect" coords="221,615,394,642" alt=""> |
---|
| 1520 | <area href="classG4UItcsh.html#b15" shape="rect" coords="209,666,406,693" alt=""> |
---|
| 1521 | <area href="classG4VUIshell.html#b2" shape="rect" coords="467,362,713,389" alt=""> |
---|
| 1522 | <area href="classG4VUIshell.html#b3" shape="rect" coords="477,413,703,439" alt=""> |
---|
| 1523 | <area href="classG4VUIshell.html#b1" shape="rect" coords="487,463,693,490" alt=""> |
---|
| 1524 | <area href="classG4UItcsh.html#b18" shape="rect" coords="481,514,699,541" alt=""> |
---|
| 1525 | <area href="classG4VUIshell.html#a6" shape="rect" coords="501,311,679,338" alt=""> |
---|
| 1526 | <area href="classG4UIArrayString.html#a2" shape="rect" coords="763,311,923,338" alt=""> |
---|
| 1527 | <area href="classG4UItcsh.html#b7" shape="rect" coords="519,615,661,642" alt=""> |
---|
| 1528 | <area href="classG4UItcsh.html#b20" shape="rect" coords="503,666,677,693" alt=""> |
---|
| 1529 | </map> |
---|
| 1530 | <a class="anchor" name="b20" doxytag="G4UItcsh::RestoreHistory" ></a><p> |
---|
| 1531 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1532 | <tr> |
---|
| 1533 | <td class="mdRow"> |
---|
| 1534 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1535 | <tr> |
---|
| 1536 | <td class="md" nowrap valign="top"> G4String G4UItcsh::RestoreHistory </td> |
---|
| 1537 | <td class="md" valign="top">( </td> |
---|
| 1538 | <td class="md" nowrap valign="top">G4int </td> |
---|
| 1539 | <td class="mdname1" valign="top" nowrap> <em>index</em> </td> |
---|
| 1540 | <td class="md" valign="top"> ) </td> |
---|
| 1541 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1542 | </tr> |
---|
| 1543 | |
---|
| 1544 | </table> |
---|
| 1545 | </td> |
---|
| 1546 | </tr> |
---|
| 1547 | </table> |
---|
| 1548 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1549 | <tr> |
---|
| 1550 | <td> |
---|
| 1551 | |
---|
| 1552 | </td> |
---|
| 1553 | <td> |
---|
| 1554 | |
---|
| 1555 | <p> |
---|
| 1556 | |
---|
| 1557 | <p> |
---|
| 1558 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00671">671</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1559 | <p> |
---|
| 1560 | References <a class="el" href="G4UItcsh_8hh-source.html#l00106">commandHistory</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00108">currentHistoryNo</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00107">maxHistory</a>. |
---|
| 1561 | <p> |
---|
| 1562 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>. |
---|
| 1563 | <p> |
---|
| 1564 | <div class="fragment"><pre>00673 { |
---|
| 1565 | 00674 <span class="keywordflow">if</span>(histNo>= <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>) <span class="keywordflow">return</span> <span class="stringliteral">""</span>; |
---|
| 1566 | 00675 |
---|
| 1567 | 00676 G4int index= histNo%<a class="code" href="classG4UItcsh.html#p4">maxHistory</a>; |
---|
| 1568 | 00677 <span class="keywordflow">if</span>(index==0) index= <a class="code" href="classG4UItcsh.html#p4">maxHistory</a>; |
---|
| 1569 | 00678 |
---|
| 1570 | 00679 <span class="keywordflow">return</span> <a class="code" href="classG4UItcsh.html#p3">commandHistory</a>[index-1]; <span class="comment">// 0-offset</span> |
---|
| 1571 | 00680 } |
---|
| 1572 | </pre></div> </td> |
---|
| 1573 | </tr> |
---|
| 1574 | </table> |
---|
| 1575 | <a class="anchor" name="b22" doxytag="G4UItcsh::RestoreTerm" ></a><p> |
---|
| 1576 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1577 | <tr> |
---|
| 1578 | <td class="mdRow"> |
---|
| 1579 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1580 | <tr> |
---|
| 1581 | <td class="md" nowrap valign="top"> void G4UItcsh::RestoreTerm </td> |
---|
| 1582 | <td class="md" valign="top">( </td> |
---|
| 1583 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1584 | <td class="md" valign="top"> ) </td> |
---|
| 1585 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1586 | </tr> |
---|
| 1587 | |
---|
| 1588 | </table> |
---|
| 1589 | </td> |
---|
| 1590 | </tr> |
---|
| 1591 | </table> |
---|
| 1592 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1593 | <tr> |
---|
| 1594 | <td> |
---|
| 1595 | |
---|
| 1596 | </td> |
---|
| 1597 | <td> |
---|
| 1598 | |
---|
| 1599 | <p> |
---|
| 1600 | |
---|
| 1601 | <p> |
---|
| 1602 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00702">702</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1603 | <p> |
---|
| 1604 | References <a class="el" href="G4UItcsh_8hh-source.html#l00116">tios</a>. |
---|
| 1605 | <p> |
---|
| 1606 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00595">GetCommandLine()</a>. |
---|
| 1607 | <p> |
---|
| 1608 | <div class="fragment"><pre>00704 { |
---|
| 1609 | 00705 tcsetattr(0, TCSAFLUSH, &tios); |
---|
| 1610 | 00706 } |
---|
| 1611 | </pre></div> </td> |
---|
| 1612 | </tr> |
---|
| 1613 | </table> |
---|
| 1614 | <a class="anchor" name="a2" doxytag="G4UItcsh::SetLsColor" ></a><p> |
---|
| 1615 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1616 | <tr> |
---|
| 1617 | <td class="mdRow"> |
---|
| 1618 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1619 | <tr> |
---|
| 1620 | <td class="md" nowrap valign="top"> void G4UItcsh::SetLsColor </td> |
---|
| 1621 | <td class="md" valign="top">( </td> |
---|
| 1622 | <td class="md" nowrap valign="top"><a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> </td> |
---|
| 1623 | <td class="mdname" nowrap> <em>dirColor</em>, </td> |
---|
| 1624 | </tr> |
---|
| 1625 | <tr> |
---|
| 1626 | <td></td> |
---|
| 1627 | <td></td> |
---|
| 1628 | <td class="md" nowrap><a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> </td> |
---|
| 1629 | <td class="mdname" nowrap> <em>cmdColor</em></td> |
---|
| 1630 | </tr> |
---|
| 1631 | <tr> |
---|
| 1632 | <td></td> |
---|
| 1633 | <td class="md">) </td> |
---|
| 1634 | <td class="md" colspan="2"><code> [inline]</code></td> |
---|
| 1635 | </tr> |
---|
| 1636 | |
---|
| 1637 | </table> |
---|
| 1638 | </td> |
---|
| 1639 | </tr> |
---|
| 1640 | </table> |
---|
| 1641 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1642 | <tr> |
---|
| 1643 | <td> |
---|
| 1644 | |
---|
| 1645 | </td> |
---|
| 1646 | <td> |
---|
| 1647 | |
---|
| 1648 | <p> |
---|
| 1649 | |
---|
| 1650 | <p> |
---|
| 1651 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00135">135</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1652 | <p> |
---|
| 1653 | References <a class="el" href="G4VUIshell_8hh-source.html#l00070">G4VUIshell::commandColor</a>, <a class="el" href="G4VUIshell_8hh-source.html#l00069">G4VUIshell::directoryColor</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00068">G4VUIshell::lsColorFlag</a>. |
---|
| 1654 | <p> |
---|
| 1655 | <div class="fragment"><pre>00137 { |
---|
| 1656 | 00138 <a class="code" href="classG4VUIshell.html#p3">lsColorFlag</a>= TRUE; |
---|
| 1657 | 00139 <a class="code" href="classG4VUIshell.html#p4">directoryColor</a>= dirColor; |
---|
| 1658 | 00140 <a class="code" href="classG4VUIshell.html#p5">commandColor</a>= cmdColor; |
---|
| 1659 | 00141 } |
---|
| 1660 | </pre></div> </td> |
---|
| 1661 | </tr> |
---|
| 1662 | </table> |
---|
| 1663 | <a class="anchor" name="b21" doxytag="G4UItcsh::SetTermToInputMode" ></a><p> |
---|
| 1664 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1665 | <tr> |
---|
| 1666 | <td class="mdRow"> |
---|
| 1667 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1668 | <tr> |
---|
| 1669 | <td class="md" nowrap valign="top"> void G4UItcsh::SetTermToInputMode </td> |
---|
| 1670 | <td class="md" valign="top">( </td> |
---|
| 1671 | <td class="mdname1" valign="top" nowrap> </td> |
---|
| 1672 | <td class="md" valign="top"> ) </td> |
---|
| 1673 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1674 | </tr> |
---|
| 1675 | |
---|
| 1676 | </table> |
---|
| 1677 | </td> |
---|
| 1678 | </tr> |
---|
| 1679 | </table> |
---|
| 1680 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1681 | <tr> |
---|
| 1682 | <td> |
---|
| 1683 | |
---|
| 1684 | </td> |
---|
| 1685 | <td> |
---|
| 1686 | |
---|
| 1687 | <p> |
---|
| 1688 | |
---|
| 1689 | <p> |
---|
| 1690 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00686">686</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1691 | <p> |
---|
| 1692 | References <a class="el" href="G4UItcsh_8hh-source.html#l00116">tios</a>. |
---|
| 1693 | <p> |
---|
| 1694 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00595">GetCommandLine()</a>. |
---|
| 1695 | <p> |
---|
| 1696 | <div class="fragment"><pre>00688 { |
---|
| 1697 | 00689 termios tiosbuf= <a class="code" href="classG4UItcsh.html#p7">tios</a>; |
---|
| 1698 | 00690 |
---|
| 1699 | 00691 tiosbuf.c_iflag &= ~(BRKINT | ISTRIP); |
---|
| 1700 | 00692 tiosbuf.c_iflag |= (IGNBRK | IGNPAR); |
---|
| 1701 | 00693 tiosbuf.c_lflag &= ~(ICANON | IEXTEN | ECHO); |
---|
| 1702 | 00694 tiosbuf.c_cc[VMIN] = 1; |
---|
| 1703 | 00695 tiosbuf.c_cc[VTIME] = 0; |
---|
| 1704 | 00696 |
---|
| 1705 | 00697 tcsetattr(0, TCSAFLUSH, &tiosbuf); |
---|
| 1706 | 00698 } |
---|
| 1707 | </pre></div> </td> |
---|
| 1708 | </tr> |
---|
| 1709 | </table> |
---|
| 1710 | <a class="anchor" name="b19" doxytag="G4UItcsh::StoreHistory" ></a><p> |
---|
| 1711 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1712 | <tr> |
---|
| 1713 | <td class="mdRow"> |
---|
| 1714 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1715 | <tr> |
---|
| 1716 | <td class="md" nowrap valign="top"> void G4UItcsh::StoreHistory </td> |
---|
| 1717 | <td class="md" valign="top">( </td> |
---|
| 1718 | <td class="md" nowrap valign="top">G4String </td> |
---|
| 1719 | <td class="mdname1" valign="top" nowrap> <em>aCommand</em> </td> |
---|
| 1720 | <td class="md" valign="top"> ) </td> |
---|
| 1721 | <td class="md" nowrap><code> [protected]</code></td> |
---|
| 1722 | </tr> |
---|
| 1723 | |
---|
| 1724 | </table> |
---|
| 1725 | </td> |
---|
| 1726 | </tr> |
---|
| 1727 | </table> |
---|
| 1728 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1729 | <tr> |
---|
| 1730 | <td> |
---|
| 1731 | |
---|
| 1732 | </td> |
---|
| 1733 | <td> |
---|
| 1734 | |
---|
| 1735 | <p> |
---|
| 1736 | |
---|
| 1737 | <p> |
---|
| 1738 | Definition at line <a class="el" href="G4UItcsh_8cc-source.html#l00660">660</a> of file <a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a>. |
---|
| 1739 | <p> |
---|
| 1740 | References <a class="el" href="G4UItcsh_8hh-source.html#l00106">commandHistory</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00108">currentHistoryNo</a>, and <a class="el" href="G4UItcsh_8hh-source.html#l00107">maxHistory</a>. |
---|
| 1741 | <p> |
---|
| 1742 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00595">GetCommandLine()</a>. |
---|
| 1743 | <p> |
---|
| 1744 | <div class="fragment"><pre>00662 { |
---|
| 1745 | 00663 G4int i= <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>%<a class="code" href="classG4UItcsh.html#p4">maxHistory</a>; |
---|
| 1746 | 00664 <span class="keywordflow">if</span>(i==0) i=<a class="code" href="classG4UItcsh.html#p4">maxHistory</a>; |
---|
| 1747 | 00665 |
---|
| 1748 | 00666 <a class="code" href="classG4UItcsh.html#p3">commandHistory</a>[i-1]= aCommand; <span class="comment">// 0-offset</span> |
---|
| 1749 | 00667 <a class="code" href="classG4UItcsh.html#p5">currentHistoryNo</a>++; |
---|
| 1750 | 00668 } |
---|
| 1751 | </pre></div> </td> |
---|
| 1752 | </tr> |
---|
| 1753 | </table> |
---|
| 1754 | <hr><h2>Member Data Documentation</h2> |
---|
| 1755 | <a class="anchor" name="p8" doxytag="G4UItcsh::clearString" ></a><p> |
---|
| 1756 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1757 | <tr> |
---|
| 1758 | <td class="mdRow"> |
---|
| 1759 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1760 | <tr> |
---|
| 1761 | <td class="md" nowrap valign="top"> G4String <a class="el" href="classG4UItcsh.html#p8">G4UItcsh::clearString</a><code> [protected]</code> |
---|
| 1762 | </table> |
---|
| 1763 | </td> |
---|
| 1764 | </tr> |
---|
| 1765 | </table> |
---|
| 1766 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1767 | <tr> |
---|
| 1768 | <td> |
---|
| 1769 | |
---|
| 1770 | </td> |
---|
| 1771 | <td> |
---|
| 1772 | |
---|
| 1773 | <p> |
---|
| 1774 | |
---|
| 1775 | <p> |
---|
| 1776 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00117">117</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1777 | <p> |
---|
| 1778 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00250">ClearScreen()</a>. </td> |
---|
| 1779 | </tr> |
---|
| 1780 | </table> |
---|
| 1781 | <a class="anchor" name="p3" doxytag="G4UItcsh::commandHistory" ></a><p> |
---|
| 1782 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1783 | <tr> |
---|
| 1784 | <td class="mdRow"> |
---|
| 1785 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1786 | <tr> |
---|
| 1787 | <td class="md" nowrap valign="top"> std::vector<G4String> <a class="el" href="classG4UItcsh.html#p3">G4UItcsh::commandHistory</a><code> [protected]</code> |
---|
| 1788 | </table> |
---|
| 1789 | </td> |
---|
| 1790 | </tr> |
---|
| 1791 | </table> |
---|
| 1792 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1793 | <tr> |
---|
| 1794 | <td> |
---|
| 1795 | |
---|
| 1796 | </td> |
---|
| 1797 | <td> |
---|
| 1798 | |
---|
| 1799 | <p> |
---|
| 1800 | |
---|
| 1801 | <p> |
---|
| 1802 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00106">106</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1803 | <p> |
---|
| 1804 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00671">RestoreHistory()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00660">StoreHistory()</a>. </td> |
---|
| 1805 | </tr> |
---|
| 1806 | </table> |
---|
| 1807 | <a class="anchor" name="p0" doxytag="G4UItcsh::commandLine" ></a><p> |
---|
| 1808 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1809 | <tr> |
---|
| 1810 | <td class="mdRow"> |
---|
| 1811 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1812 | <tr> |
---|
| 1813 | <td class="md" nowrap valign="top"> G4String <a class="el" href="classG4UItcsh.html#p0">G4UItcsh::commandLine</a><code> [protected]</code> |
---|
| 1814 | </table> |
---|
| 1815 | </td> |
---|
| 1816 | </tr> |
---|
| 1817 | </table> |
---|
| 1818 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1819 | <tr> |
---|
| 1820 | <td> |
---|
| 1821 | |
---|
| 1822 | </td> |
---|
| 1823 | <td> |
---|
| 1824 | |
---|
| 1825 | <p> |
---|
| 1826 | |
---|
| 1827 | <p> |
---|
| 1828 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00075">75</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1829 | <p> |
---|
| 1830 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00168">BackspaceCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00233">ClearAfterCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00217">ClearLine()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00250">ClearScreen()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00385">CompleteCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00196">DeleteCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00264">ForwardCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00136">InitializeCommandLine()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00144">InsertCharacter()</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00346">ListMatchedCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00295">MoveCursorEnd()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00494">ReadLine()</a>. </td> |
---|
| 1831 | </tr> |
---|
| 1832 | </table> |
---|
| 1833 | <a class="anchor" name="p2" doxytag="G4UItcsh::commandLineBuf" ></a><p> |
---|
| 1834 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1835 | <tr> |
---|
| 1836 | <td class="mdRow"> |
---|
| 1837 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1838 | <tr> |
---|
| 1839 | <td class="md" nowrap valign="top"> G4String <a class="el" href="classG4UItcsh.html#p2">G4UItcsh::commandLineBuf</a><code> [protected]</code> |
---|
| 1840 | </table> |
---|
| 1841 | </td> |
---|
| 1842 | </tr> |
---|
| 1843 | </table> |
---|
| 1844 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1845 | <tr> |
---|
| 1846 | <td> |
---|
| 1847 | |
---|
| 1848 | </td> |
---|
| 1849 | <td> |
---|
| 1850 | |
---|
| 1851 | <p> |
---|
| 1852 | |
---|
| 1853 | <p> |
---|
| 1854 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00077">77</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1855 | <p> |
---|
| 1856 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>. </td> |
---|
| 1857 | </tr> |
---|
| 1858 | </table> |
---|
| 1859 | <a class="anchor" name="p5" doxytag="G4UItcsh::currentHistoryNo" ></a><p> |
---|
| 1860 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1861 | <tr> |
---|
| 1862 | <td class="mdRow"> |
---|
| 1863 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1864 | <tr> |
---|
| 1865 | <td class="md" nowrap valign="top"> G4int <a class="el" href="classG4UItcsh.html#p5">G4UItcsh::currentHistoryNo</a><code> [protected]</code> |
---|
| 1866 | </table> |
---|
| 1867 | </td> |
---|
| 1868 | </tr> |
---|
| 1869 | </table> |
---|
| 1870 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1871 | <tr> |
---|
| 1872 | <td> |
---|
| 1873 | |
---|
| 1874 | </td> |
---|
| 1875 | <td> |
---|
| 1876 | |
---|
| 1877 | <p> |
---|
| 1878 | |
---|
| 1879 | <p> |
---|
| 1880 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00108">108</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1881 | <p> |
---|
| 1882 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00080">MakePrompt()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00671">RestoreHistory()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00660">StoreHistory()</a>. </td> |
---|
| 1883 | </tr> |
---|
| 1884 | </table> |
---|
| 1885 | <a class="anchor" name="p1" doxytag="G4UItcsh::cursorPosition" ></a><p> |
---|
| 1886 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1887 | <tr> |
---|
| 1888 | <td class="mdRow"> |
---|
| 1889 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1890 | <tr> |
---|
| 1891 | <td class="md" nowrap valign="top"> G4int <a class="el" href="classG4UItcsh.html#p1">G4UItcsh::cursorPosition</a><code> [protected]</code> |
---|
| 1892 | </table> |
---|
| 1893 | </td> |
---|
| 1894 | </tr> |
---|
| 1895 | </table> |
---|
| 1896 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1897 | <tr> |
---|
| 1898 | <td> |
---|
| 1899 | |
---|
| 1900 | </td> |
---|
| 1901 | <td> |
---|
| 1902 | |
---|
| 1903 | <p> |
---|
| 1904 | |
---|
| 1905 | <p> |
---|
| 1906 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00076">76</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1907 | <p> |
---|
| 1908 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00168">BackspaceCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00274">BackwardCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00233">ClearAfterCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00217">ClearLine()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00250">ClearScreen()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00385">CompleteCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00196">DeleteCharacter()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00264">ForwardCursor()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00136">InitializeCommandLine()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00144">InsertCharacter()</a>, <a class="el" href="G4UItcsh_8hh-source.html#l00129">IsCursorLast()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00295">MoveCursorEnd()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00284">MoveCursorTop()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>. </td> |
---|
| 1909 | </tr> |
---|
| 1910 | </table> |
---|
| 1911 | <a class="anchor" name="p4" doxytag="G4UItcsh::maxHistory" ></a><p> |
---|
| 1912 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1913 | <tr> |
---|
| 1914 | <td class="mdRow"> |
---|
| 1915 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1916 | <tr> |
---|
| 1917 | <td class="md" nowrap valign="top"> G4int <a class="el" href="classG4UItcsh.html#p4">G4UItcsh::maxHistory</a><code> [protected]</code> |
---|
| 1918 | </table> |
---|
| 1919 | </td> |
---|
| 1920 | </tr> |
---|
| 1921 | </table> |
---|
| 1922 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1923 | <tr> |
---|
| 1924 | <td> |
---|
| 1925 | |
---|
| 1926 | </td> |
---|
| 1927 | <td> |
---|
| 1928 | |
---|
| 1929 | <p> |
---|
| 1930 | |
---|
| 1931 | <p> |
---|
| 1932 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00107">107</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1933 | <p> |
---|
| 1934 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00671">RestoreHistory()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00660">StoreHistory()</a>. </td> |
---|
| 1935 | </tr> |
---|
| 1936 | </table> |
---|
| 1937 | <a class="anchor" name="p6" doxytag="G4UItcsh::relativeHistoryIndex" ></a><p> |
---|
| 1938 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1939 | <tr> |
---|
| 1940 | <td class="mdRow"> |
---|
| 1941 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1942 | <tr> |
---|
| 1943 | <td class="md" nowrap valign="top"> G4int <a class="el" href="classG4UItcsh.html#p6">G4UItcsh::relativeHistoryIndex</a><code> [protected]</code> |
---|
| 1944 | </table> |
---|
| 1945 | </td> |
---|
| 1946 | </tr> |
---|
| 1947 | </table> |
---|
| 1948 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1949 | <tr> |
---|
| 1950 | <td> |
---|
| 1951 | |
---|
| 1952 | </td> |
---|
| 1953 | <td> |
---|
| 1954 | |
---|
| 1955 | <p> |
---|
| 1956 | |
---|
| 1957 | <p> |
---|
| 1958 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00109">109</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1959 | <p> |
---|
| 1960 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00595">GetCommandLine()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00326">NextCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00306">PreviousCommand()</a>. </td> |
---|
| 1961 | </tr> |
---|
| 1962 | </table> |
---|
| 1963 | <a class="anchor" name="p7" doxytag="G4UItcsh::tios" ></a><p> |
---|
| 1964 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
---|
| 1965 | <tr> |
---|
| 1966 | <td class="mdRow"> |
---|
| 1967 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 1968 | <tr> |
---|
| 1969 | <td class="md" nowrap valign="top"> termios <a class="el" href="classG4UItcsh.html#p7">G4UItcsh::tios</a><code> [protected]</code> |
---|
| 1970 | </table> |
---|
| 1971 | </td> |
---|
| 1972 | </tr> |
---|
| 1973 | </table> |
---|
| 1974 | <table cellspacing=5 cellpadding=0 border=0> |
---|
| 1975 | <tr> |
---|
| 1976 | <td> |
---|
| 1977 | |
---|
| 1978 | </td> |
---|
| 1979 | <td> |
---|
| 1980 | |
---|
| 1981 | <p> |
---|
| 1982 | |
---|
| 1983 | <p> |
---|
| 1984 | Definition at line <a class="el" href="G4UItcsh_8hh-source.html#l00116">116</a> of file <a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a>. |
---|
| 1985 | <p> |
---|
| 1986 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00062">G4UItcsh()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00702">RestoreTerm()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00686">SetTermToInputMode()</a>. </td> |
---|
| 1987 | </tr> |
---|
| 1988 | </table> |
---|
| 1989 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
| 1990 | <li><a class="el" href="G4UItcsh_8hh-source.html">G4UItcsh.hh</a><li><a class="el" href="G4UItcsh_8cc-source.html">G4UItcsh.cc</a></ul> |
---|
| 1991 | <hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:07:33 2007 by |
---|
| 1992 | <a href="http://www.doxygen.org/index.html"> |
---|
| 1993 | <img src="doxygen.png" alt="doxygen" align="middle" border=0 > |
---|
| 1994 | </a>1.3.4 </small></address> |
---|
| 1995 | </body> |
---|
| 1996 | </html> |
---|