1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>G4VBasicShell.hh Source File</title> |
---|
4 | <link href="../../doxygen.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="../../tabs.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.2 --> |
---|
8 | <div class="tabs"> |
---|
9 | <ul> |
---|
10 | <li><a href="../../index.html"><span>Main Page</span></a></li> |
---|
11 | <li><a href="../../annotated.html"><span>Classes</span></a></li> |
---|
12 | <li class="current"><a href="../../files.html"><span>Files</span></a></li> |
---|
13 | </ul> |
---|
14 | </div> |
---|
15 | <div class="tabs"> |
---|
16 | <ul> |
---|
17 | <li><a href="../../files.html"><span>File List</span></a></li> |
---|
18 | <li><a href="../../globals.html"><span>File Members</span></a></li> |
---|
19 | </ul> |
---|
20 | </div> |
---|
21 | <h1>G4VBasicShell.hh</h1><a href="../../d5/d17/G4VBasicShell_8hh.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span> |
---|
22 | <a name="l00002"></a>00002 <span class="comment">// ********************************************************************</span> |
---|
23 | <a name="l00003"></a>00003 <span class="comment">// * License and Disclaimer *</span> |
---|
24 | <a name="l00004"></a>00004 <span class="comment">// * *</span> |
---|
25 | <a name="l00005"></a>00005 <span class="comment">// * The Geant4 software is copyright of the Copyright Holders of *</span> |
---|
26 | <a name="l00006"></a>00006 <span class="comment">// * the Geant4 Collaboration. It is provided under the terms and *</span> |
---|
27 | <a name="l00007"></a>00007 <span class="comment">// * conditions of the Geant4 Software License, included in the file *</span> |
---|
28 | <a name="l00008"></a>00008 <span class="comment">// * LICENSE and available at http://cern.ch/geant4/license . These *</span> |
---|
29 | <a name="l00009"></a>00009 <span class="comment">// * include a list of copyright holders. *</span> |
---|
30 | <a name="l00010"></a>00010 <span class="comment">// * *</span> |
---|
31 | <a name="l00011"></a>00011 <span class="comment">// * Neither the authors of this software system, nor their employing *</span> |
---|
32 | <a name="l00012"></a>00012 <span class="comment">// * institutes,nor the agencies providing financial support for this *</span> |
---|
33 | <a name="l00013"></a>00013 <span class="comment">// * work make any representation or warranty, express or implied, *</span> |
---|
34 | <a name="l00014"></a>00014 <span class="comment">// * regarding this software system or assume any liability for its *</span> |
---|
35 | <a name="l00015"></a>00015 <span class="comment">// * use. Please see the license in the file LICENSE and URL above *</span> |
---|
36 | <a name="l00016"></a>00016 <span class="comment">// * for the full disclaimer and the limitation of liability. *</span> |
---|
37 | <a name="l00017"></a>00017 <span class="comment">// * *</span> |
---|
38 | <a name="l00018"></a>00018 <span class="comment">// * This code implementation is the result of the scientific and *</span> |
---|
39 | <a name="l00019"></a>00019 <span class="comment">// * technical work of the GEANT4 collaboration. *</span> |
---|
40 | <a name="l00020"></a>00020 <span class="comment">// * By using, copying, modifying or distributing the software (or *</span> |
---|
41 | <a name="l00021"></a>00021 <span class="comment">// * any work based on the software) you agree to acknowledge its *</span> |
---|
42 | <a name="l00022"></a>00022 <span class="comment">// * use in resulting scientific publications, and indicate your *</span> |
---|
43 | <a name="l00023"></a>00023 <span class="comment">// * acceptance of all terms of the Geant4 Software license. *</span> |
---|
44 | <a name="l00024"></a>00024 <span class="comment">// ********************************************************************</span> |
---|
45 | <a name="l00025"></a>00025 <span class="comment">//</span> |
---|
46 | <a name="l00026"></a>00026 <span class="comment">//</span> |
---|
47 | <a name="l00027"></a>00027 <span class="comment">// $Id: G4VBasicShell.hh,v 1.7 2006/06/29 19:10:03 gunter Exp $</span> |
---|
48 | <a name="l00028"></a>00028 <span class="comment">// GEANT4 tag $Name: geant4-08-01-patch-01 $</span> |
---|
49 | <a name="l00029"></a>00029 <span class="comment">//</span> |
---|
50 | <a name="l00030"></a>00030 |
---|
51 | <a name="l00031"></a>00031 <span class="preprocessor">#ifndef G4VBasicShell_H</span> |
---|
52 | <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define G4VBasicShell_H 1</span> |
---|
53 | <a name="l00033"></a>00033 <span class="preprocessor"></span> |
---|
54 | <a name="l00034"></a>00034 <span class="keyword">class </span>G4UIcommandTree; |
---|
55 | <a name="l00035"></a>00035 <span class="keyword">class </span>G4UIcommand; |
---|
56 | <a name="l00036"></a>00036 |
---|
57 | <a name="l00037"></a>00037 <span class="preprocessor">#include "G4UIsession.hh"</span> |
---|
58 | <a name="l00038"></a>00038 <span class="preprocessor">#include "globals.hh"</span> |
---|
59 | <a name="l00039"></a>00039 |
---|
60 | <a name="l00040"></a>00040 <span class="comment">// Class description :</span> |
---|
61 | <a name="l00041"></a>00041 <span class="comment">//</span> |
---|
62 | <a name="l00042"></a>00042 <span class="comment">// G4VBasicShell : a base class to extract common things to various</span> |
---|
63 | <a name="l00043"></a>00043 <span class="comment">// sessions. </span> |
---|
64 | <a name="l00044"></a>00044 <span class="comment">//</span> |
---|
65 | <a name="l00045"></a>00045 <span class="comment">// It handles "seek" completion logic, help logic.</span> |
---|
66 | <a name="l00046"></a>00046 <span class="comment">// VBasicShell handles also commands like "cd, ls, pwd"</span> |
---|
67 | <a name="l00047"></a>00047 <span class="comment">// without passing by a Geant4 "intercom" command. This feature,</span> |
---|
68 | <a name="l00048"></a>00048 <span class="comment">// which is similar to a UNIX shell one, had given.</span> |
---|
69 | <a name="l00049"></a>00049 <span class="comment">// its name to the class.</span> |
---|
70 | <a name="l00050"></a>00050 <span class="comment">//</span> |
---|
71 | <a name="l00051"></a>00051 <span class="comment">// Class description - end :</span> |
---|
72 | <a name="l00052"></a>00052 |
---|
73 | <a name="l00053"></a><a class="code" href="../../df/dda/classG4VBasicShell.html">00053</a> <span class="keyword">class </span><a class="code" href="../../df/dda/classG4VBasicShell.html">G4VBasicShell</a> : <span class="keyword">public</span> G4UIsession |
---|
74 | <a name="l00054"></a>00054 { |
---|
75 | <a name="l00055"></a>00055 <span class="keyword">public</span>: |
---|
76 | <a name="l00056"></a>00056 <a class="code" href="../../df/dda/classG4VBasicShell.html#482976943b07e1de28eccbc1adb38b86">G4VBasicShell</a>(); |
---|
77 | <a name="l00057"></a>00057 <span class="keyword">virtual</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#3321f0f46174c1dada13cc3057e1220d">~G4VBasicShell</a>(); |
---|
78 | <a name="l00058"></a>00058 |
---|
79 | <a name="l00059"></a>00059 <span class="keyword">virtual</span> G4UIsession* <a class="code" href="../../df/dda/classG4VBasicShell.html#39d66849c73e1fa27da178e7438bd43b">SessionStart</a>() = 0; |
---|
80 | <a name="l00060"></a>00060 <span class="comment">// null should be returned for interactive session</span> |
---|
81 | <a name="l00061"></a>00061 |
---|
82 | <a name="l00062"></a>00062 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#f0f8fa503c2930116020a49e168ce88e">PauseSessionStart</a>(G4String Prompt) = 0; |
---|
83 | <a name="l00063"></a>00063 <span class="comment">// Prompt string can be ignored</span> |
---|
84 | <a name="l00064"></a>00064 |
---|
85 | <a name="l00065"></a>00065 <span class="keyword">protected</span>: |
---|
86 | <a name="l00066"></a>00066 G4String <a class="code" href="../../df/dda/classG4VBasicShell.html#37cda2e28f939aa7d39378ba4743f3ea">ModifyToFullPathCommand</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* aCommandLine); |
---|
87 | <a name="l00067"></a>00067 <span class="comment">// convert "BeamOn 10" to "/run/BeamOn 10" if the</span> |
---|
88 | <a name="l00068"></a>00068 <span class="comment">// current working directory is "/run/"</span> |
---|
89 | <a name="l00069"></a>00069 |
---|
90 | <a name="l00070"></a>00070 G4String <a class="code" href="../../df/dda/classG4VBasicShell.html#96e932f80be12a6fa5e987675a58125f">GetCurrentWorkingDirectory</a>(); |
---|
91 | <a name="l00071"></a>00071 <span class="comment">// directory string starts with '/' and ends with '/'</span> |
---|
92 | <a name="l00072"></a>00072 |
---|
93 | <a name="l00073"></a>00073 G4bool <a class="code" href="../../df/dda/classG4VBasicShell.html#e0bb2813ddaa2f3c20d0e3b18ae1e08f">ChangeDirectory</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* newDir); |
---|
94 | <a name="l00074"></a>00074 <span class="comment">// change directory to newDir</span> |
---|
95 | <a name="l00075"></a>00075 <span class="comment">// false will be returned if the target directory doesn't exist</span> |
---|
96 | <a name="l00076"></a>00076 |
---|
97 | <a name="l00077"></a>00077 G4UIcommandTree* <a class="code" href="../../df/dda/classG4VBasicShell.html#82868c3bb923d4c3aea95846cb990d59">FindDirectory</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* dirName); |
---|
98 | <a name="l00078"></a>00078 <span class="comment">// find G4UIcommandTree object</span> |
---|
99 | <a name="l00079"></a>00079 <span class="comment">// null returned if the taregt does not exist</span> |
---|
100 | <a name="l00080"></a>00080 |
---|
101 | <a name="l00081"></a>00081 G4UIcommand* <a class="code" href="../../df/dda/classG4VBasicShell.html#44b5ce473617a1ce6c9f677fbf85a6d8">FindCommand</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* commandName); |
---|
102 | <a name="l00082"></a>00082 <span class="comment">// find G4UIcommand object</span> |
---|
103 | <a name="l00083"></a>00083 <span class="comment">// null returned if the target does not exist</span> |
---|
104 | <a name="l00084"></a>00084 |
---|
105 | <a name="l00085"></a>00085 G4String <a class="code" href="../../df/dda/classG4VBasicShell.html#11bce0253d6e21a15f968f1ac1346e8e">Complete</a>(G4String); |
---|
106 | <a name="l00086"></a>00086 <span class="comment">// command completion</span> |
---|
107 | <a name="l00087"></a>00087 G4String <a class="code" href="../../df/dda/classG4VBasicShell.html#2559325294f2f81f86ab8be3a435cfd4">FindMatchingPath</a>(G4UIcommandTree*,G4String); |
---|
108 | <a name="l00088"></a>00088 |
---|
109 | <a name="l00090"></a>00090 <span class="comment">// Methods involving an interactive G4cout //</span> |
---|
110 | <a name="l00092"></a>00092 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#a8cc3c5a9ddfc2ecc697ed8fb2b16896">ExecuteCommand</a>(G4String); |
---|
111 | <a name="l00093"></a>00093 <span class="keyword">virtual</span> G4bool <a class="code" href="../../df/dda/classG4VBasicShell.html#fe032a493d8c0a38216072af90d637d3">GetHelpChoice</a>(G4int&) = 0; |
---|
112 | <a name="l00094"></a>00094 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#34a2a8215075d47fbbca485700c2d953">ExitHelp</a>() = 0; |
---|
113 | <a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#eb7598723428db0f8649206ecb6a8feb">ApplyShellCommand</a>(G4String,G4bool&,G4bool&); |
---|
114 | <a name="l00096"></a>00096 <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#a6329889a74fbd0df85fe02223c0ec42">ShowCurrent</a>(G4String); |
---|
115 | <a name="l00097"></a>00097 <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#18555430612e0d5945a03f3cca0dbe47">ChangeDirectoryCommand</a>(G4String); |
---|
116 | <a name="l00098"></a>00098 <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#61ac7ea7689d29a3911c4b42c8715f4b">ListDirectory</a>(G4String); |
---|
117 | <a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="../../df/dda/classG4VBasicShell.html#ebf4d6b284c047097855b75636501dd6">TerminalHelp</a>(G4String); |
---|
118 | <a name="l00100"></a>00100 |
---|
119 | <a name="l00101"></a>00101 <span class="keyword">private</span>: |
---|
120 | <a name="l00102"></a><a class="code" href="../../df/dda/classG4VBasicShell.html#bca99451265ee08a64e1147a64dd81f4">00102</a> G4String <a class="code" href="../../df/dda/classG4VBasicShell.html#bca99451265ee08a64e1147a64dd81f4">currentDirectory</a>; |
---|
121 | <a name="l00103"></a>00103 |
---|
122 | <a name="l00104"></a>00104 G4String <a class="code" href="../../df/dda/classG4VBasicShell.html#0d3fc0c149e9a6c39a74f53cde405977">ModifyPath</a>(G4String tempPath); |
---|
123 | <a name="l00105"></a>00105 }; |
---|
124 | <a name="l00106"></a>00106 |
---|
125 | <a name="l00107"></a>00107 <span class="preprocessor">#endif</span> |
---|
126 | <a name="l00108"></a>00108 <span class="preprocessor"></span> |
---|
127 | </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 22 10:26:04 2007 by |
---|
128 | <a href="http://www.doxygen.org/index.html"> |
---|
129 | <img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address> |
---|
130 | </body> |
---|
131 | </html> |
---|