source: trunk/geant4/interfaces/html/classG4InteractorMessenger.html@ 772

Last change on this file since 772 was 571, checked in by garnier, 18 years ago

r581@mac-90108: laurentgarnier | 2007-08-17 17:30:26 +0200
deplacement de frame

  • Property svn:mime-type set to text/html
File size: 20.3 KB
Line 
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>G4InteractorMessenger 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&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8<h1>G4InteractorMessenger Class Reference</h1><code>#include &lt;<a class="el" href="G4InteractorMessenger_8hh-source.html">G4InteractorMessenger.hh</a>&gt;</code>
9<p>
10Collaboration diagram for G4InteractorMessenger:<p><center><img src="classG4InteractorMessenger__coll__graph.png" border="0" usemap="#G4InteractorMessenger__coll__map" alt="Collaboration graph"></center>
11<map name="G4InteractorMessenger__coll__map">
12<area href="classG4VInteractiveSession.html" shape="rect" coords="10,8,194,184" alt="">
13</map>
14<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classG4InteractorMessenger-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
15<tr><td></td></tr>
16<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
17<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#a0">G4InteractorMessenger</a> (<a class="el" href="classG4VInteractiveSession.html">G4VInteractiveSession</a> *<a class="el" href="classG4InteractorMessenger.html#r0">session</a>)</td></tr>
18
19<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#a1">~G4InteractorMessenger</a> ()</td></tr>
20
21<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#a2">SetNewValue</a> (G4UIcommand *command, G4String newValue)</td></tr>
22
23<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
24<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classG4VInteractiveSession.html">G4VInteractiveSession</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#r0">session</a></td></tr>
25
26<tr><td class="memItemLeft" nowrap align=right valign=top>G4UIdirectory *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#r1">interactorDirectory</a></td></tr>
27
28<tr><td class="memItemLeft" nowrap align=right valign=top>G4UIcommand *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#r2">addMenu</a></td></tr>
29
30<tr><td class="memItemLeft" nowrap align=right valign=top>G4UIcommand *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#r3">addButton</a></td></tr>
31
32<tr><td class="memItemLeft" nowrap align=right valign=top>G4UIcommand *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4InteractorMessenger.html#r4">sys</a></td></tr>
33
34</table>
35<hr><h2>Constructor &amp; Destructor Documentation</h2>
36<a class="anchor" name="a0" doxytag="G4InteractorMessenger::G4InteractorMessenger" ></a><p>
37<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
38 <tr>
39 <td class="mdRow">
40 <table cellpadding="0" cellspacing="0" border="0">
41 <tr>
42 <td class="md" nowrap valign="top"> G4InteractorMessenger::G4InteractorMessenger </td>
43 <td class="md" valign="top">(&nbsp;</td>
44 <td class="md" nowrap valign="top"><a class="el" href="classG4VInteractiveSession.html">G4VInteractiveSession</a> *&nbsp;</td>
45 <td class="mdname1" valign="top" nowrap> <em>session</em> </td>
46 <td class="md" valign="top">&nbsp;)&nbsp;</td>
47 <td class="md" nowrap></td>
48 </tr>
49
50 </table>
51 </td>
52 </tr>
53</table>
54<table cellspacing=5 cellpadding=0 border=0>
55 <tr>
56 <td>
57 &nbsp;
58 </td>
59 <td>
60
61<p>
62
63<p>
64Definition at line <a class="el" href="G4InteractorMessenger_8cc-source.html#l00042">42</a> of file <a class="el" href="G4InteractorMessenger_8cc-source.html">G4InteractorMessenger.cc</a>.
65<p>
66References <a class="el" href="G4InteractorMessenger_8hh-source.html#l00047">addButton</a>, <a class="el" href="G4InteractorMessenger_8hh-source.html#l00046">addMenu</a>, <a class="el" href="G4InteractorMessenger_8hh-source.html#l00045">interactorDirectory</a>, <a class="el" href="G4InteractorMessenger_8hh-source.html#l00044">session</a>, and <a class="el" href="G4InteractorMessenger_8hh-source.html#l00048">sys</a>.
67<p>
68<div class="fragment"><pre>00045 {
6900046 <a class="code" href="classG4InteractorMessenger.html#r0">session</a> = a_session;
7000047
7100048 G4UIparameter* parameter;
7200049
7300050 <a class="code" href="classG4InteractorMessenger.html#r1">interactorDirectory</a> = <span class="keyword">new</span> G4UIdirectory(<span class="stringliteral">"/gui/"</span>);
7400051 <a class="code" href="classG4InteractorMessenger.html#r1">interactorDirectory</a>-&gt;SetGuidance(<span class="stringliteral">"UI interactors commands."</span>);
7500052
7600053 <span class="comment">// /gui/addMenu :</span>
7700054 <a class="code" href="classG4InteractorMessenger.html#r2">addMenu</a> = <span class="keyword">new</span> G4UIcommand(<span class="stringliteral">"/gui/addMenu"</span>,<span class="keyword">this</span>);
7800055 <a class="code" href="classG4InteractorMessenger.html#r2">addMenu</a>-&gt;SetGuidance(<span class="stringliteral">"Add a menu to menu bar."</span>);
7900056 parameter = <span class="keyword">new</span> G4UIparameter(<span class="stringliteral">"Name"</span>,<span class="charliteral">'s'</span>,<span class="keyword">false</span>);
8000057 parameter-&gt;SetDefaultValue(<span class="stringliteral">"dummy"</span>);
8100058 <a class="code" href="classG4InteractorMessenger.html#r2">addMenu</a>-&gt;SetParameter (parameter);
8200059 parameter = <span class="keyword">new</span> G4UIparameter(<span class="stringliteral">"Label"</span>,<span class="charliteral">'s'</span>,<span class="keyword">false</span>);
8300060 parameter-&gt;SetDefaultValue(<span class="stringliteral">"dummy"</span>);
8400061 <a class="code" href="classG4InteractorMessenger.html#r2">addMenu</a>-&gt;SetParameter (parameter);
8500062
8600063 <span class="comment">// /gui/addButton :</span>
8700064 <a class="code" href="classG4InteractorMessenger.html#r3">addButton</a> = <span class="keyword">new</span> G4UIcommand(<span class="stringliteral">"/gui/addButton"</span>,<span class="keyword">this</span>);
8800065 <a class="code" href="classG4InteractorMessenger.html#r3">addButton</a>-&gt;SetGuidance(<span class="stringliteral">"Add a button to menu."</span>);
8900066 parameter = <span class="keyword">new</span> G4UIparameter(<span class="stringliteral">"Menu"</span>,<span class="charliteral">'s'</span>,<span class="keyword">false</span>);
9000067 parameter-&gt;SetDefaultValue(<span class="stringliteral">"dummy"</span>);
9100068 <a class="code" href="classG4InteractorMessenger.html#r3">addButton</a>-&gt;SetParameter (parameter);
9200069 parameter = <span class="keyword">new</span> G4UIparameter(<span class="stringliteral">"Label"</span>,<span class="charliteral">'s'</span>,<span class="keyword">false</span>);
9300070 parameter-&gt;SetDefaultValue(<span class="stringliteral">"dummy"</span>);
9400071 <a class="code" href="classG4InteractorMessenger.html#r3">addButton</a>-&gt;SetParameter (parameter);
9500072 parameter = <span class="keyword">new</span> G4UIparameter(<span class="stringliteral">"Command"</span>,<span class="charliteral">'s'</span>,<span class="keyword">false</span>);
9600073 parameter-&gt;SetDefaultValue(<span class="stringliteral">""</span>);
9700074 <a class="code" href="classG4InteractorMessenger.html#r3">addButton</a>-&gt;SetParameter (parameter);
9800075
9900076 <span class="comment">// /gui/system :</span>
10000077 <a class="code" href="classG4InteractorMessenger.html#r4">sys</a> = <span class="keyword">new</span> G4UIcommand(<span class="stringliteral">"/gui/system"</span>,<span class="keyword">this</span>);
10100078 <a class="code" href="classG4InteractorMessenger.html#r4">sys</a>-&gt;SetGuidance(<span class="stringliteral">"Send a command to the system."</span>);
10200079 parameter = <span class="keyword">new</span> G4UIparameter(<span class="stringliteral">"Command"</span>,<span class="charliteral">'s'</span>,<span class="keyword">false</span>);
10300080 parameter-&gt;SetDefaultValue(<span class="stringliteral">""</span>);
10400081 <a class="code" href="classG4InteractorMessenger.html#r4">sys</a>-&gt;SetParameter (parameter);
10500082
10600083 }
107</pre></div> </td>
108 </tr>
109</table>
110<a class="anchor" name="a1" doxytag="G4InteractorMessenger::~G4InteractorMessenger" ></a><p>
111<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
112 <tr>
113 <td class="mdRow">
114 <table cellpadding="0" cellspacing="0" border="0">
115 <tr>
116 <td class="md" nowrap valign="top"> G4InteractorMessenger::~<a class="el" href="classG4InteractorMessenger.html">G4InteractorMessenger</a> </td>
117 <td class="md" valign="top">(&nbsp;</td>
118 <td class="mdname1" valign="top" nowrap> </td>
119 <td class="md" valign="top">&nbsp;)&nbsp;</td>
120 <td class="md" nowrap><code> [virtual]</code></td>
121 </tr>
122
123 </table>
124 </td>
125 </tr>
126</table>
127<table cellspacing=5 cellpadding=0 border=0>
128 <tr>
129 <td>
130 &nbsp;
131 </td>
132 <td>
133
134<p>
135
136<p>
137Definition at line <a class="el" href="G4InteractorMessenger_8cc-source.html#l00085">85</a> of file <a class="el" href="G4InteractorMessenger_8cc-source.html">G4InteractorMessenger.cc</a>.
138<p>
139References <a class="el" href="G4InteractorMessenger_8hh-source.html#l00047">addButton</a>, <a class="el" href="G4InteractorMessenger_8hh-source.html#l00046">addMenu</a>, and <a class="el" href="G4InteractorMessenger_8hh-source.html#l00045">interactorDirectory</a>.
140<p>
141<div class="fragment"><pre>00086 {
14200087 <span class="keyword">delete</span> <a class="code" href="classG4InteractorMessenger.html#r3">addButton</a>;
14300088 <span class="keyword">delete</span> <a class="code" href="classG4InteractorMessenger.html#r2">addMenu</a>;
14400089 <span class="keyword">delete</span> <a class="code" href="classG4InteractorMessenger.html#r1">interactorDirectory</a>;
14500090 }
146</pre></div> </td>
147 </tr>
148</table>
149<hr><h2>Member Function Documentation</h2>
150<a class="anchor" name="a2" doxytag="G4InteractorMessenger::SetNewValue" ></a><p>
151<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
152 <tr>
153 <td class="mdRow">
154 <table cellpadding="0" cellspacing="0" border="0">
155 <tr>
156 <td class="md" nowrap valign="top"> void G4InteractorMessenger::SetNewValue </td>
157 <td class="md" valign="top">(&nbsp;</td>
158 <td class="md" nowrap valign="top">G4UIcommand *&nbsp;</td>
159 <td class="mdname" nowrap> <em>command</em>, </td>
160 </tr>
161 <tr>
162 <td></td>
163 <td></td>
164 <td class="md" nowrap>G4String&nbsp;</td>
165 <td class="mdname" nowrap> <em>newValue</em></td>
166 </tr>
167 <tr>
168 <td></td>
169 <td class="md">)&nbsp;</td>
170 <td class="md" colspan="2"></td>
171 </tr>
172
173 </table>
174 </td>
175 </tr>
176</table>
177<table cellspacing=5 cellpadding=0 border=0>
178 <tr>
179 <td>
180 &nbsp;
181 </td>
182 <td>
183
184<p>
185
186<p>
187Definition at line <a class="el" href="G4InteractorMessenger_8cc-source.html#l00092">92</a> of file <a class="el" href="G4InteractorMessenger_8cc-source.html">G4InteractorMessenger.cc</a>.
188<p>
189References <a class="el" href="G4VInteractiveSession_8cc-source.html#l00050">G4VInteractiveSession::AddButton()</a>, <a class="el" href="G4InteractorMessenger_8hh-source.html#l00047">addButton</a>, <a class="el" href="G4VInteractiveSession_8cc-source.html#l00045">G4VInteractiveSession::AddMenu()</a>, <a class="el" href="G4InteractorMessenger_8hh-source.html#l00046">addMenu</a>, <a class="el" href="G4InteractorMessenger_8cc-source.html#l00110">GetValues()</a>, <a class="el" href="G4InteractorMessenger_8hh-source.html#l00044">session</a>, and <a class="el" href="G4InteractorMessenger_8hh-source.html#l00048">sys</a>.
190<p>
191<div class="fragment"><pre>00096 {
19200097 <span class="keywordtype">int</span> paramn = command-&gt;GetParameterEntries();
19300098 G4String* params = <span class="keyword">new</span> G4String [paramn];
19400099 <span class="keywordflow">if</span>(<a class="code" href="G4InteractorMessenger_8cc.html#a0">GetValues</a>(newValue,paramn,params)==<span class="keyword">true</span>) {
19500100 <span class="keywordflow">if</span>(command==<a class="code" href="classG4InteractorMessenger.html#r2">addMenu</a>) {
19600101 <a class="code" href="classG4InteractorMessenger.html#r0">session</a>-&gt;<a class="code" href="classG4VInteractiveSession.html#a2">AddMenu</a>((<span class="keyword">const</span> <span class="keywordtype">char</span>*)params[0],(<span class="keyword">const</span> <span class="keywordtype">char</span>*)params[1]);
19700102 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(command==<a class="code" href="classG4InteractorMessenger.html#r3">addButton</a>) {
19800103 <a class="code" href="classG4InteractorMessenger.html#r0">session</a>-&gt;<a class="code" href="classG4VInteractiveSession.html#a3">AddButton</a>((<span class="keyword">const</span> <span class="keywordtype">char</span>*)params[0],(<span class="keyword">const</span> <span class="keywordtype">char</span>*)params[1],(<span class="keyword">const</span> <span class="keywordtype">char</span>*)params[2]);
19900104 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(command==<a class="code" href="classG4InteractorMessenger.html#r4">sys</a>) {
20000105 system((<span class="keyword">const</span> <span class="keywordtype">char</span>*)params[0]);
20100106 }
20200107 }
20300108 <span class="keyword">delete</span> [] params;
20400109 }
205</pre></div> </td>
206 </tr>
207</table>
208
209<p>
210Here is the call graph for this function:<p><center><img src="classG4InteractorMessenger_a2_cgraph.png" border="0" usemap="#classG4InteractorMessenger_a2_cgraph_map" alt=""></center>
211<map name="classG4InteractorMessenger_a2_cgraph_map">
212<area href="classG4VInteractiveSession.html#a3" shape="rect" coords="305,8,531,34" alt="">
213<area href="classG4VInteractiveSession.html#a2" shape="rect" coords="307,58,529,85" alt="">
214<area href="G4InteractorMessenger_8cc.html#a0" shape="rect" coords="377,109,459,136" alt="">
215</map>
216<hr><h2>Member Data Documentation</h2>
217<a class="anchor" name="r3" doxytag="G4InteractorMessenger::addButton" ></a><p>
218<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
219 <tr>
220 <td class="mdRow">
221 <table cellpadding="0" cellspacing="0" border="0">
222 <tr>
223 <td class="md" nowrap valign="top"> G4UIcommand* <a class="el" href="classG4InteractorMessenger.html#r3">G4InteractorMessenger::addButton</a><code> [private]</code>
224 </table>
225 </td>
226 </tr>
227</table>
228<table cellspacing=5 cellpadding=0 border=0>
229 <tr>
230 <td>
231 &nbsp;
232 </td>
233 <td>
234
235<p>
236
237<p>
238Definition at line <a class="el" href="G4InteractorMessenger_8hh-source.html#l00047">47</a> of file <a class="el" href="G4InteractorMessenger_8hh-source.html">G4InteractorMessenger.hh</a>.
239<p>
240Referenced by <a class="el" href="G4InteractorMessenger_8cc-source.html#l00042">G4InteractorMessenger()</a>, <a class="el" href="G4InteractorMessenger_8cc-source.html#l00092">SetNewValue()</a>, and <a class="el" href="G4InteractorMessenger_8cc-source.html#l00085">~G4InteractorMessenger()</a>. </td>
241 </tr>
242</table>
243<a class="anchor" name="r2" doxytag="G4InteractorMessenger::addMenu" ></a><p>
244<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
245 <tr>
246 <td class="mdRow">
247 <table cellpadding="0" cellspacing="0" border="0">
248 <tr>
249 <td class="md" nowrap valign="top"> G4UIcommand* <a class="el" href="classG4InteractorMessenger.html#r2">G4InteractorMessenger::addMenu</a><code> [private]</code>
250 </table>
251 </td>
252 </tr>
253</table>
254<table cellspacing=5 cellpadding=0 border=0>
255 <tr>
256 <td>
257 &nbsp;
258 </td>
259 <td>
260
261<p>
262
263<p>
264Definition at line <a class="el" href="G4InteractorMessenger_8hh-source.html#l00046">46</a> of file <a class="el" href="G4InteractorMessenger_8hh-source.html">G4InteractorMessenger.hh</a>.
265<p>
266Referenced by <a class="el" href="G4InteractorMessenger_8cc-source.html#l00042">G4InteractorMessenger()</a>, <a class="el" href="G4InteractorMessenger_8cc-source.html#l00092">SetNewValue()</a>, and <a class="el" href="G4InteractorMessenger_8cc-source.html#l00085">~G4InteractorMessenger()</a>. </td>
267 </tr>
268</table>
269<a class="anchor" name="r1" doxytag="G4InteractorMessenger::interactorDirectory" ></a><p>
270<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
271 <tr>
272 <td class="mdRow">
273 <table cellpadding="0" cellspacing="0" border="0">
274 <tr>
275 <td class="md" nowrap valign="top"> G4UIdirectory* <a class="el" href="classG4InteractorMessenger.html#r1">G4InteractorMessenger::interactorDirectory</a><code> [private]</code>
276 </table>
277 </td>
278 </tr>
279</table>
280<table cellspacing=5 cellpadding=0 border=0>
281 <tr>
282 <td>
283 &nbsp;
284 </td>
285 <td>
286
287<p>
288
289<p>
290Definition at line <a class="el" href="G4InteractorMessenger_8hh-source.html#l00045">45</a> of file <a class="el" href="G4InteractorMessenger_8hh-source.html">G4InteractorMessenger.hh</a>.
291<p>
292Referenced by <a class="el" href="G4InteractorMessenger_8cc-source.html#l00042">G4InteractorMessenger()</a>, and <a class="el" href="G4InteractorMessenger_8cc-source.html#l00085">~G4InteractorMessenger()</a>. </td>
293 </tr>
294</table>
295<a class="anchor" name="r0" doxytag="G4InteractorMessenger::session" ></a><p>
296<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
297 <tr>
298 <td class="mdRow">
299 <table cellpadding="0" cellspacing="0" border="0">
300 <tr>
301 <td class="md" nowrap valign="top"> <a class="el" href="classG4VInteractiveSession.html">G4VInteractiveSession</a>* <a class="el" href="classG4InteractorMessenger.html#r0">G4InteractorMessenger::session</a><code> [private]</code>
302 </table>
303 </td>
304 </tr>
305</table>
306<table cellspacing=5 cellpadding=0 border=0>
307 <tr>
308 <td>
309 &nbsp;
310 </td>
311 <td>
312
313<p>
314
315<p>
316Definition at line <a class="el" href="G4InteractorMessenger_8hh-source.html#l00044">44</a> of file <a class="el" href="G4InteractorMessenger_8hh-source.html">G4InteractorMessenger.hh</a>.
317<p>
318Referenced by <a class="el" href="G4InteractorMessenger_8cc-source.html#l00042">G4InteractorMessenger()</a>, and <a class="el" href="G4InteractorMessenger_8cc-source.html#l00092">SetNewValue()</a>. </td>
319 </tr>
320</table>
321<a class="anchor" name="r4" doxytag="G4InteractorMessenger::sys" ></a><p>
322<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
323 <tr>
324 <td class="mdRow">
325 <table cellpadding="0" cellspacing="0" border="0">
326 <tr>
327 <td class="md" nowrap valign="top"> G4UIcommand* <a class="el" href="classG4InteractorMessenger.html#r4">G4InteractorMessenger::sys</a><code> [private]</code>
328 </table>
329 </td>
330 </tr>
331</table>
332<table cellspacing=5 cellpadding=0 border=0>
333 <tr>
334 <td>
335 &nbsp;
336 </td>
337 <td>
338
339<p>
340
341<p>
342Definition at line <a class="el" href="G4InteractorMessenger_8hh-source.html#l00048">48</a> of file <a class="el" href="G4InteractorMessenger_8hh-source.html">G4InteractorMessenger.hh</a>.
343<p>
344Referenced by <a class="el" href="G4InteractorMessenger_8cc-source.html#l00042">G4InteractorMessenger()</a>, and <a class="el" href="G4InteractorMessenger_8cc-source.html#l00092">SetNewValue()</a>. </td>
345 </tr>
346</table>
347<hr>The documentation for this class was generated from the following files:<ul>
348<li><a class="el" href="G4InteractorMessenger_8hh-source.html">G4InteractorMessenger.hh</a><li><a class="el" href="G4InteractorMessenger_8cc-source.html">G4InteractorMessenger.cc</a></ul>
349<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:07:04 2007 by
350<a href="http://www.doxygen.org/index.html">
351<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
352</a>1.3.4 </small></address>
353</body>
354</html>
Note: See TracBrowser for help on using the repository browser.