| [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>G4VUIshell 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>G4VUIshell Class Reference</h1><code>#include <<a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>></code>
|
|---|
| 9 | <p>
|
|---|
| 10 | Inheritance diagram for G4VUIshell:<p><center><img src="classG4VUIshell__inherit__graph.png" border="0" usemap="#G4VUIshell__inherit__map" alt="Inheritance graph"></center>
|
|---|
| 11 | <map name="G4VUIshell__inherit__map">
|
|---|
| 12 | <area href="classG4UIcsh.html" shape="rect" coords="8,664,157,776" alt="">
|
|---|
| 13 | <area href="classG4UItcsh.html" shape="rect" coords="181,408,360,1032" alt="">
|
|---|
| 14 | </map>
|
|---|
| 15 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classG4VUIshell-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
|
|---|
| 16 | <tr><td></td></tr>
|
|---|
| 17 | <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
|
|---|
| 18 | <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a0">G4VUIshell</a> (const G4String &prompt=">")</td></tr>
|
|---|
| 19 |
|
|---|
| 20 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a1">~G4VUIshell</a> ()</td></tr>
|
|---|
| 21 |
|
|---|
| 22 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a2">SetNColumn</a> (G4int ncol)</td></tr>
|
|---|
| 23 |
|
|---|
| 24 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a3">SetPrompt</a> (const G4String &prompt)</td></tr>
|
|---|
| 25 |
|
|---|
| 26 | <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a4">SetCurrentDirectory</a> (const G4String &ccd)</td></tr>
|
|---|
| 27 |
|
|---|
| 28 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a5">ShowCurrentDirectory</a> () const </td></tr>
|
|---|
| 29 |
|
|---|
| 30 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a6">ListCommand</a> (const G4String &input, const G4String &candidate="") const </td></tr>
|
|---|
| 31 |
|
|---|
| 32 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#a7">GetCommandLine</a> (const char *msg=0)=0</td></tr>
|
|---|
| 33 |
|
|---|
| 34 | <tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
|
|---|
| 35 | <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#b0">MakePrompt</a> (const char *msg=0)</td></tr>
|
|---|
| 36 |
|
|---|
| 37 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4UIcommandTree * </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#b1">GetCommandTree</a> (const G4String &dir) const </td></tr>
|
|---|
| 38 |
|
|---|
| 39 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#b2">GetAbsCommandDirPath</a> (const G4String &apath) const </td></tr>
|
|---|
| 40 |
|
|---|
| 41 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#b3">GetCommandPathTail</a> (const G4String &apath) const </td></tr>
|
|---|
| 42 |
|
|---|
| 43 | <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
|
|---|
| 44 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#p0">promptSetting</a></td></tr>
|
|---|
| 45 |
|
|---|
| 46 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#p1">promptString</a></td></tr>
|
|---|
| 47 |
|
|---|
| 48 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4int </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#p2">nColumn</a></td></tr>
|
|---|
| 49 |
|
|---|
| 50 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4bool </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#p3">lsColorFlag</a></td></tr>
|
|---|
| 51 |
|
|---|
| 52 | <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#p4">directoryColor</a></td></tr>
|
|---|
| 53 |
|
|---|
| 54 | <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#p5">commandColor</a></td></tr>
|
|---|
| 55 |
|
|---|
| 56 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4String </td><td class="memItemRight" valign=bottom><a class="el" href="classG4VUIshell.html#p6">currentCommandDir</a></td></tr>
|
|---|
| 57 |
|
|---|
| 58 | </table>
|
|---|
| 59 | <hr><h2>Constructor & Destructor Documentation</h2>
|
|---|
| 60 | <a class="anchor" name="a0" doxytag="G4VUIshell::G4VUIshell" ></a><p>
|
|---|
| 61 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 62 | <tr>
|
|---|
| 63 | <td class="mdRow">
|
|---|
| 64 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 65 | <tr>
|
|---|
| 66 | <td class="md" nowrap valign="top"> G4VUIshell::G4VUIshell </td>
|
|---|
| 67 | <td class="md" valign="top">( </td>
|
|---|
| 68 | <td class="md" nowrap valign="top">const G4String & </td>
|
|---|
| 69 | <td class="mdname1" valign="top" nowrap> <em>prompt</em> = ">" </td>
|
|---|
| 70 | <td class="md" valign="top"> ) </td>
|
|---|
| 71 | <td class="md" nowrap></td>
|
|---|
| 72 | </tr>
|
|---|
| 73 |
|
|---|
| 74 | </table>
|
|---|
| 75 | </td>
|
|---|
| 76 | </tr>
|
|---|
| 77 | </table>
|
|---|
| 78 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 79 | <tr>
|
|---|
| 80 | <td>
|
|---|
| 81 |
|
|---|
| 82 | </td>
|
|---|
| 83 | <td>
|
|---|
| 84 |
|
|---|
| 85 | <p>
|
|---|
| 86 |
|
|---|
| 87 | <p>
|
|---|
| 88 | Definition at line <a class="el" href="G4VUIshell_8cc-source.html#l00047">47</a> of file <a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a>.
|
|---|
| 89 | <p>
|
|---|
| 90 | References <a class="el" href="G4VUIshell_8hh.html#a8a0">BLACK</a>.
|
|---|
| 91 | <p>
|
|---|
| 92 | <div class="fragment"><pre>00048 : <a class="code" href="classG4VUIshell.html#p0">promptSetting</a>(prompt), <a class="code" href="classG4VUIshell.html#p1">promptString</a>(<span class="stringliteral">""</span>), <a class="code" href="classG4VUIshell.html#p2">nColumn</a>(80),
|
|---|
| 93 | 00049 <a class="code" href="classG4VUIshell.html#p3">lsColorFlag</a>(FALSE), <a class="code" href="classG4VUIshell.html#p4">directoryColor</a>(BLACK), <a class="code" href="classG4VUIshell.html#p5">commandColor</a>(BLACK),
|
|---|
| 94 | 00050 <a class="code" href="classG4VUIshell.html#p6">currentCommandDir</a>(<span class="stringliteral">"/"</span>)
|
|---|
| 95 | 00052 {
|
|---|
| 96 | 00053 }
|
|---|
| 97 | </pre></div> </td>
|
|---|
| 98 | </tr>
|
|---|
| 99 | </table>
|
|---|
| 100 | <a class="anchor" name="a1" doxytag="G4VUIshell::~G4VUIshell" ></a><p>
|
|---|
| 101 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 102 | <tr>
|
|---|
| 103 | <td class="mdRow">
|
|---|
| 104 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 105 | <tr>
|
|---|
| 106 | <td class="md" nowrap valign="top"> G4VUIshell::~<a class="el" href="classG4VUIshell.html">G4VUIshell</a> </td>
|
|---|
| 107 | <td class="md" valign="top">( </td>
|
|---|
| 108 | <td class="mdname1" valign="top" nowrap> </td>
|
|---|
| 109 | <td class="md" valign="top"> ) </td>
|
|---|
| 110 | <td class="md" nowrap><code> [virtual]</code></td>
|
|---|
| 111 | </tr>
|
|---|
| 112 |
|
|---|
| 113 | </table>
|
|---|
| 114 | </td>
|
|---|
| 115 | </tr>
|
|---|
| 116 | </table>
|
|---|
| 117 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 118 | <tr>
|
|---|
| 119 | <td>
|
|---|
| 120 |
|
|---|
| 121 | </td>
|
|---|
| 122 | <td>
|
|---|
| 123 |
|
|---|
| 124 | <p>
|
|---|
| 125 |
|
|---|
| 126 | <p>
|
|---|
| 127 | Definition at line <a class="el" href="G4VUIshell_8cc-source.html#l00056">56</a> of file <a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a>.
|
|---|
| 128 | <p>
|
|---|
| 129 | <div class="fragment"><pre>00058 {
|
|---|
| 130 | 00059 }
|
|---|
| 131 | </pre></div> </td>
|
|---|
| 132 | </tr>
|
|---|
| 133 | </table>
|
|---|
| 134 | <hr><h2>Member Function Documentation</h2>
|
|---|
| 135 | <a class="anchor" name="b2" doxytag="G4VUIshell::GetAbsCommandDirPath" ></a><p>
|
|---|
| 136 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 137 | <tr>
|
|---|
| 138 | <td class="mdRow">
|
|---|
| 139 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 140 | <tr>
|
|---|
| 141 | <td class="md" nowrap valign="top"> G4String G4VUIshell::GetAbsCommandDirPath </td>
|
|---|
| 142 | <td class="md" valign="top">( </td>
|
|---|
| 143 | <td class="md" nowrap valign="top">const G4String & </td>
|
|---|
| 144 | <td class="mdname1" valign="top" nowrap> <em>apath</em> </td>
|
|---|
| 145 | <td class="md" valign="top"> ) </td>
|
|---|
| 146 | <td class="md" nowrap> const<code> [protected]</code></td>
|
|---|
| 147 | </tr>
|
|---|
| 148 |
|
|---|
| 149 | </table>
|
|---|
| 150 | </td>
|
|---|
| 151 | </tr>
|
|---|
| 152 | </table>
|
|---|
| 153 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 154 | <tr>
|
|---|
| 155 | <td>
|
|---|
| 156 |
|
|---|
| 157 | </td>
|
|---|
| 158 | <td>
|
|---|
| 159 |
|
|---|
| 160 | <p>
|
|---|
| 161 |
|
|---|
| 162 | <p>
|
|---|
| 163 | Definition at line <a class="el" href="G4VUIshell_8cc-source.html#l00141">141</a> of file <a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a>.
|
|---|
| 164 | <p>
|
|---|
| 165 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00385">G4UItcsh::CompleteCommand()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00346">G4UItcsh::ListMatchedCommand()</a>.
|
|---|
| 166 | <p>
|
|---|
| 167 | <div class="fragment"><pre>00143 {
|
|---|
| 168 | 00144 <span class="keywordflow">if</span>(apath.empty()) <span class="keywordflow">return</span> apath; <span class="comment">// null string</span>
|
|---|
| 169 | 00145
|
|---|
| 170 | 00146 <span class="comment">// if "apath" does not start with "/", </span>
|
|---|
| 171 | 00147 <span class="comment">// then it is treared as relative path</span>
|
|---|
| 172 | 00148 G4String bpath= apath;
|
|---|
| 173 | 00149 <span class="keywordflow">if</span>(apath[(size_t)0] != <span class="charliteral">'/'</span>) bpath= <a class="code" href="classG4VUIshell.html#p6">currentCommandDir</a> + apath;
|
|---|
| 174 | 00150
|
|---|
| 175 | 00151 <span class="comment">// parsing...</span>
|
|---|
| 176 | 00152 G4String absPath= <span class="stringliteral">"/"</span>;
|
|---|
| 177 | 00153 <span class="keywordflow">for</span>(G4int indx=1; indx<=G4int(bpath.length())-1; ) {
|
|---|
| 178 | 00154 G4int jslash= bpath.index(<span class="stringliteral">"/"</span>, indx); <span class="comment">// search index begin with "/"</span>
|
|---|
| 179 | 00155 <span class="keywordflow">if</span>(jslash != G4int(G4String::npos)) {
|
|---|
| 180 | 00156 <span class="keywordflow">if</span>(bpath(indx,jslash-indx) == <span class="stringliteral">".."</span>){ <span class="comment">// directory up</span>
|
|---|
| 181 | 00157 <span class="keywordflow">if</span>(absPath.length() >=1) {
|
|---|
| 182 | 00158 absPath.remove(absPath.length()-1); <span class="comment">// remove last "/"</span>
|
|---|
| 183 | 00159 G4int jpre= absPath.last(<span class="charliteral">'/'</span>);
|
|---|
| 184 | 00160 <span class="keywordflow">if</span>(jpre != G4int(G4String::npos)) absPath.remove(jpre+1);
|
|---|
| 185 | 00161 }
|
|---|
| 186 | 00162 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bpath(indx,jslash-indx) == <span class="stringliteral">"."</span>){ <span class="comment">// nothing to do</span>
|
|---|
| 187 | 00163 } <span class="keywordflow">else</span> { <span class="comment">// add</span>
|
|---|
| 188 | 00164 <span class="keywordflow">if</span>( !(jslash==indx && bpath(indx)==<span class="charliteral">'/'</span>) ) <span class="comment">// truncate "////"</span>
|
|---|
| 189 | 00165 absPath+= bpath(indx, jslash-indx+1);
|
|---|
| 190 | 00166 <span class="comment">// better to be check directory existence. (it costs!)</span>
|
|---|
| 191 | 00167 }
|
|---|
| 192 | 00168 } <span class="keywordflow">else</span> { <span class="comment">// directory ONLY (ignore non-"/" terminated string)</span>
|
|---|
| 193 | 00169 }
|
|---|
| 194 | 00170 indx= jslash+1;
|
|---|
| 195 | 00171 }
|
|---|
| 196 | 00172 <span class="keywordflow">return</span> absPath;
|
|---|
| 197 | 00173 }
|
|---|
| 198 | </pre></div> </td>
|
|---|
| 199 | </tr>
|
|---|
| 200 | </table>
|
|---|
| 201 | <a class="anchor" name="a7" doxytag="G4VUIshell::GetCommandLine" ></a><p>
|
|---|
| 202 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 203 | <tr>
|
|---|
| 204 | <td class="mdRow">
|
|---|
| 205 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 206 | <tr>
|
|---|
| 207 | <td class="md" nowrap valign="top"> virtual G4String G4VUIshell::GetCommandLine </td>
|
|---|
| 208 | <td class="md" valign="top">( </td>
|
|---|
| 209 | <td class="md" nowrap valign="top">const char * </td>
|
|---|
| 210 | <td class="mdname1" valign="top" nowrap> <em>msg</em> = 0 </td>
|
|---|
| 211 | <td class="md" valign="top"> ) </td>
|
|---|
| 212 | <td class="md" nowrap><code> [pure virtual]</code></td>
|
|---|
| 213 | </tr>
|
|---|
| 214 |
|
|---|
| 215 | </table>
|
|---|
| 216 | </td>
|
|---|
| 217 | </tr>
|
|---|
| 218 | </table>
|
|---|
| 219 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 220 | <tr>
|
|---|
| 221 | <td>
|
|---|
| 222 |
|
|---|
| 223 | </td>
|
|---|
| 224 | <td>
|
|---|
| 225 |
|
|---|
| 226 | <p>
|
|---|
| 227 |
|
|---|
| 228 | <p>
|
|---|
| 229 | Implemented in <a class="el" href="classG4UIcsh.html#a2">G4UIcsh</a>, and <a class="el" href="classG4UItcsh.html#a3">G4UItcsh</a>. </td>
|
|---|
| 230 | </tr>
|
|---|
| 231 | </table>
|
|---|
| 232 | <a class="anchor" name="b3" doxytag="G4VUIshell::GetCommandPathTail" ></a><p>
|
|---|
| 233 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 234 | <tr>
|
|---|
| 235 | <td class="mdRow">
|
|---|
| 236 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 237 | <tr>
|
|---|
| 238 | <td class="md" nowrap valign="top"> G4String G4VUIshell::GetCommandPathTail </td>
|
|---|
| 239 | <td class="md" valign="top">( </td>
|
|---|
| 240 | <td class="md" nowrap valign="top">const G4String & </td>
|
|---|
| 241 | <td class="mdname1" valign="top" nowrap> <em>apath</em> </td>
|
|---|
| 242 | <td class="md" valign="top"> ) </td>
|
|---|
| 243 | <td class="md" nowrap> const<code> [protected]</code></td>
|
|---|
| 244 | </tr>
|
|---|
| 245 |
|
|---|
| 246 | </table>
|
|---|
| 247 | </td>
|
|---|
| 248 | </tr>
|
|---|
| 249 | </table>
|
|---|
| 250 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 251 | <tr>
|
|---|
| 252 | <td>
|
|---|
| 253 |
|
|---|
| 254 | </td>
|
|---|
| 255 | <td>
|
|---|
| 256 |
|
|---|
| 257 | <p>
|
|---|
| 258 |
|
|---|
| 259 | <p>
|
|---|
| 260 | Definition at line <a class="el" href="G4VUIshell_8cc-source.html#l00177">177</a> of file <a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a>.
|
|---|
| 261 | <p>
|
|---|
| 262 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00385">G4UItcsh::CompleteCommand()</a>.
|
|---|
| 263 | <p>
|
|---|
| 264 | <div class="fragment"><pre>00179 { <span class="comment">// xxx/xxx/zzz -> zzz, trancate /// -> /</span>
|
|---|
| 265 | 00180 <span class="keywordflow">if</span>(apath.empty()) <span class="keywordflow">return</span> apath;
|
|---|
| 266 | 00181
|
|---|
| 267 | 00182 G4int lstr= apath.length();
|
|---|
| 268 | 00183
|
|---|
| 269 | 00184 <span class="comment">// for trancating "/"</span>
|
|---|
| 270 | 00185 G4bool Qsla= FALSE;
|
|---|
| 271 | 00186 <span class="keywordflow">if</span>(apath[(size_t)(lstr-1)]==<span class="charliteral">'/'</span>) Qsla= TRUE;
|
|---|
| 272 | 00187
|
|---|
| 273 | 00188 <span class="comment">// searching last '/' from tail</span>
|
|---|
| 274 | 00189 G4int indx= -1;
|
|---|
| 275 | 00190 <span class="keywordflow">for</span>(G4int i=lstr-1; i>=0; i--) {
|
|---|
| 276 | 00191 <span class="keywordflow">if</span>(Qsla && apath[(size_t)i]!=<span class="charliteral">'/'</span>) Qsla= FALSE; <span class="comment">// break "/" flag!!</span>
|
|---|
| 277 | 00192 <span class="keywordflow">if</span>(apath[(size_t)i]==<span class="charliteral">'/'</span> && !Qsla) {
|
|---|
| 278 | 00193 indx= i;
|
|---|
| 279 | 00194 <span class="keywordflow">break</span>;
|
|---|
| 280 | 00195 }
|
|---|
| 281 | 00196 }
|
|---|
| 282 | 00197
|
|---|
| 283 | 00198 <span class="keywordflow">if</span>(indx==-1) <span class="keywordflow">return</span> apath; <span class="comment">// not found</span>
|
|---|
| 284 | 00199
|
|---|
| 285 | 00200 <span class="keywordflow">if</span>(indx==0 && lstr==1) { <span class="comment">// "/"</span>
|
|---|
| 286 | 00201 G4String nullStr;
|
|---|
| 287 | 00202 <span class="keywordflow">return</span> nullStr;
|
|---|
| 288 | 00203 } <span class="keywordflow">else</span> {
|
|---|
| 289 | 00204 <span class="comment">//G4String newPath= apath(indx+1,lstr-indx-1); </span>
|
|---|
| 290 | 00205 G4String newPath= apath;
|
|---|
| 291 | 00206 newPath= newPath(indx+1,lstr-indx-1);
|
|---|
| 292 | 00207 <span class="keywordflow">return</span> newPath;
|
|---|
| 293 | 00208 }
|
|---|
| 294 | 00209 }
|
|---|
| 295 | </pre></div> </td>
|
|---|
| 296 | </tr>
|
|---|
| 297 | </table>
|
|---|
| 298 | <a class="anchor" name="b1" doxytag="G4VUIshell::GetCommandTree" ></a><p>
|
|---|
| 299 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 300 | <tr>
|
|---|
| 301 | <td class="mdRow">
|
|---|
| 302 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 303 | <tr>
|
|---|
| 304 | <td class="md" nowrap valign="top"> G4UIcommandTree * G4VUIshell::GetCommandTree </td>
|
|---|
| 305 | <td class="md" valign="top">( </td>
|
|---|
| 306 | <td class="md" nowrap valign="top">const G4String & </td>
|
|---|
| 307 | <td class="mdname1" valign="top" nowrap> <em>dir</em> </td>
|
|---|
| 308 | <td class="md" valign="top"> ) </td>
|
|---|
| 309 | <td class="md" nowrap> const<code> [protected]</code></td>
|
|---|
| 310 | </tr>
|
|---|
| 311 |
|
|---|
| 312 | </table>
|
|---|
| 313 | </td>
|
|---|
| 314 | </tr>
|
|---|
| 315 | </table>
|
|---|
| 316 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 317 | <tr>
|
|---|
| 318 | <td>
|
|---|
| 319 |
|
|---|
| 320 | </td>
|
|---|
| 321 | <td>
|
|---|
| 322 |
|
|---|
| 323 | <p>
|
|---|
| 324 |
|
|---|
| 325 | <p>
|
|---|
| 326 | Definition at line <a class="el" href="G4VUIshell_8cc-source.html#l00112">112</a> of file <a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a>.
|
|---|
| 327 | <p>
|
|---|
| 328 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00385">G4UItcsh::CompleteCommand()</a>.
|
|---|
| 329 | <p>
|
|---|
| 330 | <div class="fragment"><pre>00114 {
|
|---|
| 331 | 00115 G4UImanager* UI= G4UImanager::GetUIpointer();
|
|---|
| 332 | 00116
|
|---|
| 333 | 00117 G4UIcommandTree* cmdTree= UI-> GetTree(); <span class="comment">// root tree</span>
|
|---|
| 334 | 00118
|
|---|
| 335 | 00119 G4String absPath= input; <span class="comment">// G4String::strip() CONST !!</span>
|
|---|
| 336 | 00120 absPath= <a class="code" href="classG4VUIshell.html#b2">GetAbsCommandDirPath</a>(absPath.strip(G4String::both));
|
|---|
| 337 | 00121
|
|---|
| 338 | 00122 <span class="comment">// parsing absolute path ...</span>
|
|---|
| 339 | 00123 <span class="keywordflow">if</span>(absPath.length()==0) <span class="keywordflow">return</span> NULL;
|
|---|
| 340 | 00124 <span class="keywordflow">if</span>(absPath[absPath.length()-1] != <span class="charliteral">'/'</span>) <span class="keywordflow">return</span> NULL; <span class="comment">// error??</span>
|
|---|
| 341 | 00125 <span class="keywordflow">if</span>(absPath==<span class="stringliteral">"/"</span>) <span class="keywordflow">return</span> cmdTree;
|
|---|
| 342 | 00126
|
|---|
| 343 | 00127 <span class="keywordflow">for</span>(G4int indx=1; indx<G4int(absPath.length())-1; ) {
|
|---|
| 344 | 00128 G4int jslash= absPath.index(<span class="stringliteral">"/"</span>, indx); <span class="comment">// search index begin with "/" </span>
|
|---|
| 345 | 00129 <span class="keywordflow">if</span>(jslash != G4int(G4String::npos)) {
|
|---|
| 346 | 00130 <span class="keywordflow">if</span>(cmdTree != NULL)
|
|---|
| 347 | 00131 cmdTree= cmdTree-> GetTree(G4String(absPath(0,jslash+1)));
|
|---|
| 348 | 00132 }
|
|---|
| 349 | 00133 indx= jslash+1;
|
|---|
| 350 | 00134 }
|
|---|
| 351 | 00135
|
|---|
| 352 | 00136 <span class="keywordflow">if</span>(cmdTree == NULL) <span class="keywordflow">return</span> NULL;
|
|---|
| 353 | 00137 <span class="keywordflow">else</span> <span class="keywordflow">return</span> cmdTree;
|
|---|
| 354 | 00138 }
|
|---|
| 355 | </pre></div> </td>
|
|---|
| 356 | </tr>
|
|---|
| 357 | </table>
|
|---|
| 358 | <a class="anchor" name="a6" doxytag="G4VUIshell::ListCommand" ></a><p>
|
|---|
| 359 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 360 | <tr>
|
|---|
| 361 | <td class="mdRow">
|
|---|
| 362 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 363 | <tr>
|
|---|
| 364 | <td class="md" nowrap valign="top"> void G4VUIshell::ListCommand </td>
|
|---|
| 365 | <td class="md" valign="top">( </td>
|
|---|
| 366 | <td class="md" nowrap valign="top">const G4String & </td>
|
|---|
| 367 | <td class="mdname" nowrap> <em>input</em>, </td>
|
|---|
| 368 | </tr>
|
|---|
| 369 | <tr>
|
|---|
| 370 | <td></td>
|
|---|
| 371 | <td></td>
|
|---|
| 372 | <td class="md" nowrap>const G4String & </td>
|
|---|
| 373 | <td class="mdname" nowrap> <em>candidate</em> = ""</td>
|
|---|
| 374 | </tr>
|
|---|
| 375 | <tr>
|
|---|
| 376 | <td></td>
|
|---|
| 377 | <td class="md">) </td>
|
|---|
| 378 | <td class="md" colspan="2"> const<code> [virtual]</code></td>
|
|---|
| 379 | </tr>
|
|---|
| 380 |
|
|---|
| 381 | </table>
|
|---|
| 382 | </td>
|
|---|
| 383 | </tr>
|
|---|
| 384 | </table>
|
|---|
| 385 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 386 | <tr>
|
|---|
| 387 | <td>
|
|---|
| 388 |
|
|---|
| 389 | </td>
|
|---|
| 390 | <td>
|
|---|
| 391 |
|
|---|
| 392 | <p>
|
|---|
| 393 |
|
|---|
| 394 | <p>
|
|---|
| 395 | Definition at line <a class="el" href="G4VUIshell_8cc-source.html#l00215">215</a> of file <a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a>.
|
|---|
| 396 | <p>
|
|---|
| 397 | References <a class="el" href="G4UIArrayString_8cc-source.html#l00156">G4UIArrayString::Show()</a>, and <a class="el" href="G4VUIshell_8cc-source.html#l00041">TermColorString</a>.
|
|---|
| 398 | <p>
|
|---|
| 399 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00346">G4UItcsh::ListMatchedCommand()</a>.
|
|---|
| 400 | <p>
|
|---|
| 401 | <div class="fragment"><pre>00218 {
|
|---|
| 402 | 00219 <span class="comment">// specified directpry</span>
|
|---|
| 403 | 00220 G4String input= dir; <span class="comment">// ...</span>
|
|---|
| 404 | 00221 input= input.strip(G4String::both);
|
|---|
| 405 | 00222
|
|---|
| 406 | 00223 <span class="comment">// command tree of "user specified directory"</span>
|
|---|
| 407 | 00224 G4String vpath= <a class="code" href="classG4VUIshell.html#p6">currentCommandDir</a>;
|
|---|
| 408 | 00225 G4String vcmd;
|
|---|
| 409 | 00226
|
|---|
| 410 | 00227 G4int len= input.length();
|
|---|
| 411 | 00228 <span class="keywordflow">if</span>(! input.empty()) {
|
|---|
| 412 | 00229 G4int indx= -1;
|
|---|
| 413 | 00230 <span class="keywordflow">for</span>(G4int i=len-1; i>=0; i--) { <span class="comment">// search last '/'</span>
|
|---|
| 414 | 00231 <span class="keywordflow">if</span>(input[(size_t)i]==<span class="charliteral">'/'</span>) {
|
|---|
| 415 | 00232 indx= i;
|
|---|
| 416 | 00233 <span class="keywordflow">break</span>;
|
|---|
| 417 | 00234 }
|
|---|
| 418 | 00235 }
|
|---|
| 419 | 00236 <span class="comment">// get abs. path</span>
|
|---|
| 420 | 00237 <span class="keywordflow">if</span>(indx != -1) vpath= <a class="code" href="classG4VUIshell.html#b2">GetAbsCommandDirPath</a>(input(0,indx+1));
|
|---|
| 421 | 00238 <span class="keywordflow">if</span>(!(indx==0 && len==1)) vcmd= input(indx+1,len-indx-1); <span class="comment">// care for "/"</span>
|
|---|
| 422 | 00239 }
|
|---|
| 423 | 00240
|
|---|
| 424 | 00241 <span class="comment">// check "vcmd" is directory?</span>
|
|---|
| 425 | 00242 G4String inputpath= vpath+vcmd;
|
|---|
| 426 | 00243 <span class="keywordflow">if</span>(! vcmd.empty()){
|
|---|
| 427 | 00244 G4String tmpstr= inputpath + <span class="stringliteral">"/"</span>;
|
|---|
| 428 | 00245 <span class="keywordflow">if</span>(<a class="code" href="classG4VUIshell.html#b1">GetCommandTree</a>(tmpstr) != NULL) {
|
|---|
| 429 | 00246 vpath= tmpstr;
|
|---|
| 430 | 00247 vcmd= <span class="stringliteral">""</span>;
|
|---|
| 431 | 00248 }
|
|---|
| 432 | 00249 }
|
|---|
| 433 | 00250
|
|---|
| 434 | 00251 <span class="comment">// check "vpath" directory exists?</span>
|
|---|
| 435 | 00252 G4UIcommandTree* atree= <a class="code" href="classG4VUIshell.html#b1">GetCommandTree</a>(vpath);
|
|---|
| 436 | 00253 <span class="keywordflow">if</span>(atree == NULL) {
|
|---|
| 437 | 00254 G4cout << <span class="stringliteral">"<"</span> << input << <span class="stringliteral">">: No such directory"</span> << G4endl;
|
|---|
| 438 | 00255 <span class="keywordflow">return</span>;
|
|---|
| 439 | 00256 }
|
|---|
| 440 | 00257
|
|---|
| 441 | 00258 <span class="comment">// list matched directories/commands</span>
|
|---|
| 442 | 00259 G4String stream;
|
|---|
| 443 | 00260 G4bool isMatch= FALSE;
|
|---|
| 444 | 00261
|
|---|
| 445 | 00262 G4int Ndir= atree-> GetTreeEntry();
|
|---|
| 446 | 00263 G4int Ncmd= atree-> GetCommandEntry();
|
|---|
| 447 | 00264 <span class="keywordflow">if</span>(Ndir==0 && Ncmd==0) <span class="keywordflow">return</span>; <span class="comment">// no contents</span>
|
|---|
| 448 | 00265
|
|---|
| 449 | 00266 <span class="comment">// directory ...</span>
|
|---|
| 450 | 00267 <span class="keywordflow">for</span>(G4int idir=1; idir<=Ndir; idir++) {
|
|---|
| 451 | 00268 <span class="keywordflow">if</span>(idir==1 && <a class="code" href="classG4VUIshell.html#p3">lsColorFlag</a>) stream+= <a class="code" href="G4VUIshell_8cc.html#a1">TermColorString</a>[<a class="code" href="classG4VUIshell.html#p4">directoryColor</a>];
|
|---|
| 452 | 00269 G4String fpdir= atree-> GetTree(idir)-> GetPathName();
|
|---|
| 453 | 00270 <span class="comment">// matching test</span>
|
|---|
| 454 | 00271 <span class="keywordflow">if</span>(candidate.empty()) { <span class="comment">// list all</span>
|
|---|
| 455 | 00272 <span class="keywordflow">if</span>(vcmd==<span class="stringliteral">""</span> || fpdir==inputpath) {
|
|---|
| 456 | 00273 stream+= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpdir); stream+= <span class="stringliteral">" "</span>;
|
|---|
| 457 | 00274 isMatch= TRUE;
|
|---|
| 458 | 00275 }
|
|---|
| 459 | 00276 } <span class="keywordflow">else</span> { <span class="comment">// list only matched with candidate</span>
|
|---|
| 460 | 00277 <span class="keywordflow">if</span>( fpdir.index(candidate, 0) == 0) {
|
|---|
| 461 | 00278 stream+= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpdir); stream+= <span class="stringliteral">" "</span>;
|
|---|
| 462 | 00279 }
|
|---|
| 463 | 00280 }
|
|---|
| 464 | 00281 }
|
|---|
| 465 | 00282
|
|---|
| 466 | 00283 <span class="comment">// command ...</span>
|
|---|
| 467 | 00284 <span class="keywordflow">for</span>(G4int icmd=1; icmd<=Ncmd; icmd++){
|
|---|
| 468 | 00285 <span class="keywordflow">if</span>(icmd==1 && <a class="code" href="classG4VUIshell.html#p3">lsColorFlag</a>) stream+= <a class="code" href="G4VUIshell_8cc.html#a1">TermColorString</a>[<a class="code" href="classG4VUIshell.html#p5">commandColor</a>];
|
|---|
| 469 | 00286 G4String fpcmd= atree-> GetPathName() +
|
|---|
| 470 | 00287 atree-> GetCommand(icmd) -> GetCommandName();
|
|---|
| 471 | 00288 <span class="comment">// matching test</span>
|
|---|
| 472 | 00289 <span class="keywordflow">if</span>(candidate.empty()) { <span class="comment">// list all</span>
|
|---|
| 473 | 00290 <span class="keywordflow">if</span>(vcmd==<span class="stringliteral">""</span> || fpcmd==inputpath) {
|
|---|
| 474 | 00291 stream+= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpcmd); stream+= <span class="stringliteral">"* "</span>;
|
|---|
| 475 | 00292 isMatch= TRUE;
|
|---|
| 476 | 00293 }
|
|---|
| 477 | 00294 } <span class="keywordflow">else</span> { <span class="comment">// list only matched with candidate</span>
|
|---|
| 478 | 00295 <span class="keywordflow">if</span>( fpcmd.index(candidate, 0) == 0) {
|
|---|
| 479 | 00296 stream+= <a class="code" href="classG4VUIshell.html#b3">GetCommandPathTail</a>(fpcmd); stream+= <span class="stringliteral">"* "</span>;
|
|---|
| 480 | 00297 }
|
|---|
| 481 | 00298 }
|
|---|
| 482 | 00299 }
|
|---|
| 483 | 00300
|
|---|
| 484 | 00301 <span class="comment">// waring : not matched</span>
|
|---|
| 485 | 00302 <span class="keywordflow">if</span>(!isMatch && candidate.empty())
|
|---|
| 486 | 00303 G4cout << <span class="stringliteral">"<"</span> << input
|
|---|
| 487 | 00304 << <span class="stringliteral">">: No such directory or command"</span> << std::flush;
|
|---|
| 488 | 00305
|
|---|
| 489 | 00306 <span class="comment">// display</span>
|
|---|
| 490 | 00307 <a class="code" href="classG4UIArrayString.html">G4UIArrayString</a> arrayString(stream);
|
|---|
| 491 | 00308 arrayString.<a class="code" href="classG4UIArrayString.html#a2">Show</a>(nColumn);
|
|---|
| 492 | 00309 }
|
|---|
| 493 | </pre></div> </td>
|
|---|
| 494 | </tr>
|
|---|
| 495 | </table>
|
|---|
| 496 |
|
|---|
| 497 | <p>
|
|---|
| 498 | Here is the call graph for this function:<p><center><img src="classG4VUIshell_a6_cgraph.png" border="0" usemap="#classG4VUIshell_a6_cgraph_map" alt=""></center>
|
|---|
| 499 | <map name="classG4VUIshell_a6_cgraph_map">
|
|---|
| 500 | <area href="classG4UIArrayString.html#a2" shape="rect" coords="236,84,396,110" alt="">
|
|---|
| 501 | <area href="classG4UIArrayString.html#d3" shape="rect" coords="446,8,710,34" alt="">
|
|---|
| 502 | <area href="classG4UIArrayString.html#d0" shape="rect" coords="480,58,677,85" alt="">
|
|---|
| 503 | <area href="classG4UIArrayString.html#d2" shape="rect" coords="485,109,672,136" alt="">
|
|---|
| 504 | <area href="classG4UIArrayString.html#d1" shape="rect" coords="486,160,670,186" alt="">
|
|---|
| 505 | </map>
|
|---|
| 506 | <a class="anchor" name="b0" doxytag="G4VUIshell::MakePrompt" ></a><p>
|
|---|
| 507 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 508 | <tr>
|
|---|
| 509 | <td class="mdRow">
|
|---|
| 510 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 511 | <tr>
|
|---|
| 512 | <td class="md" nowrap valign="top"> void G4VUIshell::MakePrompt </td>
|
|---|
| 513 | <td class="md" valign="top">( </td>
|
|---|
| 514 | <td class="md" nowrap valign="top">const char * </td>
|
|---|
| 515 | <td class="mdname1" valign="top" nowrap> <em>msg</em> = 0 </td>
|
|---|
| 516 | <td class="md" valign="top"> ) </td>
|
|---|
| 517 | <td class="md" nowrap><code> [protected, virtual]</code></td>
|
|---|
| 518 | </tr>
|
|---|
| 519 |
|
|---|
| 520 | </table>
|
|---|
| 521 | </td>
|
|---|
| 522 | </tr>
|
|---|
| 523 | </table>
|
|---|
| 524 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 525 | <tr>
|
|---|
| 526 | <td>
|
|---|
| 527 |
|
|---|
| 528 | </td>
|
|---|
| 529 | <td>
|
|---|
| 530 |
|
|---|
| 531 | <p>
|
|---|
| 532 |
|
|---|
| 533 | <p>
|
|---|
| 534 | Reimplemented in <a class="el" href="classG4UItcsh.html#b0">G4UItcsh</a>.
|
|---|
| 535 | <p>
|
|---|
| 536 | Definition at line <a class="el" href="G4VUIshell_8cc-source.html#l00062">62</a> of file <a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a>.
|
|---|
| 537 | <p>
|
|---|
| 538 | References <a class="el" href="G4VUIshell_8hh-source.html#l00073">currentCommandDir</a>, <a class="el" href="G4VUIshell_8hh-source.html#l00061">promptSetting</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00062">promptString</a>.
|
|---|
| 539 | <p>
|
|---|
| 540 | Referenced by <a class="el" href="G4UIcsh_8cc-source.html#l00048">G4UIcsh::GetCommandLine()</a>.
|
|---|
| 541 | <p>
|
|---|
| 542 | <div class="fragment"><pre>00064 {
|
|---|
| 543 | 00065 <span class="keywordflow">if</span>(<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>.length()<=1) {
|
|---|
| 544 | 00066 <a class="code" href="classG4VUIshell.html#p1">promptString</a>= <a class="code" href="classG4VUIshell.html#p0">promptSetting</a>;
|
|---|
| 545 | 00067 <span class="keywordflow">return</span>;
|
|---|
| 546 | 00068 }
|
|---|
| 547 | 00069
|
|---|
| 548 | 00070 <a class="code" href="classG4VUIshell.html#p1">promptString</a>=<span class="stringliteral">""</span>;
|
|---|
| 549 | 00071 G4int i;
|
|---|
| 550 | 00072 <span class="keywordflow">for</span>(i=0; i<G4int(<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>.length())-1; i++){
|
|---|
| 551 | 00073 <span class="keywordflow">if</span>(<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>[(size_t)i]==<span class="charliteral">'%'</span>){
|
|---|
| 552 | 00074 <span class="keywordflow">switch</span> (<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>[(size_t)(i+1)]) {
|
|---|
| 553 | 00075 <span class="keywordflow">case</span> <span class="charliteral">'s'</span>: <span class="comment">// current application status</span>
|
|---|
| 554 | 00076 {
|
|---|
| 555 | 00077 G4String stateStr;
|
|---|
| 556 | 00078 <span class="keywordflow">if</span>(msg)
|
|---|
| 557 | 00079 { stateStr = msg; }
|
|---|
| 558 | 00080 <span class="keywordflow">else</span>
|
|---|
| 559 | 00081 {
|
|---|
| 560 | 00082 G4StateManager* statM= G4StateManager::GetStateManager();
|
|---|
| 561 | 00083 stateStr= statM-> GetStateString(statM->GetCurrentState());
|
|---|
| 562 | 00084 }
|
|---|
| 563 | 00085 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(stateStr);
|
|---|
| 564 | 00086 i++;
|
|---|
| 565 | 00087 }
|
|---|
| 566 | 00088 <span class="keywordflow">break</span>;
|
|---|
| 567 | 00089 <span class="keywordflow">case</span> <span class="charliteral">'/'</span>: <span class="comment">// current working directory</span>
|
|---|
| 568 | 00090 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(currentCommandDir);
|
|---|
| 569 | 00091 i++;
|
|---|
| 570 | 00092 <span class="keywordflow">break</span>;
|
|---|
| 571 | 00093 <span class="keywordflow">default</span>:
|
|---|
| 572 | 00094 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(G4String(promptSetting[(size_t)i]));
|
|---|
| 573 | 00095 <span class="keywordflow">break</span>;
|
|---|
| 574 | 00096 }
|
|---|
| 575 | 00097 } <span class="keywordflow">else</span> {
|
|---|
| 576 | 00098 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(G4String(promptSetting[(size_t)i]));
|
|---|
| 577 | 00099 }
|
|---|
| 578 | 00100 }
|
|---|
| 579 | 00101
|
|---|
| 580 | 00102 <span class="comment">// append last chaacter</span>
|
|---|
| 581 | 00103 <span class="keywordflow">if</span>(i == G4int(<a class="code" href="classG4VUIshell.html#p0">promptSetting</a>.length())-1)
|
|---|
| 582 | 00104 <a class="code" href="classG4VUIshell.html#p1">promptString</a>.append(G4String(promptSetting[(size_t)i]));
|
|---|
| 583 | 00105 }
|
|---|
| 584 | </pre></div> </td>
|
|---|
| 585 | </tr>
|
|---|
| 586 | </table>
|
|---|
| 587 | <a class="anchor" name="a4" doxytag="G4VUIshell::SetCurrentDirectory" ></a><p>
|
|---|
| 588 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 589 | <tr>
|
|---|
| 590 | <td class="mdRow">
|
|---|
| 591 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 592 | <tr>
|
|---|
| 593 | <td class="md" nowrap valign="top"> void G4VUIshell::SetCurrentDirectory </td>
|
|---|
| 594 | <td class="md" valign="top">( </td>
|
|---|
| 595 | <td class="md" nowrap valign="top">const G4String & </td>
|
|---|
| 596 | <td class="mdname1" valign="top" nowrap> <em>ccd</em> </td>
|
|---|
| 597 | <td class="md" valign="top"> ) </td>
|
|---|
| 598 | <td class="md" nowrap><code> [inline]</code></td>
|
|---|
| 599 | </tr>
|
|---|
| 600 |
|
|---|
| 601 | </table>
|
|---|
| 602 | </td>
|
|---|
| 603 | </tr>
|
|---|
| 604 | </table>
|
|---|
| 605 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 606 | <tr>
|
|---|
| 607 | <td>
|
|---|
| 608 |
|
|---|
| 609 | </td>
|
|---|
| 610 | <td>
|
|---|
| 611 |
|
|---|
| 612 | <p>
|
|---|
| 613 |
|
|---|
| 614 | <p>
|
|---|
| 615 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00111">111</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 616 | <p>
|
|---|
| 617 | References <a class="el" href="G4VUIshell_8hh-source.html#l00073">currentCommandDir</a>.
|
|---|
| 618 | <p>
|
|---|
| 619 | <div class="fragment"><pre>00112 {
|
|---|
| 620 | 00113 <a class="code" href="classG4VUIshell.html#p6">currentCommandDir</a>= dir;
|
|---|
| 621 | 00114 }
|
|---|
| 622 | </pre></div> </td>
|
|---|
| 623 | </tr>
|
|---|
| 624 | </table>
|
|---|
| 625 | <a class="anchor" name="a2" doxytag="G4VUIshell::SetNColumn" ></a><p>
|
|---|
| 626 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 627 | <tr>
|
|---|
| 628 | <td class="mdRow">
|
|---|
| 629 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 630 | <tr>
|
|---|
| 631 | <td class="md" nowrap valign="top"> void G4VUIshell::SetNColumn </td>
|
|---|
| 632 | <td class="md" valign="top">( </td>
|
|---|
| 633 | <td class="md" nowrap valign="top">G4int </td>
|
|---|
| 634 | <td class="mdname1" valign="top" nowrap> <em>ncol</em> </td>
|
|---|
| 635 | <td class="md" valign="top"> ) </td>
|
|---|
| 636 | <td class="md" nowrap><code> [inline]</code></td>
|
|---|
| 637 | </tr>
|
|---|
| 638 |
|
|---|
| 639 | </table>
|
|---|
| 640 | </td>
|
|---|
| 641 | </tr>
|
|---|
| 642 | </table>
|
|---|
| 643 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 644 | <tr>
|
|---|
| 645 | <td>
|
|---|
| 646 |
|
|---|
| 647 | </td>
|
|---|
| 648 | <td>
|
|---|
| 649 |
|
|---|
| 650 | <p>
|
|---|
| 651 |
|
|---|
| 652 | <p>
|
|---|
| 653 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00101">101</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 654 | <p>
|
|---|
| 655 | References <a class="el" href="G4VUIshell_8hh-source.html#l00064">nColumn</a>.
|
|---|
| 656 | <p>
|
|---|
| 657 | <div class="fragment"><pre>00102 {
|
|---|
| 658 | 00103 <a class="code" href="classG4VUIshell.html#p2">nColumn</a>= ncol;
|
|---|
| 659 | 00104 }
|
|---|
| 660 | </pre></div> </td>
|
|---|
| 661 | </tr>
|
|---|
| 662 | </table>
|
|---|
| 663 | <a class="anchor" name="a3" doxytag="G4VUIshell::SetPrompt" ></a><p>
|
|---|
| 664 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 665 | <tr>
|
|---|
| 666 | <td class="mdRow">
|
|---|
| 667 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 668 | <tr>
|
|---|
| 669 | <td class="md" nowrap valign="top"> void G4VUIshell::SetPrompt </td>
|
|---|
| 670 | <td class="md" valign="top">( </td>
|
|---|
| 671 | <td class="md" nowrap valign="top">const G4String & </td>
|
|---|
| 672 | <td class="mdname1" valign="top" nowrap> <em>prompt</em> </td>
|
|---|
| 673 | <td class="md" valign="top"> ) </td>
|
|---|
| 674 | <td class="md" nowrap><code> [inline]</code></td>
|
|---|
| 675 | </tr>
|
|---|
| 676 |
|
|---|
| 677 | </table>
|
|---|
| 678 | </td>
|
|---|
| 679 | </tr>
|
|---|
| 680 | </table>
|
|---|
| 681 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 682 | <tr>
|
|---|
| 683 | <td>
|
|---|
| 684 |
|
|---|
| 685 | </td>
|
|---|
| 686 | <td>
|
|---|
| 687 |
|
|---|
| 688 | <p>
|
|---|
| 689 |
|
|---|
| 690 | <p>
|
|---|
| 691 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00106">106</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 692 | <p>
|
|---|
| 693 | References <a class="el" href="G4VUIshell_8hh-source.html#l00061">promptSetting</a>.
|
|---|
| 694 | <p>
|
|---|
| 695 | <div class="fragment"><pre>00107 {
|
|---|
| 696 | 00108 <a class="code" href="classG4VUIshell.html#p0">promptSetting</a>= prompt;
|
|---|
| 697 | 00109 }
|
|---|
| 698 | </pre></div> </td>
|
|---|
| 699 | </tr>
|
|---|
| 700 | </table>
|
|---|
| 701 | <a class="anchor" name="a5" doxytag="G4VUIshell::ShowCurrentDirectory" ></a><p>
|
|---|
| 702 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 703 | <tr>
|
|---|
| 704 | <td class="mdRow">
|
|---|
| 705 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 706 | <tr>
|
|---|
| 707 | <td class="md" nowrap valign="top"> void G4VUIshell::ShowCurrentDirectory </td>
|
|---|
| 708 | <td class="md" valign="top">( </td>
|
|---|
| 709 | <td class="mdname1" valign="top" nowrap> </td>
|
|---|
| 710 | <td class="md" valign="top"> ) </td>
|
|---|
| 711 | <td class="md" nowrap> const<code> [inline, virtual]</code></td>
|
|---|
| 712 | </tr>
|
|---|
| 713 |
|
|---|
| 714 | </table>
|
|---|
| 715 | </td>
|
|---|
| 716 | </tr>
|
|---|
| 717 | </table>
|
|---|
| 718 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 719 | <tr>
|
|---|
| 720 | <td>
|
|---|
| 721 |
|
|---|
| 722 | </td>
|
|---|
| 723 | <td>
|
|---|
| 724 |
|
|---|
| 725 | <p>
|
|---|
| 726 |
|
|---|
| 727 | <p>
|
|---|
| 728 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00116">116</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 729 | <p>
|
|---|
| 730 | References <a class="el" href="G4VUIshell_8hh-source.html#l00073">currentCommandDir</a>.
|
|---|
| 731 | <p>
|
|---|
| 732 | <div class="fragment"><pre>00117 {
|
|---|
| 733 | 00118 G4cout << <a class="code" href="classG4VUIshell.html#p6">currentCommandDir</a> << G4endl;
|
|---|
| 734 | 00119 }
|
|---|
| 735 | </pre></div> </td>
|
|---|
| 736 | </tr>
|
|---|
| 737 | </table>
|
|---|
| 738 | <hr><h2>Member Data Documentation</h2>
|
|---|
| 739 | <a class="anchor" name="p5" doxytag="G4VUIshell::commandColor" ></a><p>
|
|---|
| 740 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 741 | <tr>
|
|---|
| 742 | <td class="mdRow">
|
|---|
| 743 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 744 | <tr>
|
|---|
| 745 | <td class="md" nowrap valign="top"> <a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> <a class="el" href="classG4VUIshell.html#p5">G4VUIshell::commandColor</a><code> [protected]</code>
|
|---|
| 746 | </table>
|
|---|
| 747 | </td>
|
|---|
| 748 | </tr>
|
|---|
| 749 | </table>
|
|---|
| 750 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 751 | <tr>
|
|---|
| 752 | <td>
|
|---|
| 753 |
|
|---|
| 754 | </td>
|
|---|
| 755 | <td>
|
|---|
| 756 |
|
|---|
| 757 | <p>
|
|---|
| 758 |
|
|---|
| 759 | <p>
|
|---|
| 760 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00070">70</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 761 | <p>
|
|---|
| 762 | Referenced by <a class="el" href="G4UItcsh_8hh-source.html#l00135">G4UItcsh::SetLsColor()</a>. </td>
|
|---|
| 763 | </tr>
|
|---|
| 764 | </table>
|
|---|
| 765 | <a class="anchor" name="p6" doxytag="G4VUIshell::currentCommandDir" ></a><p>
|
|---|
| 766 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 767 | <tr>
|
|---|
| 768 | <td class="mdRow">
|
|---|
| 769 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 770 | <tr>
|
|---|
| 771 | <td class="md" nowrap valign="top"> G4String <a class="el" href="classG4VUIshell.html#p6">G4VUIshell::currentCommandDir</a><code> [protected]</code>
|
|---|
| 772 | </table>
|
|---|
| 773 | </td>
|
|---|
| 774 | </tr>
|
|---|
| 775 | </table>
|
|---|
| 776 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 777 | <tr>
|
|---|
| 778 | <td>
|
|---|
| 779 |
|
|---|
| 780 | </td>
|
|---|
| 781 | <td>
|
|---|
| 782 |
|
|---|
| 783 | <p>
|
|---|
| 784 |
|
|---|
| 785 | <p>
|
|---|
| 786 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00073">73</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 787 | <p>
|
|---|
| 788 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00385">G4UItcsh::CompleteCommand()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00346">G4UItcsh::ListMatchedCommand()</a>, <a class="el" href="G4VUIshell_8cc-source.html#l00062">MakePrompt()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00080">G4UItcsh::MakePrompt()</a>, <a class="el" href="G4VUIshell_8hh-source.html#l00111">SetCurrentDirectory()</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00116">ShowCurrentDirectory()</a>. </td>
|
|---|
| 789 | </tr>
|
|---|
| 790 | </table>
|
|---|
| 791 | <a class="anchor" name="p4" doxytag="G4VUIshell::directoryColor" ></a><p>
|
|---|
| 792 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 793 | <tr>
|
|---|
| 794 | <td class="mdRow">
|
|---|
| 795 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 796 | <tr>
|
|---|
| 797 | <td class="md" nowrap valign="top"> <a class="el" href="G4VUIshell_8hh.html#a8">TermColorIndex</a> <a class="el" href="classG4VUIshell.html#p4">G4VUIshell::directoryColor</a><code> [protected]</code>
|
|---|
| 798 | </table>
|
|---|
| 799 | </td>
|
|---|
| 800 | </tr>
|
|---|
| 801 | </table>
|
|---|
| 802 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 803 | <tr>
|
|---|
| 804 | <td>
|
|---|
| 805 |
|
|---|
| 806 | </td>
|
|---|
| 807 | <td>
|
|---|
| 808 |
|
|---|
| 809 | <p>
|
|---|
| 810 |
|
|---|
| 811 | <p>
|
|---|
| 812 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00069">69</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 813 | <p>
|
|---|
| 814 | Referenced by <a class="el" href="G4UItcsh_8hh-source.html#l00135">G4UItcsh::SetLsColor()</a>. </td>
|
|---|
| 815 | </tr>
|
|---|
| 816 | </table>
|
|---|
| 817 | <a class="anchor" name="p3" doxytag="G4VUIshell::lsColorFlag" ></a><p>
|
|---|
| 818 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 819 | <tr>
|
|---|
| 820 | <td class="mdRow">
|
|---|
| 821 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 822 | <tr>
|
|---|
| 823 | <td class="md" nowrap valign="top"> G4bool <a class="el" href="classG4VUIshell.html#p3">G4VUIshell::lsColorFlag</a><code> [protected]</code>
|
|---|
| 824 | </table>
|
|---|
| 825 | </td>
|
|---|
| 826 | </tr>
|
|---|
| 827 | </table>
|
|---|
| 828 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 829 | <tr>
|
|---|
| 830 | <td>
|
|---|
| 831 |
|
|---|
| 832 | </td>
|
|---|
| 833 | <td>
|
|---|
| 834 |
|
|---|
| 835 | <p>
|
|---|
| 836 |
|
|---|
| 837 | <p>
|
|---|
| 838 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00068">68</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 839 | <p>
|
|---|
| 840 | Referenced by <a class="el" href="G4UItcsh_8hh-source.html#l00135">G4UItcsh::SetLsColor()</a>. </td>
|
|---|
| 841 | </tr>
|
|---|
| 842 | </table>
|
|---|
| 843 | <a class="anchor" name="p2" doxytag="G4VUIshell::nColumn" ></a><p>
|
|---|
| 844 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 845 | <tr>
|
|---|
| 846 | <td class="mdRow">
|
|---|
| 847 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 848 | <tr>
|
|---|
| 849 | <td class="md" nowrap valign="top"> G4int <a class="el" href="classG4VUIshell.html#p2">G4VUIshell::nColumn</a><code> [protected]</code>
|
|---|
| 850 | </table>
|
|---|
| 851 | </td>
|
|---|
| 852 | </tr>
|
|---|
| 853 | </table>
|
|---|
| 854 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 855 | <tr>
|
|---|
| 856 | <td>
|
|---|
| 857 |
|
|---|
| 858 | </td>
|
|---|
| 859 | <td>
|
|---|
| 860 |
|
|---|
| 861 | <p>
|
|---|
| 862 |
|
|---|
| 863 | <p>
|
|---|
| 864 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00064">64</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 865 | <p>
|
|---|
| 866 | Referenced by <a class="el" href="G4VUIshell_8hh-source.html#l00101">SetNColumn()</a>. </td>
|
|---|
| 867 | </tr>
|
|---|
| 868 | </table>
|
|---|
| 869 | <a class="anchor" name="p0" doxytag="G4VUIshell::promptSetting" ></a><p>
|
|---|
| 870 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 871 | <tr>
|
|---|
| 872 | <td class="mdRow">
|
|---|
| 873 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 874 | <tr>
|
|---|
| 875 | <td class="md" nowrap valign="top"> G4String <a class="el" href="classG4VUIshell.html#p0">G4VUIshell::promptSetting</a><code> [protected]</code>
|
|---|
| 876 | </table>
|
|---|
| 877 | </td>
|
|---|
| 878 | </tr>
|
|---|
| 879 | </table>
|
|---|
| 880 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 881 | <tr>
|
|---|
| 882 | <td>
|
|---|
| 883 |
|
|---|
| 884 | </td>
|
|---|
| 885 | <td>
|
|---|
| 886 |
|
|---|
| 887 | <p>
|
|---|
| 888 |
|
|---|
| 889 | <p>
|
|---|
| 890 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00061">61</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 891 | <p>
|
|---|
| 892 | Referenced by <a class="el" href="G4VUIshell_8cc-source.html#l00062">MakePrompt()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00080">G4UItcsh::MakePrompt()</a>, and <a class="el" href="G4VUIshell_8hh-source.html#l00106">SetPrompt()</a>. </td>
|
|---|
| 893 | </tr>
|
|---|
| 894 | </table>
|
|---|
| 895 | <a class="anchor" name="p1" doxytag="G4VUIshell::promptString" ></a><p>
|
|---|
| 896 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 897 | <tr>
|
|---|
| 898 | <td class="mdRow">
|
|---|
| 899 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 900 | <tr>
|
|---|
| 901 | <td class="md" nowrap valign="top"> G4String <a class="el" href="classG4VUIshell.html#p1">G4VUIshell::promptString</a><code> [protected]</code>
|
|---|
| 902 | </table>
|
|---|
| 903 | </td>
|
|---|
| 904 | </tr>
|
|---|
| 905 | </table>
|
|---|
| 906 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 907 | <tr>
|
|---|
| 908 | <td>
|
|---|
| 909 |
|
|---|
| 910 | </td>
|
|---|
| 911 | <td>
|
|---|
| 912 |
|
|---|
| 913 | <p>
|
|---|
| 914 |
|
|---|
| 915 | <p>
|
|---|
| 916 | Definition at line <a class="el" href="G4VUIshell_8hh-source.html#l00062">62</a> of file <a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a>.
|
|---|
| 917 | <p>
|
|---|
| 918 | Referenced by <a class="el" href="G4UItcsh_8cc-source.html#l00250">G4UItcsh::ClearScreen()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00595">G4UItcsh::GetCommandLine()</a>, <a class="el" href="G4UIcsh_8cc-source.html#l00048">G4UIcsh::GetCommandLine()</a>, <a class="el" href="G4UItcsh_8cc-source.html#l00346">G4UItcsh::ListMatchedCommand()</a>, <a class="el" href="G4VUIshell_8cc-source.html#l00062">MakePrompt()</a>, and <a class="el" href="G4UItcsh_8cc-source.html#l00080">G4UItcsh::MakePrompt()</a>. </td>
|
|---|
| 919 | </tr>
|
|---|
| 920 | </table>
|
|---|
| 921 | <hr>The documentation for this class was generated from the following files:<ul>
|
|---|
| 922 | <li><a class="el" href="G4VUIshell_8hh-source.html">G4VUIshell.hh</a><li><a class="el" href="G4VUIshell_8cc-source.html">G4VUIshell.cc</a></ul>
|
|---|
| 923 | <hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:08:03 2007 by
|
|---|
| 924 | <a href="http://www.doxygen.org/index.html">
|
|---|
| 925 | <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
|
|---|
| 926 | </a>1.3.4 </small></address>
|
|---|
| 927 | </body>
|
|---|
| 928 | </html>
|
|---|